]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg/OpalPassword: Fix PSID revert no hint message.
authorEric Dong <eric.dong@intel.com>
Mon, 14 May 2018 07:28:40 +0000 (15:28 +0800)
committerEric Dong <eric.dong@intel.com>
Tue, 15 May 2018 00:24:35 +0000 (08:24 +0800)
For no warning message when do the PSID revert action, the
message in the popup dialog is not enough. The error use
of NULL for CreatePopUp function caused this regression.
This change fixed it.

Passed Unit Test:
1. Check PSID revert with/without warning message cases.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c

index 8733564f00b3043c9775329a20068747de40c615..5d1638d5cf01f8ac8676e119eaf8373960ef3a0b 100644 (file)
@@ -687,15 +687,26 @@ OpalDriverPopUpPsidInput (
   InputLength = 0;\r
   while (TRUE) {\r
     Mask[InputLength] = L'_';\r
-    CreatePopUp (\r
-      EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
-      &InputKey,\r
-      PopUpString,\r
-      PopUpString2,\r
-      L"---------------------",\r
-      Mask,\r
-      NULL\r
-    );\r
+    if (PopUpString2 == NULL) {\r
+      CreatePopUp (\r
+        EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
+        &InputKey,\r
+        PopUpString,\r
+        L"---------------------",\r
+        Mask,\r
+        NULL\r
+      );\r
+    } else {\r
+      CreatePopUp (\r
+        EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
+        &InputKey,\r
+        PopUpString,\r
+        PopUpString2,\r
+        L"---------------------",\r
+        Mask,\r
+        NULL\r
+      );\r
+    }\r
 \r
     //\r
     // Check key.\r