From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>,
Eric Dong <eric.dong@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: [patch 1/4] MdeModulePkg/DisplayEngine: Popup dialogue when password is not supported
Date: Thu, 17 Nov 2016 10:24:04 +0800 [thread overview]
Message-ID: <1479349447-46344-2-git-send-email-dandan.bi@intel.com> (raw)
In-Reply-To: <1479349447-46344-1-git-send-email-dandan.bi@intel.com>
when the password is not supported, pop up a dialogue
to let user know the reason.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@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
next prev parent reply other threads:[~2016-11-17 2:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 2:24 [patch 0/4] MdeModulePkg: Don't support password without interactive flag Dandan Bi
2016-11-17 2:24 ` Dandan Bi [this message]
2016-11-17 2:24 ` [patch 2/4] MdeModulePkg/SetupBrowser:Don't " Dandan Bi
2016-11-17 2:24 ` [patch 3/4] MdeModulePkg: Clear the buffer after using it Dandan Bi
2016-11-17 2:24 ` [patch 4/4] MdeModulePkg/DriverSampleDxe: Remove the non-interactive password Dandan Bi
2016-11-24 5:15 ` [patch 0/4] MdeModulePkg: Don't support password without interactive flag Gao, Liming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479349447-46344-2-git-send-email-dandan.bi@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox