#include <ntddscsi.h>
#include <mountdev.h>
#include <mountmgr.h>
+#include <ntiologc.h>
#include <include/class2.h>
#include <stdio.h>
#define NDEBUG
#include <debug.h>
-#define IO_WRITE_CACHE_ENABLED ((NTSTATUS)0x80040020L)
-#define IO_WRITE_CACHE_DISABLED ((NTSTATUS)0x80040022L)
#ifdef POOL_TAGGING
#ifdef ExAllocatePool
// SRB zone elements to allocate.
//
- adapterDisk = 0;
adapterInfo = (PVOID) buffer;
adapterDisk = ScsiClassFindUnclaimedDevices(InitializationData, adapterInfo);
PPARTITION_INFORMATION outputBuffer;
+ if (diskData->PartitionNumber == 0) {
+ DPRINT1("HACK: Handling partition 0 request!\n");
+ //ASSERT(FALSE);
+ }
+
//
// Update the geometry in case it has changed.
//
//
diskData->DriveNotReady = FALSE;
-// HACK: ReactOS partition numbers must be wrong (>0 part)
- if (diskData->PartitionType == 0 && (diskData->PartitionNumber > 0)) {
-
- status = STATUS_INVALID_DEVICE_REQUEST;
- break;
- }
outputBuffer =
(PPARTITION_INFORMATION)Irp->AssociatedIrp.SystemBuffer;
status = STATUS_INFO_LENGTH_MISMATCH;
}
+#if 0 // HACK: ReactOS partition numbers must be wrong
else if (diskData->PartitionNumber == 0) {
//
status = STATUS_INVALID_DEVICE_REQUEST;
}
+#endif
else {
PPARTITION_INFORMATION_EX outputBuffer;
+ if (diskData->PartitionNumber == 0) {
+ DPRINT1("HACK: Handling partition 0 request!\n");
+ //ASSERT(FALSE);
+ }
+
//
// Update the geometry in case it has changed.
//
partitionEntry = &partitionList->PartitionEntry[i];
//
- // Check if empty, or describes extended partiton or hasn't changed.
+ // Check if empty, or describes extended partition or hasn't changed.
//
if (partitionEntry->PartitionType == PARTITION_ENTRY_UNUSED ||
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->DiskSize.QuadPart = (LONGLONG)cylinders * tracksPerCylinder * sectorsPerTrack *
DeviceExtension->DiskGeometry->Geometry.BytesPerSector;
DebugPrint((3,
partitionEntry = &partitionList->PartitionEntry[partition];
//
- // Check if empty, or describes extended partiton or hasn't changed.
+ // Check if empty, or describes extended partition or hasn't changed.
//
if (partitionEntry->PartitionType == PARTITION_ENTRY_UNUSED ||
partitionEntry = &partitionList->PartitionEntry[partition];
//
- // Check if empty, or describes an extended partiton.
+ // Check if empty, or describes an extended partition.
//
if (partitionEntry->PartitionType == PARTITION_ENTRY_UNUSED ||