Index: boot/freeldr/freeldr/linuxboot.c =================================================================== --- boot/freeldr/freeldr/linuxboot.c (revision 74628) +++ boot/freeldr/freeldr/linuxboot.c (working copy) @@ -372,33 +372,27 @@ BOOLEAN LinuxCheckKernelVersion(VOID) { - /* Just assume old kernel until we find otherwise */ + /* Assume that the kernel version is older */ NewStyleLinuxKernel = FALSE; /* Check for new style setup header */ - if (LinuxSetupSector->SetupHeaderSignature != LINUX_SETUP_HEADER_ID) + if (LinuxSetupSector->SetupHeaderSignature == LINUX_SETUP_HEADER_ID) { - NewStyleLinuxKernel = FALSE; + /* Check to see if the Linux kernel is recent or not (version 2.0+) */ + if (LinuxSetupSector->Version >= 0x0200) + { + NewStyleLinuxKernel = TRUE; + + /* Check for version 2.01+ */ + if (LinuxSetupSector->Version >= 0x0201) + { + LinuxSetupSector->HeapEnd = 0x9000; + LinuxSetupSector->LoadFlags |= LINUX_FLAG_CAN_USE_HEAP; + } + } } - /* Check for version below 2.0 */ - else if (LinuxSetupSector->Version < 0x0200) - { - NewStyleLinuxKernel = FALSE; - } - /* Check for version 2.0 */ - else if (LinuxSetupSector->Version == 0x0200) - { - NewStyleLinuxKernel = TRUE; - } - /* Check for version 2.01+ */ - else if (LinuxSetupSector->Version >= 0x0201) - { - NewStyleLinuxKernel = TRUE; - LinuxSetupSector->HeapEnd = 0x9000; - LinuxSetupSector->LoadFlags |= LINUX_FLAG_CAN_USE_HEAP; - } - if ((NewStyleLinuxKernel == FALSE) && (LinuxHasInitrd)) + if (!NewStyleLinuxKernel && LinuxHasInitrd) { UiMessageBox("Error: Cannot load a ramdisk (initrd) with an old kernel image."); return FALSE;