when the password is not supported, pop up a dialogue to let user know the reason.
Cc: Liming Gao <liming....@intel.com> Cc: Eric Dong <eric.d...@intel.com> Cc: Jiewen Yao <jiewen....@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan...@intel.com> --- 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 32fc920..07c3454 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -151,10 +151,11 @@ CHAR16 *gConfirmExitMsg2nd; CHAR16 *gConfirmOpt; CHAR16 *gConfirmOptYes; CHAR16 *gConfirmOptNo; CHAR16 *gConfirmMsgConnect; CHAR16 *gConfirmMsgEnd; +CHAR16 *gPasswordUnsupported; CHAR16 gModalSkipColumn; CHAR16 gPromptBlockWidth; CHAR16 gOptionBlockWidth; CHAR16 gHelpBlockWidth; CHAR16 *mUnknownString; @@ -246,10 +247,11 @@ InitializeDisplayStrings ( gConfirmOpt = GetToken (STRING_TOKEN (CONFIRM_OPTION), gHiiHandle); gConfirmOptYes = GetToken (STRING_TOKEN (CONFIRM_OPTION_YES), gHiiHandle); 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); } /** Free up the resource allocated for all strings required by Setup Browser. @@ -299,10 +301,11 @@ FreeDisplayStrings ( FreePool (gConfirmOpt); FreePool (gConfirmOptYes); FreePool (gConfirmOptNo); FreePool (gConfirmMsgConnect); FreePool (gConfirmMsgEnd); + FreePool (gPasswordUnsupported); } /** Get prompt string id from the opcode data buffer. diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h index 063e94c..45532ab 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h @@ -1,9 +1,9 @@ /** @file FormDiplay protocol to show Form -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR> 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 http://opensource.org/licenses/bsd-license.php. @@ -56,10 +56,11 @@ extern CHAR16 *gPressEnter; extern CHAR16 *gEmptyString; extern CHAR16 *gMiniString; extern CHAR16 *gOptionMismatch; extern CHAR16 *gFormSuppress; extern CHAR16 *gProtocolNotFound; +extern CHAR16 *gPasswordUnsupported; extern CHAR16 gPromptBlockWidth; extern CHAR16 gOptionBlockWidth; extern CHAR16 gHelpBlockWidth; extern CHAR16 *mUnknownString; diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni index 802a1b3..bd9c8b4 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni @@ -1,8 +1,8 @@ // *++ // -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR> +// Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR> // 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 // http://opensource.org/licenses/bsd-license.php // @@ -114,6 +114,9 @@ #string RECONNECT_CHANGES_OPTIONS #language en-US "Press 'Y' to save, 'N' to discard" #language fr-FR "Press 'Y' to save, 'N' to discard" #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 c61a395..95bd5f0 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c @@ -812,10 +812,15 @@ PasswordProcess ( Status = Question->PasswordCheck (gFormData, Question, StringPtr); if (Status == EFI_NOT_AVAILABLE_YET || Status == EFI_UNSUPPORTED) { // // 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; } if (EFI_ERROR (Status)) { -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel