MdeModulePkg/CapsuleApp: Enhance Capsule-On-Disk related functions.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1840

1. Add missing '\n' in usage.
2. Fix the dead loop of CapsuleApp -L.
3. Fix the bug that CapsuleApp -OD cannot perform capsules in sub-
folder.
4. Optimize the handling for option -NR and -OD to support both
'CapsuleApp <Capsule> -OD -NR' and 'CapsuleApp <Capsule> -NR -OD'.
5. Check if Capsule-On-Disk is supported by "OsIndicationsSupported"
variable firstly before processing capsules. If not supported, prompt
an error message and quit the process.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
xuwei6
2019-05-24 16:52:35 +08:00
committed by Zhang, Chao B
parent 0d4aa276d1
commit 6470a43160
3 changed files with 77 additions and 24 deletions

View File

@@ -812,8 +812,8 @@ DumpCapsuleFromDisk (
//
// Get file count first
//
Status = FileHandleFindFirstFile (DirHandle, &FileInfo);
do {
Status = FileHandleFindFirstFile (DirHandle, &FileInfo);
if (EFI_ERROR (Status) || FileInfo == NULL) {
Print (L"Get File Info Fail. Status = %r\n", Status);
goto Done;
@@ -846,8 +846,8 @@ DumpCapsuleFromDisk (
//
// Get all file info
//
Status = FileHandleFindFirstFile (DirHandle, &FileInfo);
do {
Status = FileHandleFindFirstFile (DirHandle, &FileInfo);
if (EFI_ERROR (Status) || FileInfo == NULL) {
Print (L"Get File Info Fail. Status = %r\n", Status);
goto Done;