Chameleon

Chameleon Commit Details

Date:2010-08-10 12:31:31 (8 years 11 months ago)
Author:Azimutz
Commit:347
Parents: 346
Message:Clean the room & make the bed... This stuff is a bit like the one on LoadDrivers(), /Extra path always checked; this Boot.plist override is always performed and there's very little info about this. I found my self many times wondering if i was going nuts, because of this ignorance. As it was, with the exception for rd, we were checking again the same paths we just checked with loadSystemConfig?! And no checking for rdbt. Need advice on this and also can't test raid helper partitions. But, with the current search algo i'm sure of some stuff and i did said that all functionality would be kept...
Changes:
M/branches/azimutz/CleanCut/i386/libsaio/stringTable.c

File differences

branches/azimutz/CleanCut/i386/libsaio/stringTable.c
650650
651651
652652
653
654
655
656
657
658
659
660
653
654
655
656
657
658
659
660
661
661662
662
663
664
663
664
665
666
667
668
665669
666
667
668
669
670
671
672
673
674
675
676
677
670
671
678672
679673
680674
*/
int loadOverrideConfig(config_file_t *config)
{
char *dirspec[] = {
"rd(0,0)/Extra/com.apple.Boot.plist",
"/Extra/com.apple.Boot.plist",
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.R/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.S/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
};
int count, ret, fd;
success_fd:
if (fd >= 0)
{
// read file
count = read(fd, config->plist, IO_CONFIG_DATA_SIZE);
close(fd);
int i, fd, count, ret=-1;
for(i = 0; i< sizeof(dirspec)/sizeof(dirspec[0]); i++)
// build xml dictionary
ParseXMLFile(config->plist, &config->dictionary);
sysConfigValid = true;
ret = 0;
}
else
{
if ((fd = open(dirspec[i], 0)) >= 0)
{
// read file
count = read(fd, config->plist, IO_CONFIG_DATA_SIZE);
close(fd);
// build xml dictionary
ParseXMLFile(config->plist, &config->dictionary);
sysConfigValid = true;
ret=0;
break;
}
printf("No override config provided!\n");
ret = -1;
}
return ret;
}

Archive Download the corresponding diff file

Revision: 347