VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount/Mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r--src/Mount/Mount.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index a0370861..a5798afc 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -6551,88 +6551,96 @@ static void VerifyRescueDisk (HWND hwndDlg, bool checkImageFile)
{
WaitCursor();
if (!BootEncObj->VerifyRescueDisk ())
Error (bSystemIsGPT? "RESCUE_DISK_EFI_NON_WIZARD_CHECK_FAILED" : "RESCUE_DISK_NON_WIZARD_CHECK_FAILED", hwndDlg);
else
Info ("RESCUE_DISK_NON_WIZARD_CHECK_PASSED", hwndDlg);
}
}
catch (Exception &e)
{
e.Show (MainDlg);
Error (bSystemIsGPT? "RESCUE_DISK_EFI_NON_WIZARD_CHECK_FAILED" : "RESCUE_DISK_NON_WIZARD_CHECK_FAILED", hwndDlg);
}
CloseSysEncMutex ();
NormalCursor ();
}
else
Warning ("SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE", hwndDlg);
}
static void ShowSystemEncryptionStatus (HWND hwndDlg)
{
try
{
BootEncStatus = BootEncObj->GetStatus();
}
catch (Exception &e)
{
e.Show (MainDlg);
}
if (GetAsyncKeyState (VK_SHIFT) < 0 && GetAsyncKeyState (VK_CONTROL) < 0)
{
// Ctrl+Shift held (for debugging purposes)
+ int64 encryptedRatio = 0;
+ if (BootEncStatus.DriveEncrypted
+ && (BootEncStatus.ConfiguredEncryptedAreaStart >= 0)
+ && (BootEncStatus.ConfiguredEncryptedAreaEnd >= BootEncStatus.ConfiguredEncryptedAreaStart)
+ )
+ {
+ encryptedRatio = (BootEncStatus.EncryptedAreaEnd + 1 - BootEncStatus.EncryptedAreaStart) * 100I64 / (BootEncStatus.ConfiguredEncryptedAreaEnd + 1 - BootEncStatus.ConfiguredEncryptedAreaStart);
+ }
DebugMsgBox ("Debugging information for system encryption:\n\nDeviceFilterActive: %d\nBootLoaderVersion: %x\nSetupInProgress: %d\nSetupMode: %d\nVolumeHeaderPresent: %d\nDriveMounted: %d\nDriveEncrypted: %d\n"
"HiddenSystem: %d\nHiddenSystemPartitionStart: %I64d\n"
"ConfiguredEncryptedAreaStart: %I64d\nConfiguredEncryptedAreaEnd: %I64d\nEncryptedAreaStart: %I64d\nEncryptedAreaEnd: %I64d\nEncrypted: %I64d%%",
BootEncStatus.DeviceFilterActive,
BootEncStatus.BootLoaderVersion,
BootEncStatus.SetupInProgress,
BootEncStatus.SetupMode,
BootEncStatus.VolumeHeaderPresent,
BootEncStatus.DriveMounted,
BootEncStatus.DriveEncrypted,
BootEncStatus.HiddenSystem ? 1 : 0,
BootEncStatus.HiddenSystemPartitionStart,
BootEncStatus.ConfiguredEncryptedAreaStart,
BootEncStatus.ConfiguredEncryptedAreaEnd,
BootEncStatus.EncryptedAreaStart,
BootEncStatus.EncryptedAreaEnd,
- !BootEncStatus.DriveEncrypted ? 0 : (BootEncStatus.EncryptedAreaEnd + 1 - BootEncStatus.EncryptedAreaStart) * 100I64 / (BootEncStatus.ConfiguredEncryptedAreaEnd + 1 - BootEncStatus.ConfiguredEncryptedAreaStart));
+ encryptedRatio);
}
if (!BootEncStatus.DriveEncrypted && !BootEncStatus.DriveMounted)
{
Info ("SYS_DRIVE_NOT_ENCRYPTED", hwndDlg);
return;
}
DialogBoxParamW (hInst,
MAKEINTRESOURCEW (IDD_VOLUME_PROPERTIES), hwndDlg,
(DLGPROC) VolumePropertiesDlgProc, (LPARAM) TRUE);
}
static void ResumeInterruptedNonSysInplaceEncProcess (BOOL bDecrypt)
{
// IMPORTANT: This function must not check any config files! Otherwise, if a config file was lost or corrupt,
// the user would not be able resume encryption and the data on the volume would be inaccessible.
LaunchVolCreationWizard (MainDlg, bDecrypt? L"/resumeinplacedec" : L"/zinplace", FALSE);
}
BOOL SelectContainer (HWND hwndDlg)
{
if (BrowseFiles (hwndDlg, "OPEN_VOL_TITLE", szFileName, bHistory, FALSE, NULL) == FALSE)
return FALSE;
AddComboItem (GetDlgItem (hwndDlg, IDC_VOLUME), szFileName, bHistory);
EnableDisableButtons (hwndDlg);
SetFocus (GetDlgItem (hwndDlg, IDC_DRIVELIST));
return TRUE;
}
BOOL SelectPartition (HWND hwndDlg)
{