mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[SETUPLIB][BOOTDATA] Rename "MBRInstallType" to "BootLoaderLocation"
Less hardcoded references to "MBR" for code that should be generic is always better.
This commit is contained in:
parent
259abe59dc
commit
c9c5fd1a18
5 changed files with 28 additions and 26 deletions
|
@ -154,13 +154,13 @@ CheckUnattendedSetup(
|
|||
IsUnattendedSetup = TRUE;
|
||||
DPRINT("Running unattended setup\n");
|
||||
|
||||
/* Search for 'MBRInstallType' in the 'Unattend' section */
|
||||
pSetupData->MBRInstallType = -1;
|
||||
if (SpInfFindFirstLine(UnattendInf, L"Unattend", L"MBRInstallType", &Context))
|
||||
/* Search for 'BootLoaderLocation' in the 'Unattend' section */
|
||||
pSetupData->BootLoaderLocation = 2; // Default to "system partition"
|
||||
if (SpInfFindFirstLine(UnattendInf, L"Unattend", L"BootLoaderLocation", &Context))
|
||||
{
|
||||
if (SpInfGetIntField(&Context, 1, &IntValue))
|
||||
{
|
||||
pSetupData->MBRInstallType = IntValue;
|
||||
pSetupData->BootLoaderLocation = IntValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ typedef struct _USETUP_DATA
|
|||
LONG DestinationDiskNumber;
|
||||
LONG DestinationPartitionNumber;
|
||||
|
||||
LONG MBRInstallType;
|
||||
LONG BootLoaderLocation;
|
||||
LONG FormatPartition;
|
||||
LONG AutoPartition;
|
||||
LONG FsType;
|
||||
|
|
|
@ -3470,15 +3470,15 @@ BootLoaderSelectPage(PINPUT_RECORD Ir)
|
|||
*/
|
||||
if (RepairUpdateFlag)
|
||||
{
|
||||
USetupData.MBRInstallType = 0;
|
||||
USetupData.BootLoaderLocation = 0;
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
/* For unattended setup, skip MBR installation or install on removable disk if needed */
|
||||
if (IsUnattendedSetup)
|
||||
{
|
||||
if ((USetupData.MBRInstallType == 0) ||
|
||||
(USetupData.MBRInstallType == 1))
|
||||
if ((USetupData.BootLoaderLocation == 0) ||
|
||||
(USetupData.BootLoaderLocation == 1))
|
||||
{
|
||||
goto Quit;
|
||||
}
|
||||
|
@ -3493,7 +3493,7 @@ BootLoaderSelectPage(PINPUT_RECORD Ir)
|
|||
if ((SystemPartition->DiskEntry->DiskStyle != PARTITION_STYLE_MBR) ||
|
||||
!IsRecognizedPartition(SystemPartition->PartitionType))
|
||||
{
|
||||
USetupData.MBRInstallType = 1;
|
||||
USetupData.BootLoaderLocation = 1;
|
||||
goto Quit;
|
||||
}
|
||||
#endif
|
||||
|
@ -3501,8 +3501,8 @@ BootLoaderSelectPage(PINPUT_RECORD Ir)
|
|||
/* Is it an unattended install on hdd? */
|
||||
if (IsUnattendedSetup)
|
||||
{
|
||||
if ((USetupData.MBRInstallType == 2) ||
|
||||
(USetupData.MBRInstallType == 3))
|
||||
if ((USetupData.BootLoaderLocation == 2) ||
|
||||
(USetupData.BootLoaderLocation == 3))
|
||||
{
|
||||
goto Quit;
|
||||
}
|
||||
|
@ -3574,25 +3574,25 @@ BootLoaderSelectPage(PINPUT_RECORD Ir)
|
|||
if (Line == 12)
|
||||
{
|
||||
/* Install on both MBR and VBR */
|
||||
USetupData.MBRInstallType = 2;
|
||||
USetupData.BootLoaderLocation = 2;
|
||||
break;
|
||||
}
|
||||
else if (Line == 13)
|
||||
{
|
||||
/* Install on VBR only */
|
||||
USetupData.MBRInstallType = 3;
|
||||
USetupData.BootLoaderLocation = 3;
|
||||
break;
|
||||
}
|
||||
else if (Line == 14)
|
||||
{
|
||||
/* Install on removable disk */
|
||||
USetupData.MBRInstallType = 1;
|
||||
USetupData.BootLoaderLocation = 1;
|
||||
break;
|
||||
}
|
||||
else if (Line == 15)
|
||||
{
|
||||
/* Skip installation */
|
||||
USetupData.MBRInstallType = 0;
|
||||
USetupData.BootLoaderLocation = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3661,7 +3661,7 @@ BootLoaderHardDiskPage(PINPUT_RECORD Ir)
|
|||
NTSTATUS Status;
|
||||
WCHAR DestinationDevicePathBuffer[MAX_PATH];
|
||||
|
||||
if (USetupData.MBRInstallType == 2)
|
||||
if (USetupData.BootLoaderLocation == 2)
|
||||
{
|
||||
/* Step 1: Write the VBR */
|
||||
Status = InstallVBRToPartition(&USetupData.SystemRootPath,
|
||||
|
@ -3737,10 +3737,10 @@ BootLoaderInstallPage(PINPUT_RECORD Ir)
|
|||
RtlCreateUnicodeString(&USetupData.SystemRootPath, PathBuffer);
|
||||
DPRINT1("SystemRootPath: %wZ\n", &USetupData.SystemRootPath);
|
||||
|
||||
if (USetupData.MBRInstallType != 0)
|
||||
if (USetupData.BootLoaderLocation != 0)
|
||||
MUIDisplayPage(BOOTLOADER_INSTALL_PAGE);
|
||||
|
||||
switch (USetupData.MBRInstallType)
|
||||
switch (USetupData.BootLoaderLocation)
|
||||
{
|
||||
/* Skip installation */
|
||||
case 0:
|
||||
|
|
|
@ -11,10 +11,11 @@ DestinationDiskNumber = 0
|
|||
DestinationPartitionNumber = 1
|
||||
InstallationDirectory=ReactOS
|
||||
|
||||
; MBRInstallType=0 skips MBR installation
|
||||
; MBRInstallType=1 install MBR on floppy
|
||||
; MBRInstallType=2 install MBR on hdd
|
||||
MBRInstallType=2
|
||||
; BootLoaderLocation=0 Skip installation
|
||||
; BootLoaderLocation=1 Install on removable media (floppy)
|
||||
; BootLoaderLocation=2 Install on system partition (for MBR disks: MBR and VBR)
|
||||
; BootLoaderLocation=3 Install on VBR only (for MBR disks)
|
||||
BootLoaderLocation=2
|
||||
|
||||
FullName="MyName"
|
||||
;OrgName="MyOrg"
|
||||
|
|
|
@ -11,10 +11,11 @@ DestinationDiskNumber = 0
|
|||
DestinationPartitionNumber = 1
|
||||
InstallationDirectory=ReactOS
|
||||
|
||||
; MBRInstallType=0 skips MBR installation
|
||||
; MBRInstallType=1 install MBR on floppy
|
||||
; MBRInstallType=2 install MBR on hdd
|
||||
MBRInstallType=2
|
||||
; BootLoaderLocation=0 Skip installation
|
||||
; BootLoaderLocation=1 Install on removable media (floppy)
|
||||
; BootLoaderLocation=2 Install on system partition (for MBR disks: MBR and VBR)
|
||||
; BootLoaderLocation=3 Install on VBR only (for MBR disks)
|
||||
BootLoaderLocation=2
|
||||
|
||||
FullName="MyName"
|
||||
;OrgName="MyOrg"
|
||||
|
|
Loading…
Reference in a new issue