diff options
author | kavsrf <kavsrf@gmail.com> | 2017-03-19 17:05:02 +0300 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-18 15:41:14 +0200 |
commit | 51088d231d73cbe14516d553e97237e7f5a4f147 (patch) | |
tree | d27fde3652d9a852d43a3859f5314bd4ae7f13d1 /Library/CommonLib | |
parent | bd99a40d81e34e048dc8e6daefc7ff3d9f3aef56 (diff) | |
download | VeraCrypt-DCS-51088d231d73cbe14516d553e97237e7f5a4f147.tar.gz VeraCrypt-DCS-51088d231d73cbe14516d553e97237e7f5a4f147.zip |
os hide prepare option
Diffstat (limited to 'Library/CommonLib')
-rw-r--r-- | Library/CommonLib/EfiConsole.c | 15 |
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;
}
|