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" --- Include/Library/CommonLib.h | 8 ++++++++ Include/Library/PasswordLib.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'Include') diff --git a/Include/Library/CommonLib.h b/Include/Library/CommonLib.h index 17b0c72..479c5c1 100644 --- a/Include/Library/CommonLib.h +++ b/Include/Library/CommonLib.h @@ -24,6 +24,14 @@ https://opensource.org/licenses/LGPL-3.0 #include #include +////////////////////////////////////////////////////////////////////////// +// Custom error codes +////////////////////////////////////////////////////////////////////////// + +#define EFI_DCS_SHUTDOWN_REQUESTED ENCODE_ERROR(0xDC50001) +#define EFI_DCS_REBOOT_REQUESTED ENCODE_ERROR(0xDC50002) +#define EFI_DCS_HALT_REQUESTED ENCODE_ERROR(0xDC50003) + ////////////////////////////////////////////////////////////////////////// // Check error ////////////////////////////////////////////////////////////////////////// diff --git a/Include/Library/PasswordLib.h b/Include/Library/PasswordLib.h index 25ee1aa..cc77957 100644 --- a/Include/Library/PasswordLib.h +++ b/Include/Library/PasswordLib.h @@ -43,7 +43,8 @@ enum AskPwdType { enum AskPwdRetCode { AskPwdRetCancel = 0, AskPwdRetLogin = 1, - AskPwdRetChange + AskPwdRetChange = 2, + AskPwdRetTimeout }; VOID -- cgit v1.2.3