mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Fix a couple more assumptions about first primary partition being the active one.
- If no active partitions found, set active primary partition number to 0. This fixes uninitialized variable usage, which revealed itself as a bug with unattended setup. - Silence a DPRINT1. svn path=/trunk/; revision=40438
This commit is contained in:
parent
b3c86c2ac0
commit
b6f258cefd
2 changed files with 6 additions and 3 deletions
|
@ -3345,7 +3345,8 @@ BootLoaderPage(PINPUT_RECORD Ir)
|
|||
|
||||
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
|
||||
|
||||
PartitionType = PartitionList->ActiveBootPartition->PartInfo[0].PartitionType;
|
||||
PartitionType = PartitionList->ActiveBootPartition->
|
||||
PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionType;
|
||||
|
||||
if (PartitionType == PARTITION_ENTRY_UNUSED)
|
||||
{
|
||||
|
@ -3518,7 +3519,8 @@ BootLoaderHarddiskPage(PINPUT_RECORD Ir)
|
|||
UCHAR PartitionType;
|
||||
NTSTATUS Status;
|
||||
|
||||
PartitionType = PartitionList->ActiveBootPartition->PartInfo[0].PartitionType;
|
||||
PartitionType = PartitionList->ActiveBootPartition->
|
||||
PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionType;
|
||||
if ((PartitionType == PARTITION_FAT_12) ||
|
||||
(PartitionType == PARTITION_FAT_16) ||
|
||||
(PartitionType == PARTITION_HUGE) ||
|
||||
|
|
|
@ -2361,6 +2361,7 @@ CheckActiveBootPartition (PPARTLIST List)
|
|||
/* FIXME: Might be incorrect if partitions were created by Linux FDISK */
|
||||
List->ActiveBootDisk = DiskEntry;
|
||||
List->ActiveBootPartition = PartEntry;
|
||||
List->ActiveBootPartitionNumber = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -2391,7 +2392,7 @@ CheckActiveBootPartition (PPARTLIST List)
|
|||
List->ActiveBootPartition = PartEntry;
|
||||
List->ActiveBootPartitionNumber = i;
|
||||
|
||||
DPRINT1("Found bootable partition disk %d, drive letter %c\n",
|
||||
DPRINT("Found bootable partition disk %d, drive letter %c\n",
|
||||
DiskEntry->BiosDiskNumber, PartEntry->DriveLetter[i]);
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue