Index: branches/danielkza/doc/BootHelp.txt =================================================================== --- branches/danielkza/doc/BootHelp.txt (revision 292) +++ branches/danielkza/doc/BootHelp.txt (revision 293) @@ -47,14 +47,18 @@ "Instant Menu"=Yes Force displaying the partition selection menu. "Default Partition" Sets the default boot partition, - =hd(x,y)| where 'x' & 'y' are the disk and partition numbers - = or specify the selected volume UUID string. + =hd(x,y)|UUID|"Label" Specified as a disk/partition pair, an UUID, or a + label enclosed in quotes. + "Hide Partition" Remove unwanted partition(s) from the boot menu. - =hd(x,y) [hd(m,n)] only non mac osx boot partitions can be hidden. + =partition Specified, possibly multiple times, as hd(x,y), an + [;partition2 ...] UUID or label enclosed in quotes. + + "Rename Partition" Rename partition(s) for the boot menu. + =partition Where partition is hd(x,y), UUID or label enclosed + [;partition2 in quotes. The alias can optionally be quoted too. + ...] - "Rename Partition" Rename partition(s) for the boot menu. - =hd(x,y) [;hd(m,n) ...] - GUI=No Disable the GUI (enabled by default). "Boot Banner"=Yes|No Show boot banner in GUI mode (enabled by default). "Legacy Logo"=Yes|No Use the legacy grey apple logo (disabled by default). Index: branches/danielkza/Chameleon.xcodeproj/project.pbxproj =================================================================== --- branches/danielkza/Chameleon.xcodeproj/project.pbxproj (revision 292) +++ branches/danielkza/Chameleon.xcodeproj/project.pbxproj (revision 293) @@ -473,7 +473,6 @@ B0056D2411F3868000754B65 /* libsaio */ = { isa = PBXGroup; children = ( - 65ED53931204B83200B22507 /* disk.h */, B0056D2511F3868000754B65 /* acpi.h */, B0056D2611F3868000754B65 /* acpi_patcher.c */, B0056D2711F3868000754B65 /* acpi_patcher.h */, @@ -499,6 +498,7 @@ B0056D3911F3868000754B65 /* device_tree.c */, B0056D3A11F3868000754B65 /* device_tree.h */, B0056D3B11F3868000754B65 /* disk.c */, + 65ED53931204B83200B22507 /* disk.h */, 0172D0DC11FB66820030222E /* dram_controllers.h */, 0172D0DD11FB66820030222E /* dram_controllers.c */, B0056D3C11F3868000754B65 /* efi.h */, Index: branches/danielkza/i386/libsaio/disk.c =================================================================== --- branches/danielkza/i386/libsaio/disk.c (revision 292) +++ branches/danielkza/i386/libsaio/disk.c (revision 293) @@ -1753,35 +1753,35 @@ bool getVolumeLabelAlias( BVRef bvr, char* str, long strMaxLen) { /* The format for the rename string is the following: - hd(x,y)|uuid|"label" "alias";hd(m,n)|uuid|"label" etc; ... + * hd(x,y)|uuid|"label" "alias";hd(m,n)|uuid|"label" etc; ... */ - char *aliasList; - char *next; - if( !str || strMaxLen <= 0) + char *aliasList, *next; + + if ( !str || strMaxLen <= 0) return false; - if( !(aliasList = XMLDecode(getStringForKey(kRenamePartition, &bootInfo->bootConfig))) ) + aliasList = XMLDecode(getStringForKey(kRenamePartition, &bootInfo->bootConfig))); + if ( !aliasList ) return false; - for(next = aliasList; - next && *next; - ) + next = aliasList; + while ( next && *next ) { char *start, *aliasStart, *aliasEnd; char *ret; start = aliasStart = (char*)matchVolumeToString(bvr, next, true); - if(!start || !*start) + if ( !start || !*start ) break; /* Find and delimit the current entry's end */ next = strstr(start, ";"); - if(next) + if ( next ) { /* Not enough characters for a successful match: we'd need at least * one space and another char. before the semicolon */ - if(next-start < 2) { + if ( next-start < 2 ) { next++; continue; } @@ -1791,22 +1791,22 @@ } /* Check for at least one space, but ignore the rest of them */ - while(isspace(*aliasStart)) + while ( isspace(*aliasStart) ) aliasStart++; - if(start == aliasStart) + if ( start == aliasStart ) continue; - switch(*aliasStart) + switch ( *aliasStart ) { case '\0': break; - /* If the string is quoted, skip the starting quote, find the ending - * one, and zero it to end the string. - * If we succeed, fall-through to the final copy-and-cleanup part */ case '"': + /* If a starting quote is found, skip it, then find the ending one, + * and replace it for a string terminator. + */ aliasStart++; aliasEnd = strstr(aliasStart, "\""); - if(!aliasEnd || aliasStart == aliasEnd) + if ( !aliasEnd || aliasStart == aliasEnd ) break; *aliasEnd = '\0';