Chameleon

Chameleon Commit Details

Date:2015-03-12 05:50:25 (5 years 8 months ago)
Author:ErmaC
Commit:2624
Parents: 2623
Message:Add sizeof for archCpuType.
Changes:
M/trunk/i386/boot2/boot.c

File differences

trunk/i386/boot2/boot.c
622622
623623
624624
625
625
626626
627
628
629
630
627631
628632
633
634
635
636
629637
630638
631639
632
640
633641
634642
635643
......
751759
752760
753761
754
755
756
762
763
764
757765
758766
759767
if (getValueForKey(karch, &val, &len, &bootInfo->chameleonConfig))
{
if (strncmp(val, "i386", 4) == 0)
if (strncmp(val, "x86_64", sizeof("x86_64") ) == 0)
{
archCpuType = CPU_TYPE_X86_64;
}
else if (strncmp(val, "i386", sizeof("i386") ) == 0)
{
archCpuType = CPU_TYPE_I386;
}
else
{
DBG("Incorrect parameter for option 'arch =' , please use x86_64 or i386\n");
}
}
if (getValueForKey(kKernelArchKey, &val, &len, &bootInfo->chameleonConfig)) {
if (strncmp(val, "i386", 4) == 0)
if (strncmp(val, "i386", sizeof("i386") ) == 0)
{
archCpuType = CPU_TYPE_I386;
}
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)
if (strncmp(bootInfo->bootFile, "bt(", sizeof("bt(") ) == 0 ||
strncmp(bootInfo->bootFile, "hd(", sizeof("hd(") ) == 0 ||
strncmp(bootInfo->bootFile, "rd(", sizeof("rd(") ) == 0)
bootFileWithDevice = true;
// bootFile must start with a / if it not start with a device name

Archive Download the corresponding diff file

Revision: 2624