VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/DcsBoot
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-21 20:57:16 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-21 20:57:16 +0100
commit4922daee362adf600fd19f91aa11cc603d8d17e1 (patch)
treed2e6e30739af3122661d961dca21bf58e0685dc9 /DcsBoot
parentc2582cc9a199b606835e8cdbf37991778efede4a (diff)
downloadVeraCrypt-DCS-4922daee362adf600fd19f91aa11cc603d8d17e1.tar.gz
VeraCrypt-DCS-4922daee362adf600fd19f91aa11cc603d8d17e1.zip
Implement better timeout mechanism for password input. Implement new actions "shutdown" and "reboot". Set default timeout value to 3 minutes and default timeout action to "shutdown"
Diffstat (limited to 'DcsBoot')
-rw-r--r--DcsBoot/DcsBoot.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/DcsBoot/DcsBoot.c b/DcsBoot/DcsBoot.c
index e013dea..d4f4d56 100644
--- a/DcsBoot/DcsBoot.c
+++ b/DcsBoot/DcsBoot.c
@@ -169,6 +169,20 @@ DcsBootMain(
res = EfiExec(NULL, L"\\EFI\\VeraCrypt\\DcsInt.dcs");
if (EFI_ERROR(res)) {
// ERR_PRINT(L"\nDcsInt.efi %r\n",res);
+ if (res == EFI_DCS_SHUTDOWN_REQUESTED)
+ {
+ res = EFI_SUCCESS;
+ gST->RuntimeServices->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
+ }
+ else if (res == EFI_DCS_REBOOT_REQUESTED)
+ {
+ res = EFI_SUCCESS;
+ gST->RuntimeServices->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
+ }
+ else if (res == EFI_DCS_HALT_REQUESTED)
+ {
+ EfiCpuHalt();
+ }
return res;
}