From 2d4d3ab4ed0ee86d46fe2b44ca1e56a3d2916f68 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 8 Nov 2019 23:06:25 +0100 Subject: Fix "ActionFailed" not working and add "ActionCancelled" to customize handling of user hitting ESC on password prompt --- DcsBoot/DcsBoot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'DcsBoot') diff --git a/DcsBoot/DcsBoot.c b/DcsBoot/DcsBoot.c index 080b052..7029a10 100644 --- a/DcsBoot/DcsBoot.c +++ b/DcsBoot/DcsBoot.c @@ -201,7 +201,11 @@ DcsBootMain( // Authorize gBS->SetWatchdogTimer(0, 0, 0, NULL); res = EfiExec(NULL, L"\\EFI\\VeraCrypt\\DcsInt.dcs"); - if (EFI_ERROR(res)) { + if (EFI_ERROR(res) && (res != EFI_DCS_POSTEXEC_REQUESTED)) { + + // Clear DcsExecPartGuid before execute OS to avoid problem in VirtualBox with reboot. + EfiSetVar(L"DcsExecPartGuid", NULL, NULL, 0, EFI_VARIABLE_BOOTSERVICE_ACCESS); + EfiSetVar(L"DcsExecCmd", NULL, NULL, 0, EFI_VARIABLE_BOOTSERVICE_ACCESS); // ERR_PRINT(L"\nDcsInt.efi %r\n",res); if (res == EFI_DCS_SHUTDOWN_REQUESTED) { -- cgit v1.2.3