]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Incorrect warning message for Opal admin revert action
authorChu, Maggie <maggie.chu@intel.com>
Tue, 25 Dec 2018 05:54:25 +0000 (13:54 +0800)
committerEric Dong <eric.dong@intel.com>
Tue, 8 Jan 2019 01:53:21 +0000 (09:53 +0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=1421
"revert action will take long time..." warning should be removed
from pop up message when keep user data selected.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Maggie Chu <maggie.chu@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c

index e3f5056953bb21809354364bb14ac11a37116cbb..38268539fb055b9ddb51f693e3cfc144bf06cbf1 100644 (file)
@@ -1537,7 +1537,8 @@ ProcessOpalRequestRevert (
 \r
   PopUpString = OpalGetPopUpString (Dev, RequestString);\r
 \r
-  if (Dev->OpalDisk.EstimateTimeCost > MAX_ACCEPTABLE_REVERTING_TIME) {\r
+  if ((!KeepUserData) &&\r
+      (Dev->OpalDisk.EstimateTimeCost > MAX_ACCEPTABLE_REVERTING_TIME)) {\r
     BufferSize = StrSize (L"Warning: Revert action will take about ####### seconds, DO NOT power off system during the revert action!");\r
     PopUpString2 = AllocateZeroPool (BufferSize);\r
     ASSERT (PopUpString2 != NULL);\r