From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7B62381E61 for ; Wed, 16 Nov 2016 18:24:16 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 16 Nov 2016 18:24:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,651,1473145200"; d="scan'208";a="32318916" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga006.fm.intel.com with ESMTP; 16 Nov 2016 18:24:19 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Liming Gao , Eric Dong , Jiewen Yao Date: Thu, 17 Nov 2016 10:24:04 +0800 Message-Id: <1479349447-46344-2-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1479349447-46344-1-git-send-email-dandan.bi@intel.com> References: <1479349447-46344-1-git-send-email-dandan.bi@intel.com> Subject: [patch 1/4] MdeModulePkg/DisplayEngine: Popup dialogue when password is not supported X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2016 02:24:16 -0000 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 --- 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.
+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 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.
+// 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 // 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