public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg: Incorrect warning message for Opal admin revert action
@ 2018-12-25  5:54 Maggie Chu
  2019-01-08  1:55 ` Dong, Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Maggie Chu @ 2018-12-25  5:54 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chao Zhang, Jiewen Yao, Eric Dong

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>
Cc: Eric Dong <eric.dong@intel.com>
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index e3f5056953..38268539fb 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -1537,7 +1537,8 @@ ProcessOpalRequestRevert (
 
   PopUpString = OpalGetPopUpString (Dev, RequestString);
 
-  if (Dev->OpalDisk.EstimateTimeCost > MAX_ACCEPTABLE_REVERTING_TIME) {
+  if ((!KeepUserData) &&
+      (Dev->OpalDisk.EstimateTimeCost > MAX_ACCEPTABLE_REVERTING_TIME)) {
     BufferSize = StrSize (L"Warning: Revert action will take about ####### seconds, DO NOT power off system during the revert action!");
     PopUpString2 = AllocateZeroPool (BufferSize);
     ASSERT (PopUpString2 != NULL);
-- 
2.16.2.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] SecurityPkg: Incorrect warning message for Opal admin revert action
  2018-12-25  5:54 [PATCH] SecurityPkg: Incorrect warning message for Opal admin revert action Maggie Chu
@ 2019-01-08  1:55 ` Dong, Eric
  0 siblings, 0 replies; 2+ messages in thread
From: Dong, Eric @ 2019-01-08  1:55 UTC (permalink / raw)
  To: Chu, Maggie, edk2-devel@lists.01.org; +Cc: Zhang, Chao B, Yao, Jiewen

Hi Maggie,

Thanks for your patch. Reviewed-by: Eric Dong <eric.dong@intel.com>

Pushed the patch 4ec00f82edc845548a2000fe514c6898932b8c95

Thanks,
Eric

> -----Original Message-----
> From: Chu, Maggie
> Sent: Tuesday, December 25, 2018 1:54 PM
> To: edk2-devel@lists.01.org
> Cc: Zhang, Chao B <chao.b.zhang@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [PATCH] SecurityPkg: Incorrect warning message for Opal admin
> revert action
> 
> 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>
> Cc: Eric Dong <eric.dong@intel.com>
> ---
>  SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> index e3f5056953..38268539fb 100644
> --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> @@ -1537,7 +1537,8 @@ ProcessOpalRequestRevert (
> 
>    PopUpString = OpalGetPopUpString (Dev, RequestString);
> 
> -  if (Dev->OpalDisk.EstimateTimeCost >
> MAX_ACCEPTABLE_REVERTING_TIME) {
> +  if ((!KeepUserData) &&
> +      (Dev->OpalDisk.EstimateTimeCost >
> MAX_ACCEPTABLE_REVERTING_TIME))
> + {
>      BufferSize = StrSize (L"Warning: Revert action will take about #######
> seconds, DO NOT power off system during the revert action!");
>      PopUpString2 = AllocateZeroPool (BufferSize);
>      ASSERT (PopUpString2 != NULL);
> --
> 2.16.2.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-08  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-25  5:54 [PATCH] SecurityPkg: Incorrect warning message for Opal admin revert action Maggie Chu
2019-01-08  1:55 ` Dong, Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox