Skip to content

Commit

Permalink
santad: Use IORegistryEntryFromPath instead of IORegistryEntryCopyFro…
Browse files Browse the repository at this point in the history
…mPath.

The latter was only introduced in 10.11. Fixes #47
  • Loading branch information
russellhancox committed Jun 16, 2016
1 parent c7442a0 commit e42f134
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/santad/SNTEventLog.m
Expand Up @@ -309,8 +309,7 @@ Given an IOKit device path (like those provided by DiskArbitration), find the di
- (NSString *)diskImageForDevice:(NSString *)devPath {
devPath = [devPath stringByDeletingLastPathComponent];
if (!devPath.length) return nil;
io_registry_entry_t device = IORegistryEntryCopyFromPath(
kIOMasterPortDefault, (__bridge CFStringRef)devPath);
io_registry_entry_t device = IORegistryEntryFromPath(kIOMasterPortDefault, devPath.UTF8String);
CFMutableDictionaryRef deviceProperties = NULL;
IORegistryEntryCreateCFProperties(device, &deviceProperties, kCFAllocatorDefault, kNilOptions);
NSDictionary *properties = CFBridgingRelease(deviceProperties);
Expand All @@ -329,8 +328,7 @@ Given an IOKit device path (like those provided by DiskArbitration), find the de
- (NSString *)serialForDevice:(NSString *)devPath {
if (!devPath.length) return nil;
NSString *serial;
io_registry_entry_t device = IORegistryEntryCopyFromPath(
kIOMasterPortDefault, (__bridge CFStringRef)devPath);
io_registry_entry_t device = IORegistryEntryFromPath(kIOMasterPortDefault, devPath.UTF8String);
while (!serial && device) {
CFMutableDictionaryRef deviceProperties = NULL;
IORegistryEntryCreateCFProperties(device, &deviceProperties, kCFAllocatorDefault, kNilOptions);
Expand Down

0 comments on commit e42f134

Please sign in to comment.