From 155196fca4f438e4756d5b6342803550a3bca226 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Fri, 25 Nov 2016 14:35:32 +0800 Subject: MdeModulePkg/DisplayEngine: Popup dialogue when password is not supported when the password is not supported, pop up a dialogue to let user know the reason. Cc: Liming Gao Cc: Eric Dong Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Liming Gao --- .../Universal/DisplayEngineDxe/FormDisplay.c | 3 +++ .../Universal/DisplayEngineDxe/FormDisplay.h | 3 ++- .../Universal/DisplayEngineDxe/FormDisplayStr.uni | Bin 15016 -> 15536 bytes .../Universal/DisplayEngineDxe/ProcessOptions.c | 5 +++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index be75193ac6..94ed6f2a28 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -149,6 +149,7 @@ CHAR16 *gConfirmOptYes; CHAR16 *gConfirmOptNo; CHAR16 *gConfirmMsgConnect; CHAR16 *gConfirmMsgEnd; +CHAR16 *gPasswordUnsupported; CHAR16 gModalSkipColumn; CHAR16 gPromptBlockWidth; CHAR16 gOptionBlockWidth; @@ -240,6 +241,7 @@ InitializeDisplayStrings ( gConfirmOptNo = GetToken (STRING_TOKEN (CONFIRM_OPTION_NO), gHiiHandle); gConfirmMsgConnect = GetToken (STRING_TOKEN (CONFIRM_OPTION_CONNECT), gHiiHandle); gConfirmMsgEnd = GetToken (STRING_TOKEN (CONFIRM_OPTION_END), gHiiHandle); + gPasswordUnsupported = GetToken (STRING_TOKEN (PASSWORD_NOT_SUPPORTED ), gHiiHandle); } /** @@ -289,6 +291,7 @@ FreeDisplayStrings ( FreePool (gConfirmOptNo); FreePool (gConfirmMsgConnect); FreePool (gConfirmMsgEnd); + FreePool (gPasswordUnsupported); } /** diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h index 968d293afd..904ecae91f 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h @@ -1,7 +1,7 @@ /** @file FormDiplay protocol to show Form -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -58,6 +58,7 @@ extern CHAR16 *gMiniString; extern CHAR16 *gOptionMismatch; extern CHAR16 *gFormSuppress; extern CHAR16 *gProtocolNotFound; +extern CHAR16 *gPasswordUnsupported; extern CHAR16 gPromptBlockWidth; extern CHAR16 gOptionBlockWidth; diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni index cf6ed3f4f4..b07d8c3f87 100644 Binary files a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni and b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni differ diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c index 6608838a2a..7c60b74d44 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c @@ -813,6 +813,11 @@ PasswordProcess ( // // Password can't be set now. // + if (Status == EFI_UNSUPPORTED) { + do { + CreateDialog (&Key, gEmptyString, gPasswordUnsupported, gPressEnter, gEmptyString, NULL); + } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN); + } FreePool (StringPtr); return EFI_SUCCESS; } -- cgit