[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Thu, 27 Aug 2015 20:56:08 +0000 (20:56 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Thu, 27 Aug 2015 20:56:08 +0000 (20:56 +0000)
It seems that our disk.sys returns "unknown" media type when performing IOCTL_DISK_GET_DRIVE_GEOMETRY on an extended partition.
Not sure how Windows handles this (if any volunteer for a test :-)), in the meantime, forcibly sector size to 512B to allow NTFS driver opening volumes on extended partitions

svn path=/trunk/; revision=68835

reactos/drivers/filesystems/ntfs/fsctl.c

index fd59588..67f2664 100644 (file)
@@ -89,6 +89,10 @@ NtfsHasFileSystem(PDEVICE_OBJECT DeviceToMount)
             return STATUS_UNRECOGNIZED_VOLUME;
         }
     }
+    else if (DiskGeometry.MediaType == Unknown)
+    {
+        DiskGeometry.BytesPerSector = 512;
+    }
 
     DPRINT1("BytesPerSector: %lu\n", DiskGeometry.BytesPerSector);
     BootSector = ExAllocatePoolWithTag(NonPagedPool,