/**\r
Confirm whether user truly want to do the revert action.\r
\r
- @param OpalDisk The device which need to do the revert action.\r
+ @param OpalDisk The device which need to perform data removal action.\r
+ @param ActionString Specifies the action name shown on pop up menu.\r
\r
@retval EFI_SUCCESS Confirmed user want to do the revert action.\r
**/\r
EFI_STATUS\r
-HiiConfirmRevertAction (\r
- IN OPAL_DISK *OpalDisk\r
+HiiConfirmDataRemovalAction (\r
+ IN OPAL_DISK *OpalDisk,\r
+ IN CHAR16 *ActionString\r
\r
)\r
{\r
ApproveResponse = L'Y';\r
RejectResponse = L'N';\r
\r
- UnicodeSPrint(Unicode, StrSize(L"WARNING: Revert device needs about ####### seconds"), L"WARNING: Revert device needs about %d seconds", OpalDisk->EstimateTimeCost);\r
+ UnicodeSPrint(Unicode, StrSize(L"WARNING: ############# action needs about ####### seconds"), L"WARNING: %s action needs about %d seconds", ActionString, OpalDisk->EstimateTimeCost);\r
\r
do {\r
CreatePopUp(\r
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
&Key,\r
Unicode,\r
- L" System should not be powered off until revert completion ",\r
+ L" System should not be powered off until action completion ",\r
L" ",\r
L" Press 'Y/y' to continue, press 'N/n' to cancal ",\r
NULL\r
case HII_KEY_ID_PSID_REVERT:\r
OpalDisk = HiiGetOpalDiskCB(gHiiConfiguration.SelectedDiskIndex);\r
if (OpalDisk != NULL) {\r
- return HiiConfirmRevertAction (OpalDisk);\r
+ return HiiConfirmDataRemovalAction (OpalDisk, L"Revert");\r
+ } else {\r
+ ASSERT (FALSE);\r
+ return EFI_SUCCESS;\r
+ }\r
+\r
+ case HII_KEY_ID_SECURE_ERASE:\r
+ OpalDisk = HiiGetOpalDiskCB(gHiiConfiguration.SelectedDiskIndex);\r
+ if (OpalDisk != NULL) {\r
+ return HiiConfirmDataRemovalAction (OpalDisk, L"Secure erase");\r
} else {\r
ASSERT (FALSE);\r
return EFI_SUCCESS;\r