Chameleon

Chameleon Commit Details

Date:2010-08-10 13:00:51 (13 years 8 months ago)
Author:Azimutz
Commit:348
Parents: 347
Message:Implementing the lost config=/path-to-boot.plist key.
Changes:
M/branches/azimutz/CleanCut/i386/boot2/options.c
M/branches/azimutz/CleanCut/i386/libsaio/stringTable.c
M/branches/azimutz/CleanCut/i386/boot2/boot.h

File differences

branches/azimutz/CleanCut/i386/libsaio/stringTable.c
650650
651651
652652
653
653
654
655
654656
657
658
659
660
661
662
663
664
665
655666
656667
657668
*/
int loadOverrideConfig(config_file_t *config)
{
int count, ret, fd;
char dirSpecBplist[128] = ""; //Azi:alloc - reminder
const char*override_pathname = NULL;
int count, ret, fd, len = 0;
// Take in account user overriding the override :P
if (getValueForKey(kTestConfigKey, &override_pathname, &len, &bootInfo->bootConfig))
{
// Specify a path to a file, e.g. config=/Extra/test.plist
strcpy(dirSpecBplist, override_pathname);
fd = open(dirSpecBplist, 0);
if (fd >= 0) goto success_fd;
}
success_fd:
if (fd >= 0)
branches/azimutz/CleanCut/i386/boot2/boot.h
9696
9797
9898
99
99100
100101
101102
#define kEHCIhard"EHCIhard"// usb.c
#define kDefaultPartition"Default Partition"// sys.c
#define kMD0Image"md0"// ramdisk.h
#define kTestConfigKey"config"// stringTable.c
#define kCanOverrideKey"CanOverride"// stringTable.c
/*
branches/azimutz/CleanCut/i386/boot2/options.c
11691169
11701170
11711171
1172
1172
1173
11731174
1174
11751175
11761176
11771177
......
11791179
11801180
11811181
1182
1182
11831183
11841184
11851185
// trying to load the config file anyway.
else
return -1;
//Azi: implemented at loadOverrideConfig.
// Load config table specified by the user, or use the default.
//Azi: not working.
//if (!getValueForBootKey(cp, "config", &val, &cnt)) {
// val = 0;
// cnt = 0;
// Load com.apple.Boot.plist from the selected volume
// and use its contents to override default bootConfig.
// This is not a mandatory opeartion anymore.
// This is not a mandatory operation anymore.
loadOverrideConfig(&bootInfo->overrideConfig);

Archive Download the corresponding diff file

Revision: 348