Chameleon

Chameleon Commit Details

Date:2010-08-01 13:23:53 (8 years 11 months ago)
Author:Daniel Miranda
Commit:293
Parents: 292
Message:Updated BootHelp.txt with information for specifying partitions as labels.
Changes:
M/branches/danielkza/doc/BootHelp.txt
M/branches/danielkza/Chameleon.xcodeproj/project.pbxproj
M/branches/danielkza/i386/libsaio/disk.c

File differences

branches/danielkza/doc/BootHelp.txt
4747
4848
4949
50
51
50
51
52
5253
53
54
55
56
57
58
59
60
5461
55
56
57
5862
5963
6064
"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
=<UUID> 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 <alias> Where partition is hd(x,y), UUID or label enclosed
[;partition2 <alias2> in quotes. The alias can optionally be quoted too.
...]
"Rename Partition" Rename partition(s) for the boot menu.
=hd(x,y) <alias> [;hd(m,n) <alias2> ...]
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).
branches/danielkza/Chameleon.xcodeproj/project.pbxproj
473473
474474
475475
476
477476
478477
479478
......
499498
500499
501500
501
502502
503503
504504
B0056D2411F3868000754B65 /* libsaio */ = {
isa = PBXGroup;
children = (
65ED53931204B83200B22507 /* disk.h */,
B0056D2511F3868000754B65 /* acpi.h */,
B0056D2611F3868000754B65 /* acpi_patcher.c */,
B0056D2711F3868000754B65 /* acpi_patcher.h */,
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 */,
branches/danielkza/i386/libsaio/disk.c
17531753
17541754
17551755
1756
1756
17571757
1758
1759
1760
1758
1759
1760
17611761
17621762
1763
1763
1764
17641765
17651766
1766
1767
1768
1767
1768
17691769
17701770
17711771
17721772
17731773
1774
1774
17751775
17761776
17771777
17781778
1779
1779
17801780
17811781
17821782
17831783
1784
1784
17851785
17861786
17871787
......
17911791
17921792
17931793
1794
1794
17951795
1796
1796
17971797
17981798
1799
1799
18001800
18011801
18021802
1803
1804
1805
18061803
1804
1805
1806
18071807
18081808
1809
1809
18101810
18111811
18121812
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;
}
}
/* 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';

Archive Download the corresponding diff file

Revision: 293