X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FApplication%2FCapsuleApp%2FCapsuleApp.c;h=e943038a0d00dcee4605961ced7e77609d9404cd;hp=e1e48befc2de8895142af8d1cd9a0b95c0d358eb;hb=045bb323647c8a2e2f3b319ec5aedff34a730ab0;hpb=bf9b044e67bcb685ffebfccbc73c5a81deea7c5b diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c index e1e48befc2..e943038a0d 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c @@ -431,7 +431,7 @@ CreateNestedFmp ( ZeroMem(NestedCapsuleHeader, NESTED_CAPSULE_HEADER_SIZE); CopyGuid(&NestedCapsuleHeader->CapsuleGuid, ImageTypeId); NestedCapsuleHeader->HeaderSize = NESTED_CAPSULE_HEADER_SIZE; - NestedCapsuleHeader->Flags = (FwType == ESRT_FW_TYPE_DEVICEFIRMWARE) ? SYSTEM_FIRMWARE_FLAG : DEVICE_FIRMWARE_FLAG; + NestedCapsuleHeader->Flags = (FwType == ESRT_FW_TYPE_SYSTEMFIRMWARE) ? SYSTEM_FIRMWARE_FLAG : DEVICE_FIRMWARE_FLAG; NestedCapsuleHeader->CapsuleImageSize = (UINT32)FullCapsuleBufferSize; CopyMem((UINT8 *)NestedCapsuleHeader + NestedCapsuleHeader->HeaderSize, CapsuleBuffer, FileSize); @@ -742,13 +742,13 @@ PrintUsage ( Print(L" which is defined in UEFI specification.\n"); Print(L" -P: Dump UEFI FMP protocol info.\n"); Print(L" -E: Dump UEFI ESRT table info.\n"); - Print(L" -G: Convert a BMP file to be a UX capsule,\n"); + Print(L" -G: Convert a BMP file to be an UX capsule,\n"); Print(L" according to Windows Firmware Update document\n"); Print(L" -N: Append a Capsule Header to an existing capsule image,\n"); Print(L" according to Windows Firmware Update document\n"); Print(L" -O: Output new Capsule file name\n"); - Print(L" -D: Dump Capsule image header information and FMP header information,\n"); - Print(L" if it is an FMP capsule.\n"); + Print(L" -D: Dump Capsule image header information, image payload information if it is an UX capsule\n"); + Print(L" and FMP header information if it is a FMP capsule.\n"); } /** @@ -792,6 +792,10 @@ UefiMain ( return EFI_INVALID_PARAMETER; } if (StrCmp(Argv[1], L"-D") == 0) { + if (Argc < 3) { + Print(L"CapsuleApp: NO input capsule name.\n"); + return EFI_INVALID_PARAMETER; + } Status = DumpCapsule(Argv[2]); return Status; }