diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-23 10:39:03 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-23 14:52:12 +0200 |
commit | 7cc2a3527dd27f49f617c4bfb915fd00098801ab (patch) | |
tree | f3300962aa30392a1a153d4f10dc2f9bb6e3006d /src/Driver/Ntvol.c | |
parent | 181244990641d5e7f61704a335cc29f73f22c814 (diff) | |
download | VeraCrypt-7cc2a3527dd27f49f617c4bfb915fd00098801ab.tar.gz VeraCrypt-7cc2a3527dd27f49f617c4bfb915fd00098801ab.zip |
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.
Diffstat (limited to 'src/Driver/Ntvol.c')
-rw-r--r-- | src/Driver/Ntvol.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; |