Chameleon Applications

Chameleon Applications Commit Details

Date:2011-11-22 16:55:47 (12 years 4 months ago)
Author:Rekursor
Commit:366
Parents: 365
Message:filtering bad or virtual disks from the list
Changes:
M/trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm
M/trunk/ChameleonPrefPane/Sources/PartitionInfoManager.mm

File differences

trunk/ChameleonPrefPane/Sources/PartitionInfoManager.mm
214214
215215
216216
217
217
218218
219219
220220
+(void)swapHD: (NSUInteger) src with:(NSUInteger) dst
{
if(src < 0 || src > MAX_HD-1 || dst < 0 || dst > MAX_HD-1) return;
if(src > MAX_HD-1 || dst > MAX_HD-1) return;
PartitionInfoElement.hdRedirTable[src]=dst;
PartitionInfoElement.hdRedirTable[dst]=src;
trunk/ChameleonPrefPane/Sources/PartitionInfoElement.mm
7777
7878
7979
80
80
81
82
83
84
85
86
8187
8288
8389
......
181187
182188
183189
184
190
185191
186192
187193
/// return true if partition extraction successfully executed, false otherwise
-(bool) isValid
{
return err==0;
return (
err==0
// && [self isBootable] don't hide non bootable disk for now to be in sync
// with chameleon as much as possible
&& ![[self devProtocol] isEqual:@"Virtual Interface"]
);
}
/// Extract a particular information from the disk partition dictionary from a key, generate a string value output
{
PartitionInfoElement* elt =
[[PartitionInfoElement alloc] initWithBSDName: part withinSession: session];
if (elt!=nil && [[elt vName] length] >0)
if (elt!=nil && [[elt vName] length] >0 && [elt isValid] )
[arr addObject:elt];
}
if (session!=nil) CFRelease(session);

Archive Download the corresponding diff file

Revision: 366