Author: ekohl
Date: Sun Nov 27 10:00:24 2011
New Revision: 54505
URL:
http://svn.reactos.org/svn/reactos?rev=54505&view=rev
Log:
[FREELDR]
PcDiskGetDriveGeometry: Try to retrieve the extended disk geometry first.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] Sun Nov 27 10:00:24
2011
@@ -302,11 +302,24 @@
BOOLEAN
PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
{
+ EXTENDED_GEOMETRY ExtGeometry;
REGS RegsIn;
REGS RegsOut;
ULONG Cylinders;
TRACE("DiskGetDriveGeometry()\n");
+
+ /* Try to get the extended geometry first */
+ ExtGeometry.Size = sizeof(EXTENDED_GEOMETRY);
+ if (DiskGetExtendedDriveParameters(DriveNumber, &ExtGeometry, ExtGeometry.Size))
+ {
+ Geometry->Cylinders = ExtGeometry.Cylinders;
+ Geometry->Heads = ExtGeometry.Heads;
+ Geometry->Sectors = ExtGeometry.SectorsPerTrack;
+ Geometry->BytesPerSector = ExtGeometry.BytesPerSector;
+
+ return TRUE;
+ }
/* BIOS Int 13h, function 08h - Get drive parameters
* AH = 08h