VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library/CommonLib
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2017-03-19 17:05:02 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-18 15:41:14 +0200
commit51088d231d73cbe14516d553e97237e7f5a4f147 (patch)
treed27fde3652d9a852d43a3859f5314bd4ae7f13d1 /Library/CommonLib
parentbd99a40d81e34e048dc8e6daefc7ff3d9f3aef56 (diff)
downloadVeraCrypt-DCS-51088d231d73cbe14516d553e97237e7f5a4f147.tar.gz
VeraCrypt-DCS-51088d231d73cbe14516d553e97237e7f5a4f147.zip
os hide prepare option
Diffstat (limited to 'Library/CommonLib')
-rw-r--r--Library/CommonLib/EfiConsole.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/Library/CommonLib/EfiConsole.c b/Library/CommonLib/EfiConsole.c
index 63b32ae..3ab1515 100644
--- a/Library/CommonLib/EfiConsole.c
+++ b/Library/CommonLib/EfiConsole.c
@@ -204,11 +204,20 @@ AskAsciiString(
CHAR8* prompt,
CHAR8* str,
UINTN max_len,
- UINT8 visible)
+ UINT8 visible,
+ CHAR8* defStr)
{
UINTN len = 0;
- OUT_PRINT(L"%a", prompt);
- GetLine(&len, NULL, str, max_len, visible);
+ if (defStr == NULL) {
+ OUT_PRINT(L"%a", prompt);
+ } else {
+ OUT_PRINT(L"[%a] %a", defStr, prompt);
+ }
+ GetLine(&len, NULL, str, max_len, visible);
+ if (defStr != NULL && len == 0) {
+ AsciiStrCpyS(str, max_len, defStr);
+ len = AsciiStrLen(str);
+ }
return (UINT32)len;
}