Chameleon

Chameleon Commit Details

Date:2011-08-21 20:10:17 (12 years 7 months ago)
Author:JrCs
Commit:1447
Parents: 1446
Message:Fix issue #153: Cannot find kernel error from build 1443
Changes:
M/trunk/i386/boot2/boot.c

File differences

trunk/i386/boot2/boot.c
634634
635635
636636
637
638
639
637
638
639
640
641
642
643
644
645
646
640647
641648
642649
643650
644651
645
652
646653
647654
648655
......
679686
680687
681688
682
683689
684690
685691
......
687693
688694
689695
696
697
690698
691699
692700
break;
}
// bootFile must start with a /
if ((bootInfo->bootFile)[0] != '/')
sprintf(bootFile, "/%s", bootInfo->bootFile);
bool bootFileWithDevice = false;
// Check if bootFile start with a device ex: bt(0,0)/Extra/mach_kernel
if (strncmp(bootInfo->bootFile,"bt(",3) == 0 ||
strncmp(bootInfo->bootFile,"hd(",3) == 0 ||
strncmp(bootInfo->bootFile,"rd(",3) == 0)
bootFileWithDevice = true;
// bootFile must start with a / if it not start with a device name
if (!bootFileWithDevice && (bootInfo->bootFile)[0] != '/')
sprintf(bootFile, "/%s", bootInfo->bootFile); // append a leading /
else
strcpy(bootFile, bootInfo->bootFile);
// Try to load kernel image from alternate locations on boot helper partitions.
ret = -1;
if (gBootVolume->flags & kBVFlagBooter) {
if ((gBootVolume->flags & kBVFlagBooter) && !bootFileWithDevice) {
sprintf(bootFilePath, "com.apple.boot.P%s", bootFile);
ret = GetFileInfo(NULL, bootFilePath, &flags, &time);
if (ret == -1)
if (ret <= 0) {
printf("Can't find %s\n", bootFile);
sleep(1);
if (gBootFileType == kNetworkDeviceType) {
gUnloadPXEOnExit = false;
break;
}
pause();
} else {
/* Won't return if successful. */
ret = ExecKernel(binary);

Archive Download the corresponding diff file

Revision: 1447