From 88f0c4e29c03600f2a45a5bd14c500049d2b09dc Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Tue, 15 Nov 2016 19:10:59 +0800 Subject: [PATCH] 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 --- MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 3 +++ MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h | 3 ++- MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni | 7 +++++-- MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c | 5 +++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index 316e2e3705..0eb7dddf7b 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -153,6 +153,7 @@ CHAR16 *gConfirmOptYes; CHAR16 *gConfirmOptNo; CHAR16 *gConfirmMsgConnect; CHAR16 *gConfirmMsgEnd; +CHAR16 *gPasswordUnsupported; CHAR16 gModalSkipColumn; CHAR16 gPromptBlockWidth; CHAR16 gOptionBlockWidth; @@ -248,6 +249,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); } /** @@ -301,6 +303,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 063e94c6bc..45532ab126 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 802a1b3ead..bd9c8b407c 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni @@ -1,6 +1,6 @@ // *++ // -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 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 // which accompanies this distribution. The full text of the license may be found at @@ -116,4 +116,7 @@ #string RECONNECT_REQUIRED #language en-US "Reconnect is required, exit and reconnect" #language fr-FR "Reconnect is required, exit and reconnect" #string GET_TIME_FAIL #language en-US " Get date/time fail, display ??." - #language fr-FR " Get data/time fail, display ??." \ No newline at end of file + #language fr-FR " Get data/time fail, display ??." +#string PASSWORD_NOT_SUPPORTED #language en-US "Unsupported! Because no interactieve flag or no ConfigAccess protocol!" + #language fr-FR "Unsupported! Because no interactieve flag or no ConfigAccess protocol!" + diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c index c61a3950a8..95bd5f0919 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c @@ -814,6 +814,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; } -- 2.39.2