␉␉␉␉␉ NSMakeRange(pos, rS.location - pos) ];␊ |
␉NSString* sPart = [name substringFromIndex: pos2 ];␊ |
␉␊ |
␉diskNum = [sDisk␉intValue];␊ |
␉partNum = [sPart␉intValue];␊ |
␉␊ |
bsdName = name;␊ |
␉␊ |
␉bool mustRelease = (session == nil) ? true : false;␊ |
␉␊ |
␉if (session == nil)␊ |
|
␉if (session == NULL)␉err = EINVAL;␊ |
␉␊ |
␉if (err == 0) {␊ |
␉␉disk = DADiskCreateFromBSDName(NULL, session, [bsdName UTF8String] );␊ |
␉␉disk = DADiskCreateFromBSDName(NULL, session, [name UTF8String] );␊ |
␉␉if (disk == NULL) err = EINVAL;␊ |
␉}␊ |
␉␊ |
|
␉}␊ |
␊ |
␉if (err == 0) {␊ |
␉␉diskNum = [sDisk␉intValue];␊ |
␉␉partNum = [sPart␉intValue];␊ |
␉␉␊ |
␉␉self.vUUID = [self createStringValueWithKey: @"DAVolumeUUID"];␊ |
␉␉self.vName = [self createStringValueWithKey: @"DAVolumeName"];␊ |
␉␉self.vAliasName = self.vName; // by default renamed = original part name ␊ |
␉␉self.vKind = [self createStringValueWithKey: @"DAVolumeKind"];␊ |
␉␉self.mediaPath = [self createStringValueWithKey: @"DAMediaPath"];␊ |
␉␉self.devProtocol = [self createStringValueWithKey: @"DADeviceProtocol"];␊ |
␉␉self.bsdName = [[NSString stringWithString:name] retain];␊ |
␉␉␊ |
␉␉devInternal = (bool) [[descDict objectForKey: @"DADeviceInternal"] boolValue];␊ |
␉␉mediaRemovable = (bool) [[descDict objectForKey: @"DAMediaRemovable"] boolValue];␊ |
␉␉self.devInternal = (bool) [[descDict objectForKey: @"DADeviceInternal"] boolValue];␊ |
␉␉self.mediaRemovable = (bool) [[descDict objectForKey: @"DAMediaRemovable"] boolValue];␊ |
␉␉␊ |
␉}␊ |
␉␊ |