MdeModulePkg CapsuleApp: Prompt info for -C option

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Star Zeng 2018-07-26 10:14:00 +08:00
parent 16299ec84a
commit 8b03c82d36
2 changed files with 14 additions and 5 deletions

View File

@ -70,7 +70,7 @@ DumpCapsule (
@retval EFI_UNSUPPORTED Input parameter is not valid.
**/
EFI_STATUS
DmpCapsuleStatusVariable (
DumpCapsuleStatusVariable (
VOID
);
@ -466,11 +466,13 @@ ClearCapsuleStatusVariable (
UINT32 Index;
CHAR16 CapsuleVarName[20];
CHAR16 *TempVarName;
BOOLEAN Found;
StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CapsuleVarName[0]), L"Capsule");
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
Index = 0;
Found = FALSE;
while (TRUE) {
UnicodeSPrint (TempVarName, 5 * sizeof(CHAR16), L"%04x", Index);
@ -481,12 +483,15 @@ ClearCapsuleStatusVariable (
0,
(VOID *)NULL
);
if (EFI_ERROR(Status)) {
if (Status == EFI_NOT_FOUND) {
//
// There is no capsule variables, quit
// There is no more capsule variables, quit
//
break;
}
Found = TRUE;
Print (L"Clear %s %r\n", CapsuleVarName, Status);
Index++;
if (Index > 0xFFFF) {
@ -494,6 +499,10 @@ ClearCapsuleStatusVariable (
}
}
if (!Found) {
Print (L"No any Capsule#### variable found\n");
}
return EFI_SUCCESS;
}
@ -850,7 +859,7 @@ UefiMain (
return Status;
}
if (StrCmp(Argv[1], L"-S") == 0) {
Status = DmpCapsuleStatusVariable();
Status = DumpCapsuleStatusVariable();
return EFI_SUCCESS;
}
if (StrCmp(Argv[1], L"-C") == 0) {

View File

@ -283,7 +283,7 @@ Done:
@retval EFI_UNSUPPORTED Input parameter is not valid.
**/
EFI_STATUS
DmpCapsuleStatusVariable (
DumpCapsuleStatusVariable (
VOID
)
{