VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorHelmut K. C. Tessarek <tessarek@evermeet.cx>2025-01-31 23:18:26 +0100
committerGitHub <noreply@github.com>2025-01-31 23:18:26 +0100
commit498dff9013d18e5978ab77c14ea2b2d0229603a4 (patch)
tree7f172f9c2945691ac9b1fb08f963a2263fd6942f /src/Driver
parentc71fa14dc09fd7f31282f6ce4fdf3db547b9b827 (diff)
downloadVeraCrypt-498dff9013d18e5978ab77c14ea2b2d0229603a4.tar.gz
VeraCrypt-498dff9013d18e5978ab77c14ea2b2d0229603a4.zip
refactor: use the term unmount instead of dismount (#1478)
* refactor: use UNMOUNT instead of DISMOUNT in code This change updates the term DISMOUNT in constants to UNMOUNT. Other occurrences (e.g. variable names) are left alone for now. * refactor(ui): use unmount instead of dismount This change updates the GUI text and replaces dismount with unmount. * docs: update term dismount -> unmount * refactor(cmdline): add unmount This change adds an argument 'unmount' for command line usage, while trying to deprecate the old disnount argument. The current dismount argument/flag will still work to not introduce a breaking change. * docs: mention that /dismount is deprecated This change fixes the shorthand version of the argument /unmount It also adds back the info for /dismount and that it is deprecated.
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/Ntdriver.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index 6d218517..65423829 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -2590,17 +2590,17 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
burn (&mount->ProtectedHidVolPassword, sizeof (mount->ProtectedHidVolPassword));
burn (&mount->pkcs5_prf, sizeof (mount->pkcs5_prf));
burn (&mount->VolumePim, sizeof (mount->VolumePim));
burn (&mount->ProtectedHidVolPkcs5Prf, sizeof (mount->ProtectedHidVolPkcs5Prf));
burn (&mount->ProtectedHidVolPim, sizeof (mount->ProtectedHidVolPim));
}
break;
- case TC_IOCTL_DISMOUNT_VOLUME:
+ case TC_IOCTL_UNMOUNT_VOLUME:
if (ValidateIOBufferSize (Irp, sizeof (UNMOUNT_STRUCT), ValidateInputOutput))
{
UNMOUNT_STRUCT *unmount = (UNMOUNT_STRUCT *) Irp->AssociatedIrp.SystemBuffer;
PDEVICE_OBJECT ListDevice = GetVirtualVolumeDeviceObject (unmount->nDosDriveNo);
if (irpSp->Parameters.DeviceIoControl.InputBufferLength != sizeof (UNMOUNT_STRUCT))
{
Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
@@ -2618,17 +2618,17 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
unmount->nReturnCode = UnmountDevice (unmount, ListDevice, unmount->ignoreOpenFiles);
}
Irp->IoStatus.Information = sizeof (UNMOUNT_STRUCT);
Irp->IoStatus.Status = STATUS_SUCCESS;
}
break;
- case TC_IOCTL_DISMOUNT_ALL_VOLUMES:
+ case TC_IOCTL_UNMOUNT_ALL_VOLUMES:
if (ValidateIOBufferSize (Irp, sizeof (UNMOUNT_STRUCT), ValidateInputOutput))
{
UNMOUNT_STRUCT *unmount = (UNMOUNT_STRUCT *) Irp->AssociatedIrp.SystemBuffer;
if (irpSp->Parameters.DeviceIoControl.InputBufferLength != sizeof (UNMOUNT_STRUCT))
{
Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
Irp->IoStatus.Information = 0;
@@ -3177,18 +3177,18 @@ LPWSTR TCTranslateCode (ULONG ulCode)
{
switch (ulCode)
{
#define TC_CASE_RET_NAME(CODE) case CODE : return L###CODE
TC_CASE_RET_NAME (TC_IOCTL_ABORT_BOOT_ENCRYPTION_SETUP);
TC_CASE_RET_NAME (TC_IOCTL_ABORT_DECOY_SYSTEM_WIPE);
TC_CASE_RET_NAME (TC_IOCTL_BOOT_ENCRYPTION_SETUP);
- TC_CASE_RET_NAME (TC_IOCTL_DISMOUNT_ALL_VOLUMES);
- TC_CASE_RET_NAME (TC_IOCTL_DISMOUNT_VOLUME);
+ TC_CASE_RET_NAME (TC_IOCTL_UNMOUNT_ALL_VOLUMES);
+ TC_CASE_RET_NAME (TC_IOCTL_UNMOUNT_VOLUME);
TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_DRIVE_VOLUME_PROPERTIES);
TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_ENCRYPTION_ALGORITHM_NAME);
TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_ENCRYPTION_SETUP_RESULT);
TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_ENCRYPTION_STATUS);
TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_LOADER_VERSION);
TC_CASE_RET_NAME (TC_IOCTL_GET_DECOY_SYSTEM_WIPE_RESULT);
TC_CASE_RET_NAME (TC_IOCTL_GET_DECOY_SYSTEM_WIPE_STATUS);
TC_CASE_RET_NAME (TC_IOCTL_GET_DEVICE_REFCOUNT);
@@ -3375,17 +3375,17 @@ VOID TCUnloadDriver (PDRIVER_OBJECT DriverObject)
void OnShutdownPending ()
{
UNMOUNT_STRUCT unmount;
memset (&unmount, 0, sizeof (unmount));
unmount.ignoreOpenFiles = TRUE;
- while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_DISMOUNT_ALL_VOLUMES, &unmount, sizeof (unmount), &unmount, sizeof (unmount)) == STATUS_INSUFFICIENT_RESOURCES || unmount.HiddenVolumeProtectionTriggered)
+ while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_UNMOUNT_ALL_VOLUMES, &unmount, sizeof (unmount), &unmount, sizeof (unmount)) == STATUS_INSUFFICIENT_RESOURCES || unmount.HiddenVolumeProtectionTriggered)
unmount.HiddenVolumeProtectionTriggered = FALSE;
while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_WIPE_PASSWORD_CACHE, NULL, 0, NULL, 0) == STATUS_INSUFFICIENT_RESOURCES);
}
typedef struct
{
PWSTR deviceName; ULONG IoControlCode; void *InputBuffer; ULONG InputBufferSize; void *OutputBuffer; ULONG OutputBufferSize;