]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe: Add support for PCD PcdPteMemoryEn...
[mirror_edk2.git] / MdeModulePkg / Universal / DisplayEngineDxe / ProcessOptions.c
index bb2faf3244d491608544d2b95db04f58c403348e..557e8ecd9466af49ec051db2e34fb5dd16fb41f2 100644 (file)
@@ -2,7 +2,7 @@
 Implementation for handling the User Interface option processing.\r
 \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
@@ -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
@@ -885,18 +890,8 @@ PasswordProcess (
     gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen;\r
     gUserInput->InputValue.Type = Question->CurrentValue.Type;\r
     gUserInput->InputValue.Value.string = HiiSetString(gFormData->HiiHandle, gUserInput->InputValue.Value.string, StringPtr, NULL);\r
-    FreePool (StringPtr); \r
 \r
     Status = EFI_SUCCESS;\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      //\r
-      // Reset state machine for password\r
-      //\r
-      Question->PasswordCheck (gFormData, Question, NULL);\r
-    }\r
-\r
-    return Status;\r
   } else {\r
     //\r
     // Reset state machine for password\r
@@ -912,7 +907,8 @@ PasswordProcess (
 \r
     Status = EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+  ZeroMem (TempString, (Maximum + 1) * sizeof (CHAR16));\r
+  ZeroMem (StringPtr, (Maximum + 1) * sizeof (CHAR16));\r
   FreePool (TempString);\r
   FreePool (StringPtr);\r
 \r