Author: pschweitzer
Date: Tue Oct 12 20:17:55 2010
New Revision: 49129
URL:
http://svn.reactos.org/svn/reactos?rev=49129&view=rev
Log:
[CLASS2]
Switch use from DISK_GEOMETRY to DISK_GEOMETRY_EX. It's needed to handle some Windows
2003's kernel routines.
[CDROM]
Reflect changes in Class2.
[DISK]
Reflect changes in Class2.
Also added support for IOCTL_DISK_GET_DRIVE_GEOMETRY_EX.
Modified:
trunk/reactos/drivers/storage/class/cdrom/cdrom.c
trunk/reactos/drivers/storage/class/class2/class2.c
trunk/reactos/drivers/storage/class/disk/disk.c
trunk/reactos/drivers/storage/class/include/class2.h
Modified: trunk/reactos/drivers/storage/class/cdrom/cdrom.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/class/cdrom/cdrom.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/cdrom/cdrom.c [iso-8859-1] Tue Oct 12 20:17:55
2010
@@ -955,7 +955,7 @@
//
deviceExtension->DiskGeometry =
- ExAllocatePool(NonPagedPool, sizeof(DISK_GEOMETRY));
+ ExAllocatePool(NonPagedPool, sizeof(DISK_GEOMETRY_EX));
if (deviceExtension->DiskGeometry == NULL) {
@@ -1006,7 +1006,7 @@
//
status = ScsiClassReadDriveCapacity(deviceObject);
- bps = deviceExtension->DiskGeometry->BytesPerSector;
+ bps = deviceExtension->DiskGeometry->Geometry.BytesPerSector;
if (!NT_SUCCESS(status) || !bps) {
@@ -1037,7 +1037,7 @@
bps = 1 << lastBit;
}
- deviceExtension->DiskGeometry->BytesPerSector = bps;
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector = bps;
DebugPrint((2, "CreateCdRomDeviceObject: Calc'd bps = %x\n", bps));
//
@@ -2828,12 +2828,12 @@
startingOffset.QuadPart = currentIrpStack->Parameters.Read.ByteOffset.QuadPart +
transferByteCount;
- if (!deviceExtension->DiskGeometry->BytesPerSector) {
- deviceExtension->DiskGeometry->BytesPerSector = 2048;
+ if (!deviceExtension->DiskGeometry->Geometry.BytesPerSector) {
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector = 2048;
}
if ((startingOffset.QuadPart > deviceExtension->PartitionLength.QuadPart) ||
- (transferByteCount & (deviceExtension->DiskGeometry->BytesPerSector -
1))) {
+ (transferByteCount &
(deviceExtension->DiskGeometry->Geometry.BytesPerSector - 1))) {
DebugPrint((1,"ScsiCdRomRead: Invalid I/O parameters\n"));
DebugPrint((1, "\toffset %x:%x, Length %x:%x\n",
@@ -2841,7 +2841,7 @@
startingOffset.u.LowPart,
deviceExtension->PartitionLength.u.HighPart,
deviceExtension->PartitionLength.u.LowPart));
- DebugPrint((1, "\tbps %x\n",
deviceExtension->DiskGeometry->BytesPerSector));
+ DebugPrint((1, "\tbps %x\n",
deviceExtension->DiskGeometry->Geometry.BytesPerSector));
//
// Fail request with status of invalid parameters.
@@ -3059,11 +3059,11 @@
bps = 1 << lastBit;
}
- deviceExtension->DiskGeometry->BytesPerSector = bps;
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector = bps;
DebugPrint((2,
"CdRomDeviceControlCompletion: Calculated bps %#x\n",
- deviceExtension->DiskGeometry->BytesPerSector));
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector));
//
// Copy last sector in reverse byte order.
@@ -3082,7 +3082,7 @@
WHICH_BIT(bps, deviceExtension->SectorShift);
DebugPrint((2,"SCSI ScsiClassReadDriveCapacity: Sector size is
%d\n",
- deviceExtension->DiskGeometry->BytesPerSector));
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector));
DebugPrint((2,"SCSI ScsiClassReadDriveCapacity: Number of Sectors is
%d\n",
lastSector + 1));
@@ -3097,7 +3097,7 @@
// Calculate number of cylinders.
//
- deviceExtension->DiskGeometry->Cylinders.QuadPart =
(LONGLONG)((lastSector + 1)/(32 * 64));
+ deviceExtension->DiskGeometry->Geometry.Cylinders.QuadPart =
(LONGLONG)((lastSector + 1)/(32 * 64));
deviceExtension->PartitionLength.QuadPart =
(deviceExtension->PartitionLength.QuadPart <<
deviceExtension->SectorShift);
@@ -3108,7 +3108,7 @@
// This device supports removable media.
//
- deviceExtension->DiskGeometry->MediaType = RemovableMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType =
RemovableMedia;
} else {
@@ -3116,20 +3116,20 @@
// Assume media type is fixed disk.
//
- deviceExtension->DiskGeometry->MediaType = FixedMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType = FixedMedia;
}
//
// Assume sectors per track are 32;
//
- deviceExtension->DiskGeometry->SectorsPerTrack = 32;
+ deviceExtension->DiskGeometry->Geometry.SectorsPerTrack = 32;
//
// Assume tracks per cylinder (number of heads) is 64.
//
- deviceExtension->DiskGeometry->TracksPerCylinder = 64;
+ deviceExtension->DiskGeometry->Geometry.TracksPerCylinder = 64;
//
// Copy the device extension's geometry info into the user buffer.
@@ -6530,7 +6530,7 @@
//
from = (PFOUR_BYTE) &readCapacityBuffer->BytesPerBlock;
- to = (PFOUR_BYTE) &deviceExtension->DiskGeometry->BytesPerSector;
+ to = (PFOUR_BYTE)
&deviceExtension->DiskGeometry->Geometry.BytesPerSector;
to->Byte0 = from->Byte3;
to->Byte1 = from->Byte2;
to->Byte2 = from->Byte1;
@@ -6540,7 +6540,7 @@
// Using the new BytesPerBlock, calculate and store the SectorShift.
//
- WHICH_BIT(deviceExtension->DiskGeometry->BytesPerSector,
deviceExtension->SectorShift);
+ WHICH_BIT(deviceExtension->DiskGeometry->Geometry.BytesPerSector,
deviceExtension->SectorShift);
//
// Copy last sector in reverse byte order.
@@ -6558,22 +6558,22 @@
// Calculate number of cylinders.
//
- deviceExtension->DiskGeometry->Cylinders.QuadPart = (LONGLONG)((lastSector
+ 1)/(32 * 64));
+ deviceExtension->DiskGeometry->Geometry.Cylinders.QuadPart =
(LONGLONG)((lastSector + 1)/(32 * 64));
deviceExtension->PartitionLength.QuadPart =
(deviceExtension->PartitionLength.QuadPart <<
deviceExtension->SectorShift);
- deviceExtension->DiskGeometry->MediaType = RemovableMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType = RemovableMedia;
//
// Assume sectors per track are 32;
//
- deviceExtension->DiskGeometry->SectorsPerTrack = 32;
+ deviceExtension->DiskGeometry->Geometry.SectorsPerTrack = 32;
//
// Assume tracks per cylinder (number of heads) is 64.
//
- deviceExtension->DiskGeometry->TracksPerCylinder = 64;
+ deviceExtension->DiskGeometry->Geometry.TracksPerCylinder = 64;
} else {
@@ -6660,11 +6660,11 @@
//
originalIrp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
- RtlZeroMemory(deviceExtension->DiskGeometry, sizeof(DISK_GEOMETRY));
- deviceExtension->DiskGeometry->BytesPerSector = 2048;
+ RtlZeroMemory(deviceExtension->DiskGeometry,
sizeof(DISK_GEOMETRY_EX));
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector = 2048;
deviceExtension->SectorShift = 11;
deviceExtension->PartitionLength.QuadPart = (LONGLONG)(0x7fffffff);
- deviceExtension->DiskGeometry->MediaType = RemovableMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType =
RemovableMedia;
}
} else {
@@ -6672,11 +6672,11 @@
// Set up reasonable defaults
//
- RtlZeroMemory(deviceExtension->DiskGeometry, sizeof(DISK_GEOMETRY));
- deviceExtension->DiskGeometry->BytesPerSector = 2048;
+ RtlZeroMemory(deviceExtension->DiskGeometry, sizeof(DISK_GEOMETRY_EX));
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector = 2048;
deviceExtension->SectorShift = 11;
deviceExtension->PartitionLength.QuadPart = (LONGLONG)(0x7fffffff);
- deviceExtension->DiskGeometry->MediaType = RemovableMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType = RemovableMedia;
}
}
Modified: trunk/reactos/drivers/storage/class/class2/class2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/clas…
==============================================================================
--- trunk/reactos/drivers/storage/class/class2/class2.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/class2/class2.c [iso-8859-1] Tue Oct 12 20:17:55
2010
@@ -748,16 +748,16 @@
// in reverse byte order.
//
- ((PFOUR_BYTE)&deviceExtension->DiskGeometry->BytesPerSector)->Byte0
=
+
((PFOUR_BYTE)&deviceExtension->DiskGeometry->Geometry.BytesPerSector)->Byte0
=
((PFOUR_BYTE)&readCapacityBuffer->BytesPerBlock)->Byte3;
- ((PFOUR_BYTE)&deviceExtension->DiskGeometry->BytesPerSector)->Byte1
=
+
((PFOUR_BYTE)&deviceExtension->DiskGeometry->Geometry.BytesPerSector)->Byte1
=
((PFOUR_BYTE)&readCapacityBuffer->BytesPerBlock)->Byte2;
- ((PFOUR_BYTE)&deviceExtension->DiskGeometry->BytesPerSector)->Byte2
=
+
((PFOUR_BYTE)&deviceExtension->DiskGeometry->Geometry.BytesPerSector)->Byte2
=
((PFOUR_BYTE)&readCapacityBuffer->BytesPerBlock)->Byte1;
- ((PFOUR_BYTE)&deviceExtension->DiskGeometry->BytesPerSector)->Byte3
=
+
((PFOUR_BYTE)&deviceExtension->DiskGeometry->Geometry.BytesPerSector)->Byte3
=
((PFOUR_BYTE)&readCapacityBuffer->BytesPerBlock)->Byte0;
//
@@ -780,10 +780,10 @@
// Calculate sector to byte shift.
//
- WHICH_BIT(deviceExtension->DiskGeometry->BytesPerSector,
deviceExtension->SectorShift);
+ WHICH_BIT(deviceExtension->DiskGeometry->Geometry.BytesPerSector,
deviceExtension->SectorShift);
DebugPrint((2,"SCSI ScsiClassReadDriveCapacity: Sector size is %d\n",
- deviceExtension->DiskGeometry->BytesPerSector));
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector));
DebugPrint((2,"SCSI ScsiClassReadDriveCapacity: Number of Sectors is
%d\n",
lastSector + 1));
@@ -798,7 +798,7 @@
// Calculate number of cylinders.
//
- deviceExtension->DiskGeometry->Cylinders.QuadPart = (LONGLONG)((lastSector
+ 1)/(32 * 64));
+ deviceExtension->DiskGeometry->Geometry.Cylinders.QuadPart =
(LONGLONG)((lastSector + 1)/(32 * 64));
deviceExtension->PartitionLength.QuadPart =
(deviceExtension->PartitionLength.QuadPart <<
deviceExtension->SectorShift);
@@ -809,7 +809,7 @@
// This device supports removable media.
//
- deviceExtension->DiskGeometry->MediaType = RemovableMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType = RemovableMedia;
} else {
@@ -817,20 +817,20 @@
// Assume media type is fixed disk.
//
- deviceExtension->DiskGeometry->MediaType = FixedMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType = FixedMedia;
}
//
// Assume sectors per track are 32;
//
- deviceExtension->DiskGeometry->SectorsPerTrack = 32;
+ deviceExtension->DiskGeometry->Geometry.SectorsPerTrack = 32;
//
// Assume tracks per cylinder (number of heads) is 64.
//
- deviceExtension->DiskGeometry->TracksPerCylinder = 64;
+ deviceExtension->DiskGeometry->Geometry.TracksPerCylinder = 64;
}
if (status == STATUS_VERIFY_REQUIRED) {
@@ -860,8 +860,8 @@
// except for the bytes per sector and sector shift.
//
- RtlZeroMemory(deviceExtension->DiskGeometry, sizeof(DISK_GEOMETRY));
- deviceExtension->DiskGeometry->BytesPerSector = 512;
+ RtlZeroMemory(deviceExtension->DiskGeometry, sizeof(DISK_GEOMETRY_EX));
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector = 512;
deviceExtension->SectorShift = 9;
deviceExtension->PartitionLength.QuadPart = (LONGLONG) 0;
@@ -871,7 +871,7 @@
// This device supports removable media.
//
- deviceExtension->DiskGeometry->MediaType = RemovableMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType = RemovableMedia;
} else {
@@ -879,7 +879,7 @@
// Assume media type is fixed disk.
//
- deviceExtension->DiskGeometry->MediaType = FixedMedia;
+ deviceExtension->DiskGeometry->Geometry.MediaType = FixedMedia;
}
}
@@ -2752,7 +2752,7 @@
errorLogEntry->DeviceOffset.QuadPart = (LONGLONG) badSector;
errorLogEntry->DeviceOffset = RtlExtendedIntegerMultiply(
errorLogEntry->DeviceOffset,
- deviceExtension->DiskGeometry->BytesPerSector);
+
deviceExtension->DiskGeometry->Geometry.BytesPerSector);
}
errorLogEntry->ErrorCode = logStatus;
Modified: trunk/reactos/drivers/storage/class/disk/disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk/disk.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk/disk.c [iso-8859-1] Tue Oct 12 20:17:55 2010
@@ -652,7 +652,7 @@
NTSTATUS status;
PDEVICE_OBJECT deviceObject = NULL;
PDEVICE_OBJECT physicalDevice;
- PDISK_GEOMETRY diskGeometry = NULL;
+ PDISK_GEOMETRY_EX diskGeometry = NULL;
PDEVICE_EXTENSION deviceExtension = NULL;
PDEVICE_EXTENSION physicalDeviceExtension;
UCHAR pathId = LunInfo->PathId;
@@ -880,7 +880,7 @@
// Allocate buffer for drive geometry.
//
- diskGeometry = ExAllocatePool(NonPagedPool, sizeof(DISK_GEOMETRY));
+ diskGeometry = ExAllocatePool(NonPagedPool, sizeof(DISK_GEOMETRY_EX));
if (diskGeometry == NULL) {
@@ -1065,7 +1065,7 @@
ULONG partitionNumber = 0;
NTSTATUS status;
PDEVICE_OBJECT deviceObject = NULL;
- PDISK_GEOMETRY diskGeometry = NULL;
+ PDISK_GEOMETRY_EX diskGeometry = NULL;
PDRIVE_LAYOUT_INFORMATION partitionList = NULL;
PDEVICE_EXTENSION deviceExtension;
PDEVICE_EXTENSION physicalDeviceExtension;
@@ -1087,7 +1087,7 @@
physicalDeviceExtension = PhysicalDeviceObject->DeviceExtension;
diskGeometry = physicalDeviceExtension->DiskGeometry;
- bytesPerSector = diskGeometry->BytesPerSector;
+ bytesPerSector = diskGeometry->Geometry.BytesPerSector;
//
// Make sure sector size is not zero.
@@ -1099,7 +1099,7 @@
// Default sector size for disk is 512.
//
- bytesPerSector = diskGeometry->BytesPerSector = 512;
+ bytesPerSector = diskGeometry->Geometry.BytesPerSector = 512;
}
sectorShift = physicalDeviceExtension->SectorShift;
@@ -1118,7 +1118,7 @@
//
HalExamineMBR(PhysicalDeviceObject,
- physicalDeviceExtension->DiskGeometry->BytesPerSector,
+ physicalDeviceExtension->DiskGeometry->Geometry.BytesPerSector,
(ULONG)0x54,
(PVOID)&dmSkew);
@@ -1149,7 +1149,7 @@
//
status = IoReadPartitionTable(PhysicalDeviceObject,
-
physicalDeviceExtension->DiskGeometry->BytesPerSector,
+
physicalDeviceExtension->DiskGeometry->Geometry.BytesPerSector,
TRUE,
(PVOID)&partitionList);
@@ -1432,7 +1432,7 @@
//
deviceExtension->TimeOutValue = physicalDeviceExtension->TimeOutValue;
- deviceExtension->DiskGeometry->BytesPerSector = bytesPerSector;
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector =
bytesPerSector;
deviceExtension->SectorShift = sectorShift;
deviceExtension->DeviceObject = deviceObject;
deviceExtension->DeviceFlags |= physicalDeviceExtension->DeviceFlags;
@@ -1512,7 +1512,7 @@
transferByteCount);
if ((startingOffset.QuadPart > deviceExtension->PartitionLength.QuadPart) ||
- (transferByteCount & (deviceExtension->DiskGeometry->BytesPerSector -
1))) {
+ (transferByteCount &
(deviceExtension->DiskGeometry->Geometry.BytesPerSector - 1))) {
//
// This error maybe caused by the fact that the drive is not ready.
@@ -2014,6 +2014,7 @@
}
case IOCTL_DISK_GET_DRIVE_GEOMETRY:
+ case IOCTL_DISK_GET_DRIVE_GEOMETRY_EX:
{
PDEVICE_EXTENSION physicalDeviceExtension;
@@ -2021,8 +2022,12 @@
BOOLEAN removable = FALSE;
BOOLEAN listInitialized = FALSE;
- if ( irpStack->Parameters.DeviceIoControl.OutputBufferLength <
- sizeof( DISK_GEOMETRY ) ) {
+ if ((irpStack->Parameters.DeviceIoControl.IoControlCode ==
IOCTL_DISK_GET_DRIVE_GEOMETRY &&
+ irpStack->Parameters.DeviceIoControl.OutputBufferLength <
+ sizeof(DISK_GEOMETRY)) ||
+ (irpStack->Parameters.DeviceIoControl.IoControlCode ==
IOCTL_DISK_GET_DRIVE_GEOMETRY_EX &&
+ irpStack->Parameters.DeviceIoControl.OutputBufferLength <
+ sizeof(DISK_GEOMETRY_EX))) {
status = STATUS_INFO_LENGTH_MISMATCH;
break;
@@ -2083,10 +2088,15 @@
RtlMoveMemory(Irp->AssociatedIrp.SystemBuffer,
deviceExtension->DiskGeometry,
- sizeof(DISK_GEOMETRY));
+ (irpStack->Parameters.DeviceIoControl.IoControlCode ==
IOCTL_DISK_GET_DRIVE_GEOMETRY) ?
+ sizeof(DISK_GEOMETRY) :
+ sizeof(DISK_GEOMETRY_EX));
status = STATUS_SUCCESS;
- Irp->IoStatus.Information = sizeof(DISK_GEOMETRY);
+ Irp->IoStatus.Information =
+ (irpStack->Parameters.DeviceIoControl.IoControlCode ==
IOCTL_DISK_GET_DRIVE_GEOMETRY) ?
+ sizeof(DISK_GEOMETRY) :
+ sizeof(DISK_GEOMETRY_EX);
}
break;
@@ -2285,7 +2295,7 @@
status = IoSetPartitionInformation(
deviceExtension->PhysicalDevice,
- deviceExtension->DiskGeometry->BytesPerSector,
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector,
diskData->PartitionOrdinal,
inputBuffer->PartitionType);
@@ -2323,7 +2333,7 @@
//
status = IoReadPartitionTable(deviceExtension->PhysicalDevice,
- deviceExtension->DiskGeometry->BytesPerSector,
+
deviceExtension->DiskGeometry->Geometry.BytesPerSector,
FALSE,
&partitionList);
@@ -2504,9 +2514,9 @@
status = IoWritePartitionTable(
deviceExtension->DeviceObject,
- deviceExtension->DiskGeometry->BytesPerSector,
- deviceExtension->DiskGeometry->SectorsPerTrack,
- deviceExtension->DiskGeometry->TracksPerCylinder,
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector,
+
deviceExtension->DiskGeometry->Geometry.SectorsPerTrack,
+
deviceExtension->DiskGeometry->Geometry.TracksPerCylinder,
partitionList);
}
@@ -3455,7 +3465,7 @@
// Get sector size.
//
- sectorSize = DeviceExtension->DiskGeometry->BytesPerSector;
+ sectorSize = DeviceExtension->DiskGeometry->Geometry.BytesPerSector;
//
// Make sure sector size is at least 512 bytes.
@@ -4102,9 +4112,11 @@
// Update the actual geometry information.
//
- DeviceExtension->DiskGeometry->SectorsPerTrack = sectorsPerTrack;
- DeviceExtension->DiskGeometry->TracksPerCylinder = tracksPerCylinder;
- DeviceExtension->DiskGeometry->Cylinders.QuadPart = (LONGLONG)cylinders;
+ DeviceExtension->DiskGeometry->Geometry.SectorsPerTrack = sectorsPerTrack;
+ DeviceExtension->DiskGeometry->Geometry.TracksPerCylinder = tracksPerCylinder;
+ DeviceExtension->DiskGeometry->Geometry.Cylinders.QuadPart =
(LONGLONG)cylinders;
+ DeviceExtension->DiskGeometry->DiskSize.QuadPart = cylinders *
tracksPerCylinder * sectorsPerTrack *
+
DeviceExtension->DiskGeometry->Geometry.BytesPerSector;
DebugPrint((3,
"SCSIDISK: UpdateGeometry: BIOS spt %x, #heads %x, #cylinders
%x\n",
@@ -4119,7 +4131,7 @@
if (!DeviceExtension->DMActive) {
HalExamineMBR(DeviceExtension->DeviceObject,
- DeviceExtension->DiskGeometry->BytesPerSector,
+ DeviceExtension->DiskGeometry->Geometry.BytesPerSector,
(ULONG)0x55,
&tmpPtr
);
@@ -4155,18 +4167,19 @@
cylinders -= 1;
- DeviceExtension->DiskGeometry->Cylinders.QuadPart = cylinders + 1;
- DeviceExtension->DiskGeometry->TracksPerCylinder = tracksPerCylinder + 1;
+ DeviceExtension->DiskGeometry->Geometry.Cylinders.QuadPart = cylinders +
1;
+ DeviceExtension->DiskGeometry->Geometry.TracksPerCylinder =
tracksPerCylinder + 1;
DeviceExtension->PartitionLength.QuadPart =
- DeviceExtension->DiskGeometry->Cylinders.QuadPart *
- DeviceExtension->DiskGeometry->SectorsPerTrack *
- DeviceExtension->DiskGeometry->BytesPerSector *
- DeviceExtension->DiskGeometry->TracksPerCylinder;
+ DeviceExtension->DiskGeometry->DiskSize.QuadPart =
+ DeviceExtension->DiskGeometry->Geometry.Cylinders.QuadPart *
+ DeviceExtension->DiskGeometry->Geometry.SectorsPerTrack *
+ DeviceExtension->DiskGeometry->Geometry.BytesPerSector *
+ DeviceExtension->DiskGeometry->Geometry.TracksPerCylinder;
if (DeviceExtension->DMActive) {
- DeviceExtension->DMByteSkew = DeviceExtension->DMSkew *
DeviceExtension->DiskGeometry->BytesPerSector;
+ DeviceExtension->DMByteSkew = DeviceExtension->DMSkew *
DeviceExtension->DiskGeometry->Geometry.BytesPerSector;
}
@@ -4250,7 +4263,7 @@
//
status = IoReadPartitionTable(deviceExtension->PhysicalDevice,
- deviceExtension->DiskGeometry->BytesPerSector,
+ deviceExtension->DiskGeometry->Geometry.BytesPerSector,
TRUE,
&partitionList);
Modified: trunk/reactos/drivers/storage/class/include/class2.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/incl…
==============================================================================
--- trunk/reactos/drivers/storage/class/include/class2.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/include/class2.h [iso-8859-1] Tue Oct 12 20:17:55
2010
@@ -112,7 +112,7 @@
PCLASS_CREATE_CLOSE ClassCreateClose;
PDRIVER_STARTIO ClassStartIo;
PIO_SCSI_CAPABILITIES PortCapabilities;
- PDISK_GEOMETRY DiskGeometry;
+ PDISK_GEOMETRY_EX DiskGeometry;
PDEVICE_OBJECT PhysicalDevice;
PSENSE_DATA SenseData;
ULONG TimeOutValue;