VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/Ntdriver.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-03-05 19:29:08 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-03-05 19:35:07 +0100
commitd907627f7e4844547545b9ff189208cec9eee426 (patch)
treece75898e20230bc735db1380b0e14e1e7b7f9791 /src/Driver/Ntdriver.c
parentbac2ad29b66527a6dcc96c06e4c2407f4622414c (diff)
downloadVeraCrypt-d907627f7e4844547545b9ff189208cec9eee426.tar.gz
VeraCrypt-d907627f7e4844547545b9ff189208cec9eee426.zip
Windows: Add option to block TRIM command on system encryption SSD drives.
Diffstat (limited to 'src/Driver/Ntdriver.c')
-rw-r--r--src/Driver/Ntdriver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index ce2f01ce..fca2ca42 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -128,6 +128,7 @@ BOOL VolumeClassFilterRegistered = FALSE;
BOOL CacheBootPassword = FALSE;
BOOL CacheBootPim = FALSE;
BOOL NonAdminSystemFavoritesAccessDisabled = FALSE;
+BOOL BlockSystemTrimCommand = FALSE;
static size_t EncryptionThreadPoolFreeCpuCountLimit = 0;
static BOOL SystemFavoriteVolumeDirty = FALSE;
static BOOL PagingFileCreationPrevented = FALSE;
@@ -4220,6 +4221,9 @@ NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry)
if (flags & TC_DRIVER_CONFIG_CACHE_BOOT_PIM)
CacheBootPim = TRUE;
+
+ if (flags & VC_DRIVER_CONFIG_BLOCK_SYS_TRIM)
+ BlockSystemTrimCommand = TRUE;
}
EnableHwEncryption ((flags & TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION) ? FALSE : TRUE);