From a565eb2d374cc754362b0beabc7114112f584939 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 26 Jan 2012 18:49:50 +0000 Subject: [PATCH] [USETUP] - Merge r55212 and 55215 - Add a temporary hack to allow testing installation on a device not bootable by the BIOS (like USB drives in VirtualBox) - USB devices now show up as installation targets during setup but attempting to install onto them results in setup hanging due to bugs in the USB code svn path=/branches/usb-bringup-trunk/; revision=55217 --- base/setup/usetup/partlist.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/base/setup/usetup/partlist.c b/base/setup/usetup/partlist.c index 2a9b49354b7..2ecca8f3fc8 100644 --- a/base/setup/usetup/partlist.c +++ b/base/setup/usetup/partlist.c @@ -88,12 +88,12 @@ AssignDriverLetters (PPARTLIST List) PARTENTRY, ListEntry); - for (i=0; i<3; i++) + for (i=0; i<4; i++) PartEntry->DriveLetter[i] = 0; if (PartEntry->Unpartitioned == FALSE) { - for (i=0; i<3; i++) + for (i=0; i<4; i++) { if (IsContainerPartition (PartEntry->PartInfo[i].PartitionType)) continue; @@ -374,7 +374,8 @@ ScanForUnpartitionedDiskSpace (PDISKENTRY DiskEntry) PartEntry->PartInfo[j].StartingOffset.QuadPart - (LastStartingOffset + LastPartitionLength); - if (LastUnusedPartitionLength >= DiskEntry->CylinderSize) + if (PartEntry->PartInfo[j].StartingOffset.QuadPart > (LastStartingOffset + LastPartitionLength) && + LastUnusedPartitionLength >= DiskEntry->CylinderSize) { DPRINT ("Unpartitioned disk space %I64u\n", LastUnusedPartitionLength); @@ -718,7 +719,8 @@ AddDiskToList (HANDLE FileHandle, return; } - if (DiskGeometry.MediaType != FixedMedia) + if (DiskGeometry.MediaType != FixedMedia && + DiskGeometry.MediaType != RemovableMedia) { return; } @@ -836,8 +838,12 @@ AddDiskToList (HANDLE FileHandle, if (!DiskEntry->BiosFound) { +#if 0 RtlFreeHeap(ProcessHeap, 0, DiskEntry); return; +#else + DPRINT1("WARNING: Setup could not find a matching BIOS disk entry. Disk %d is not be bootable by the BIOS!\n", DiskNumber); +#endif } InitializeListHead (&DiskEntry->PartListHead);