public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Eric Dong <eric.dong@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>
Subject: [Patch 2/2] SecurityPkg/OpalPassword: Fix PSID revert no hint message.
Date: Mon, 14 May 2018 15:36:01 +0800	[thread overview]
Message-ID: <20180514073601.9700-3-eric.dong@intel.com> (raw)
In-Reply-To: <20180514073601.9700-1-eric.dong@intel.com>

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.

Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 29 ++++++++++++++++++--------
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index 8733564f00..5d1638d5cf 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -687,15 +687,26 @@ OpalDriverPopUpPsidInput (
   InputLength = 0;
   while (TRUE) {
     Mask[InputLength] = L'_';
-    CreatePopUp (
-      EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
-      &InputKey,
-      PopUpString,
-      PopUpString2,
-      L"---------------------",
-      Mask,
-      NULL
-    );
+    if (PopUpString2 == NULL) {
+      CreatePopUp (
+        EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+        &InputKey,
+        PopUpString,
+        L"---------------------",
+        Mask,
+        NULL
+      );
+    } else {
+      CreatePopUp (
+        EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+        &InputKey,
+        PopUpString,
+        PopUpString2,
+        L"---------------------",
+        Mask,
+        NULL
+      );
+    }
 
     //
     // Check key.
-- 
2.15.0.windows.1



  parent reply	other threads:[~2018-05-14  7:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14  7:35 [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Eric Dong
2018-05-14  7:36 ` [Patch 1/2] SecurityPkg/TcgStorageOpalLib: Fix GCC build failure Eric Dong
2018-05-14  7:36 ` Eric Dong [this message]
2018-05-14  8:25 ` [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Wu, Hao A

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=20180514073601.9700-3-eric.dong@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