Also add help info for CapsuleApp -P GET 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>
Print(L" which is defined in UEFI specification.\n");\r
Print(L" -C: Clear capsule report variable (EFI_CAPSULE_REPORT_GUID),\n");\r
Print(L" which is defined in UEFI specification.\n");\r
Print(L" which is defined in UEFI specification.\n");\r
Print(L" -C: Clear capsule report variable (EFI_CAPSULE_REPORT_GUID),\n");\r
Print(L" which is defined in UEFI specification.\n");\r
- Print(L" -P: Dump UEFI FMP protocol info.\n");\r
+ Print(L" -P: Dump UEFI FMP protocol info, or get image with specified\n");\r
+ Print(L" ImageTypeId and index to a file if 'GET' option is used.\n");\r
Print(L" -E: Dump UEFI ESRT table info.\n");\r
Print(L" -G: Convert a BMP file to be an UX capsule,\n");\r
Print(L" according to Windows Firmware Update document\n");\r
Print(L" -E: Dump UEFI ESRT table info.\n");\r
Print(L" -G: Convert a BMP file to be an UX capsule,\n");\r
Print(L" according to Windows Firmware Update document\n");\r
DumpFmpData();\r
}\r
if (Argc >= 3) {\r
DumpFmpData();\r
}\r
if (Argc >= 3) {\r
- if (StrCmp(Argv[2], L"GET") == 0) {\r
+ if (StrCmp(Argv[2], L"GET") != 0) {\r
+ Print(L"CapsuleApp: Unrecognized option(%s).\n", Argv[2]);\r
+ return EFI_UNSUPPORTED;\r
+ } else {\r
+ if (Argc != 7) {\r
+ Print(L"CapsuleApp: Incorrect parameter count.\n");\r
+ return EFI_UNSUPPORTED;\r
+ }\r
+\r
EFI_GUID ImageTypeId;\r
UINTN ImageIndex;\r
//\r
EFI_GUID ImageTypeId;\r
UINTN ImageIndex;\r
//\r
return EFI_INVALID_PARAMETER;\r
}\r
ImageIndex = StrDecimalToUintn(Argv[4]);\r
return EFI_INVALID_PARAMETER;\r
}\r
ImageIndex = StrDecimalToUintn(Argv[4]);\r
- if (StrCmp(Argv[5], L"-O") == 0) {\r
- DumpFmpImage(&ImageTypeId, ImageIndex, Argv[6]);\r
+ if (StrCmp(Argv[5], L"-O") != 0) {\r
+ Print(L"CapsuleApp: NO output file name.\n");\r
+ return EFI_UNSUPPORTED;\r
+ DumpFmpImage(&ImageTypeId, ImageIndex, Argv[6]);\r
}\r
}\r
return EFI_SUCCESS;\r
}\r
}\r
return EFI_SUCCESS;\r