]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DisplayEngine: Popup dialogue when password is not supported
authorDandan Bi <dandan.bi@intel.com>
Tue, 15 Nov 2016 11:10:59 +0000 (19:10 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 25 Nov 2016 02:50:26 +0000 (10:50 +0800)
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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
MdeModulePkg/Universal/DisplayEngineDxe/FormDisplayStr.uni
MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c

index 316e2e3705d8911a34d067cd9a9cbbdbfacd6eac..0eb7dddf7baad2cb7e416fa2e25c1c8ee956593f 100644 (file)
@@ -153,6 +153,7 @@ CHAR16            *gConfirmOptYes;
 CHAR16            *gConfirmOptNo;\r
 CHAR16            *gConfirmMsgConnect;\r
 CHAR16            *gConfirmMsgEnd;\r
+CHAR16            *gPasswordUnsupported;\r
 CHAR16            gModalSkipColumn;\r
 CHAR16            gPromptBlockWidth;\r
 CHAR16            gOptionBlockWidth;\r
@@ -248,6 +249,7 @@ InitializeDisplayStrings (
   gConfirmOptNo         = GetToken (STRING_TOKEN (CONFIRM_OPTION_NO), gHiiHandle);\r
   gConfirmMsgConnect    = GetToken (STRING_TOKEN (CONFIRM_OPTION_CONNECT), gHiiHandle);\r
   gConfirmMsgEnd        = GetToken (STRING_TOKEN (CONFIRM_OPTION_END), gHiiHandle);\r
+  gPasswordUnsupported  = GetToken (STRING_TOKEN (PASSWORD_NOT_SUPPORTED ), gHiiHandle);\r
 }\r
 \r
 /**\r
@@ -301,6 +303,7 @@ FreeDisplayStrings (
   FreePool (gConfirmOptNo);\r
   FreePool (gConfirmMsgConnect);\r
   FreePool (gConfirmMsgEnd);\r
+  FreePool (gPasswordUnsupported);\r
 }\r
 \r
 /**\r
index 063e94c6bc4d45139ca508fac6e7b1c4cb004c59..45532ab126ad688ca6f61b91f8128aa27024a32e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   FormDiplay protocol to show Form\r
 \r
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -58,6 +58,7 @@ extern CHAR16            *gMiniString;
 extern CHAR16            *gOptionMismatch;\r
 extern CHAR16            *gFormSuppress;\r
 extern CHAR16            *gProtocolNotFound;\r
+extern CHAR16            *gPasswordUnsupported;\r
 \r
 extern CHAR16            gPromptBlockWidth;\r
 extern CHAR16            gOptionBlockWidth;\r
index 802a1b3ead84c96a5e9fc4d99c55cb7d88662160..bd9c8b407ca1a6afc6bd9e20046ee744ab19d8d5 100644 (file)
@@ -1,6 +1,6 @@
 // *++\r
 //\r
-// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution.  The full text of the license may be found at\r
 #string RECONNECT_REQUIRED             #language en-US  "Reconnect is required, exit and reconnect"\r
                                        #language fr-FR  "Reconnect is required, exit and reconnect"\r
 #string GET_TIME_FAIL                  #language en-US  " Get date/time fail, display ??."\r
-                                       #language fr-FR  " Get data/time fail, display ??."
\ No newline at end of file
+                                       #language fr-FR  " Get data/time fail, display ??."\r
+#string PASSWORD_NOT_SUPPORTED         #language en-US  "Unsupported! Because no interactieve flag or no ConfigAccess protocol!"\r
+                                       #language fr-FR  "Unsupported! Because no interactieve flag or no ConfigAccess protocol!"\r
+\r
index c61a3950a8fe3e58a5d3dede1521e05283f46c40..95bd5f091932007b7abcb736ba6b73b7d744f64c 100644 (file)
@@ -814,6 +814,11 @@ PasswordProcess (
     //\r
     // Password can't be set now. \r
     //\r
+    if (Status == EFI_UNSUPPORTED) {\r
+      do {\r
+        CreateDialog (&Key, gEmptyString, gPasswordUnsupported, gPressEnter, gEmptyString, NULL);\r
+      } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);\r
+    }\r
     FreePool (StringPtr);\r
     return EFI_SUCCESS;\r
   }\r