From 4922daee362adf600fd19f91aa11cc603d8d17e1 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 21 Mar 2019 20:57:16 +0100 Subject: 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" --- DcsBoot/DcsBoot.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'DcsBoot/DcsBoot.c') 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; } -- cgit v1.2.3