Author: fireball
Date: Fri Apr 10 17:27:09 2009
New Revision: 40438
URL:
http://svn.reactos.org/svn/reactos?rev=40438&view=rev
Log:
- 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.
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/partlist.c
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Fri Apr 10 17:27:09
2009
@@ -3345,7 +3345,8 @@
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 @@
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) ||
Modified: trunk/reactos/base/setup/usetup/partlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Fri Apr 10 17:27:09 2009
@@ -2361,6 +2361,7 @@
/* 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 @@
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;