Make disk partition handling architecture dependent, as not
[reactos.git] / reactos / boot / freeldr / freeldr / linuxboot.c
index fa1df78..255c9ea 100644 (file)
 
 PLINUX_BOOTSECTOR      LinuxBootSector = NULL;
 PLINUX_SETUPSECTOR     LinuxSetupSector = NULL;
-ULONG                                  SetupSectorSize = 0;
-BOOL                           NewStyleLinuxKernel = FALSE;
-ULONG                                  LinuxKernelSize = 0;
-ULONG                                  LinuxInitrdSize = 0;
-UCHAR                          LinuxKernelName[260];
-UCHAR                          LinuxInitrdName[260];
-BOOL                           LinuxHasInitrd = FALSE;
-UCHAR                          LinuxCommandLine[260] = "";
-ULONG                                  LinuxCommandLineSize = 0;
-PVOID                          LinuxKernelLoadAddress = NULL;
-PVOID                          LinuxInitrdLoadAddress = NULL;
-UCHAR                          LinuxBootDescription[80];
+ULONG                  SetupSectorSize = 0;
+BOOL                   NewStyleLinuxKernel = FALSE;
+ULONG                  LinuxKernelSize = 0;
+ULONG                  LinuxInitrdSize = 0;
+UCHAR                  LinuxKernelName[260];
+UCHAR                  LinuxInitrdName[260];
+BOOL                   LinuxHasInitrd = FALSE;
+UCHAR                  LinuxCommandLine[260] = "";
+ULONG                  LinuxCommandLineSize = 0;
+PVOID                  LinuxKernelLoadAddress = NULL;
+PVOID                  LinuxInitrdLoadAddress = NULL;
+UCHAR                  LinuxBootDescription[80];
+UCHAR                  LinuxBootPath[260] = "";
 
 VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description)
 {
@@ -80,7 +81,7 @@ VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description)
        }
 
        // Open the boot volume
-       if (!FsOpenVolume(BootDrive, BootPartition))
+       if (!FsOpenSystemVolume(LinuxBootPath, NULL, NULL))
        {
                UiMessageBox("Failed to open boot drive.");
                goto LinuxBootFailed;
@@ -226,8 +227,7 @@ LinuxBootFailed:
 BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
 {
        UCHAR   SettingName[260];
-       UCHAR   SettingValue[260];
-       ULONG           SectionId;
+       ULONG   SectionId;
 
        // Find all the message box settings and run them
        UiShowMessageBoxesInSection(OperatingSystemName);
@@ -240,20 +240,12 @@ BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
                return FALSE;
        }
 
-       if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 260))
+       if (!IniReadSettingByName(SectionId, "BootPath", LinuxBootPath, 260))
        {
-               UiMessageBox("Boot drive not specified for selected OS!");
+               UiMessageBox("Boot path not specified for selected OS!");
                return FALSE;
        }
 
-       BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
-
-       BootPartition = 0;
-       if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 260))
-       {
-               BootPartition = atoi(SettingValue);
-       }
-
        // Get the kernel name
        if (!IniReadSettingByName(SectionId, "Kernel", LinuxKernelName, 260))
        {