VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-08-31 22:47:40 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-08-31 23:15:32 (GMT)
commit09afb91c897e8617b632a6c8cbaab0a98e21549b (patch)
treea93fe894b9f6e1d0ea706124ad749cd6b853fa77 /src/Driver
parent95748751dfcfce1a885dfa4974ca3761ed0f7dbb (diff)
downloadVeraCrypt-09afb91c897e8617b632a6c8cbaab0a98e21549b.zip
VeraCrypt-09afb91c897e8617b632a6c8cbaab0a98e21549b.tar.gz
Windows: extended Windows defragmenter workaround to Windows 8.1
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/Ntdriver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index e8fb282..5243b34 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -1264,9 +1264,9 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
case IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS:
Dump ("ProcessVolumeDeviceControlIrp (IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS)\n");
- // Vista's and Windows 10 filesystem defragmenter fails if IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS does not succeed.
+ // Vista's, Windows 8.1 and later filesystem defragmenter fails if IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS does not succeed.
if (!(OsMajorVersion == 6 && OsMinorVersion == 0)
- && !(OsMajorVersion == 10 && AllowWindowsDefrag && Extension->bRawDevice)
+ && !(IsOSAtLeast (WIN_8_1) && AllowWindowsDefrag && Extension->bRawDevice)
)
{
Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;
@@ -1277,7 +1277,7 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
VOLUME_DISK_EXTENTS *extents = (VOLUME_DISK_EXTENTS *) Irp->AssociatedIrp.SystemBuffer;
- if (OsMajorVersion == 10)
+ if (IsOSAtLeast (WIN_8_1))
{
// Windows 10 filesystem defragmenter works only if we report an extent with a real disk number
// So in the case of a VeraCrypt disk based volume, we use the disk number