VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-08-02 18:47:39 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-08-02 18:48:48 +0200
commit75e11add78f02e7d4007427c14812bb3ee7677c2 (patch)
tree8c8685098eb45176142f347abae3023c335acead /src
parentfb505b71f5ee9533831560a4a8d8ebe4257e4a3c (diff)
downloadVeraCrypt-75e11add78f02e7d4007427c14812bb3ee7677c2.tar.gz
VeraCrypt-75e11add78f02e7d4007427c14812bb3ee7677c2.zip
Windows: Fix UI for blocking TRIM in system encryption not working in MBR boot mode
Diffstat (limited to 'src')
-rw-r--r--src/Mount/Mount.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index ff66fab5..1f13a541 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -12088,15 +12088,18 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA
SetDriverConfigurationFlag (TC_DRIVER_CONFIG_DISABLE_EVIL_MAID_ATTACK_DETECTION, IsDlgButtonChecked (hwndDlg, IDC_DISABLE_EVIL_MAID_ATTACK_DETECTION));
SetDriverConfigurationFlag (VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION, bClearKeysEnabled);
SetDriverConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER, bAutoFixBootloader? FALSE : TRUE);
- if (bSystemIsGPT && !IsHiddenOSRunning ())
+ if (!IsHiddenOSRunning ())
{
/* we don't need to update TRIM config for hidden OS since it's always blocked */
SetDriverConfigurationFlag (VC_DRIVER_CONFIG_BLOCK_SYS_TRIM, bBlockSysEncTrimEnabled);
- /* we don't update bootloader settings since we never update bootloader under Hidden OS */
- SetDriverConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT, bForceVeraCryptNextBoot);
- SetDriverConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_SET_BOOTENTRY, bForceSetVeraCryptBootEntry? FALSE : TRUE);
- SetDriverConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_FORCE_FIRST_BOOTENTRY, bForceVeraCryptFirstEntry? FALSE : TRUE);
+ if (bSystemIsGPT)
+ {
+ /* we don't update bootloader settings since we never update bootloader under Hidden OS */
+ SetDriverConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT, bForceVeraCryptNextBoot);
+ SetDriverConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_SET_BOOTENTRY, bForceSetVeraCryptBootEntry? FALSE : TRUE);
+ SetDriverConfigurationFlag (VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_FORCE_FIRST_BOOTENTRY, bForceVeraCryptFirstEntry? FALSE : TRUE);
+ }
}
}
catch (Exception &e)