mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[FREELDR]
PcDiskGetDriveGeometry: Try to retrieve the extended disk geometry first. svn path=/trunk/; revision=54505
This commit is contained in:
parent
320ca8654d
commit
02a1138b90
1 changed files with 13 additions and 0 deletions
|
@ -302,12 +302,25 @@ BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULON
|
|||
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
|
||||
* DL = drive (bit 7 set for hard disk)
|
||||
|
|
Loading…
Reference in a new issue