File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
#import < Cocoa/Cocoa.h>
2
2
3
+ extern NSString * const SSYUserInfoErrorDomain;
4
+ extern NSInteger const SSYUserInfoCouldNotGetLoginTimeError;
3
5
4
6
/* !
5
7
Methods for getting info about the current macOS user, aka "console" user
Original file line number Diff line number Diff line change 5
5
#import < utmpx.h>
6
6
#import < string.h>
7
7
8
+ NSString * const SSYUserInfoErrorDomain = @" SSYUserInfoErrorDomain" ;
9
+ NSInteger const SSYUserInfoCouldNotGetLoginTimeError = 948308 ;
8
10
9
11
@implementation SSYUserInfo
10
12
@@ -91,8 +93,8 @@ + (NSDate*)whenThisUserLoggedInError_p:(NSError**)error_p {
91
93
endutxent_wtmp ();
92
94
93
95
if (!date && error_p) {
94
- NSError * error = [NSError errorWithDomain: @" SSYUserInfoErrorDomain"
95
- code: 948308
96
+ NSError * error = [NSError errorWithDomain: SSYUserInfoErrorDomain
97
+ code: SSYUserInfoCouldNotGetLoginTimeError
96
98
userInfo: @{
97
99
NSLocalizedDescriptionKey : @" SSYUserInfo could not find `%@ ` console UTX entry" ,
98
100
@" entries count" : [NSNumber numberWithInteger: countOfEntries],
You can’t perform that action at this time.
0 commit comments