Index: trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm =================================================================== --- trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm (revision 369) +++ trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm (revision 370) @@ -122,11 +122,6 @@ 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) @@ -139,7 +134,7 @@ 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; } @@ -156,15 +151,19 @@ } 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]; } Index: trunk/ChameleonPrefPane/test_util/test_util.mm =================================================================== --- trunk/ChameleonPrefPane/test_util/test_util.mm (revision 369) +++ trunk/ChameleonPrefPane/test_util/test_util.mm (revision 370) @@ -57,7 +57,8 @@ NSArray* arr = [PartitionInfoElement createBSDPartitionList]; NSLog(@"List of existing bsd disk partitions:\n %@", arr); - for (PartitionInfoElement* part in [PartsInfoMgr parts]) NSLog(@"PartionBootable = %i\n%@", (int) [part isBootable], part); + for (PartitionInfoElement* part in [PartsInfoMgr parts]) + NSLog(@"PartionBootable = %i\n%@", (int) [part isBootable], part); /* [PartsInfoMgr hideParts: @"\"Macintosh HD\" hd(0,3)"]; [PartsInfoMgr hideParts: @"disk0s2 hd(0,2) "];