From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [PATCH 5/6] MdeModulePkg CapsuleApp: Prompt info for -C option
Date: Thu, 26 Jul 2018 18:16:54 +0800 [thread overview]
Message-ID: <1532600215-67392-6-git-send-email-star.zeng@intel.com> (raw)
In-Reply-To: <1532600215-67392-1-git-send-email-star.zeng@intel.com>
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>
---
MdeModulePkg/Application/CapsuleApp/CapsuleApp.c | 17 +++++++++++++----
MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 2 +-
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
index 93bf4252bac6..2967b0d1dd18 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
@@ -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) {
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
index 4c85e8c23dff..11bf2e1d4530 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
@@ -283,7 +283,7 @@ Done:
@retval EFI_UNSUPPORTED Input parameter is not valid.
**/
EFI_STATUS
-DmpCapsuleStatusVariable (
+DumpCapsuleStatusVariable (
VOID
)
{
--
2.7.0.windows.1
next prev parent reply other threads:[~2018-07-26 10:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 10:16 [PATCH 0/5] CapsuleApp: Some enhancements Star Zeng
2018-07-26 10:16 ` [PATCH 1/6] MdeModulePkg CapsuleApp: Fix VS2012 build failure caused by 5410502 Star Zeng
2018-07-27 0:43 ` Bi, Dandan
2018-07-26 10:16 ` [PATCH 2/6] MdeModulePkg CapsuleApp: Fix -D failed to dump Nest FMP capsule Star Zeng
2018-07-26 10:16 ` [PATCH 3/6] MdeModulePkg CapsuleApp: Refine -N option help information Star Zeng
2018-07-26 10:16 ` [PATCH 4/6] MdeModulePkg CapsuleApp: Index need be decimal for -P GET option Star Zeng
2018-07-26 10:16 ` Star Zeng [this message]
2018-07-26 10:16 ` [PATCH 6/6] MdeModulePkg CapsuleApp: Check capsule header for -D and -N options Star Zeng
2018-07-26 12:50 ` [PATCH 0/5] CapsuleApp: Some enhancements Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532600215-67392-6-git-send-email-star.zeng@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox