Merge 15285:15334 from trunk
Modified: branches/xen/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
Modified: branches/xen/reactos/boot/freeldr/freeldr/arch/i386/machxen.c
Modified: branches/xen/reactos/boot/freeldr/freeldr/disk/partition.c
Property changes on: branches/xen/reactos/boot/freeldr/freeldr
___________________________________________________________________
Name: lastmerge
- 15285
+ 15334
_____
Modified: branches/xen/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
--- branches/xen/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
2005-05-16 11:06:57 UTC (rev 15334)
+++ branches/xen/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
2005-05-16 11:10:12 UTC (rev 15335)
@@ -206,9 +206,27 @@
// Partition requested was zero which means the boot
partition
if (! DiskGetActivePartitionEntry(i386BootDrive,
&PartitionTableEntry))
{
+ /* Try partition-less disk */
+ *StartSector = 0;
+ *SectorCount = 0;
+ }
+ /* Check for valid partition */
+ else if (PartitionTableEntry.SystemIndicator ==
PARTITION_ENTRY_UNUSED)
+ {
return FALSE;
}
+ else
+ {
+ *StartSector =
PartitionTableEntry.SectorCountBeforePartition;
+ *SectorCount =
PartitionTableEntry.PartitionSectorCount;
+ }
}
+ else if (0xff == i386BootPartition)
+ {
+ /* Partition-less disk */
+ *StartSector = 0;
+ *SectorCount = 0;
+ }
else
{
// Get requested partition
@@ -216,25 +234,26 @@
{
return FALSE;
}
+ /* Check for valid partition */
+ else if (PartitionTableEntry.SystemIndicator ==
PARTITION_ENTRY_UNUSED)
+ {
+ return FALSE;
+ }
+ else
+ {
+ *StartSector =
PartitionTableEntry.SectorCountBeforePartition;
+ *SectorCount =
PartitionTableEntry.PartitionSectorCount;
+ }
}
- // Check for valid partition
- if (PartitionTableEntry.SystemIndicator ==
PARTITION_ENTRY_UNUSED)
- {
- return FALSE;
- }
-
// Try to recognize the file system
- if (!FsRecognizeVolume(i386BootDrive,
PartitionTableEntry.SectorCountBeforePartition, &VolumeType))
+ if (!FsRecognizeVolume(i386BootDrive, *StartSector,
&VolumeType))
{
return FALSE;
}
*DriveNumber = i386BootDrive;
- *StartSector = PartitionTableEntry.SectorCountBeforePartition;
- *SectorCount = PartitionTableEntry.PartitionSectorCount;
- //switch (PartitionTableEntry.SystemIndicator)
switch (VolumeType)
{
case PARTITION_FAT_12:
_____
Modified: branches/xen/reactos/boot/freeldr/freeldr/arch/i386/machxen.c
--- branches/xen/reactos/boot/freeldr/freeldr/arch/i386/machxen.c
2005-05-16 11:06:57 UTC (rev 15334)
+++ branches/xen/reactos/boot/freeldr/freeldr/arch/i386/machxen.c
2005-05-16 11:10:12 UTC (rev 15335)
@@ -185,7 +185,7 @@
/* Start freeldr */
XenActive = TRUE;
i386BootDrive = 0x80;
-// i386BootPartition = 0xff;
+ i386BootPartition = 0xff;
BootMain(XenStartInfo->cmd_line);
/* Shouldn't get here */
_____
Modified: branches/xen/reactos/boot/freeldr/freeldr/disk/partition.c
--- branches/xen/reactos/boot/freeldr/freeldr/disk/partition.c
2005-05-16 11:06:57 UTC (rev 15334)
+++ branches/xen/reactos/boot/freeldr/freeldr/disk/partition.c
2005-05-16 11:10:12 UTC (rev 15335)
@@ -63,12 +63,12 @@
// Make sure there was only one bootable partition
if (BootablePartitionCount == 0)
{
- DiskError("No bootable (active) partitions found.", 0);
+ DbgPrint((DPRINT_DISK, "No bootable (active) partitions
found.\n"));
return FALSE;
}
else if (BootablePartitionCount != 1)
{
- DiskError("Too many bootable (active) partitions
found.", 0);
+ DbgPrint((DPRINT_DISK, "Too many bootable (active)
partitions found.\n"));
return FALSE;
}