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...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.d...@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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel