From 7cc2a3527dd27f49f617c4bfb915fd00098801ab Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 23 Jul 2017 10:39:03 +0200 Subject: Windows Driver: make IOCTL_DISK_GET_DRIVE_GEOMETRY_EX support optional. Make disk size equal to partition size to avoid compatibility issues with existing software. --- src/Driver/Ntvol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Driver/Ntvol.c') diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c index 18dc9b5f..b9117571 100644 --- a/src/Driver/Ntvol.c +++ b/src/Driver/Ntvol.c @@ -704,8 +704,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, Extension->TracksPerCylinder = 1; Extension->SectorsPerTrack = 1; Extension->BytesPerSector = Extension->cryptoInfo->SectorSize; - // Add extra sector since our virtual partition starts at Extension->BytesPerSector and not 0 - Extension->NumberOfCylinders = (Extension->DiskLength / Extension->BytesPerSector) + 1; + Extension->NumberOfCylinders = Extension->DiskLength / Extension->BytesPerSector; Extension->PartitionType = 0; Extension->bRawDevice = bRawDevice; -- cgit v1.2.3