MdeModulePkg CapsuleApp: Use EFI_UNSUPPORTED for incorrect Argc case

Align code to use EFI_UNSUPPORTED for all incorrect Argc cases.

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-13 16:00:15 +08:00
parent d9c640b928
commit 10944bc390
1 changed files with 8 additions and 7 deletions

View File

@ -193,7 +193,7 @@ CreateBmpFmp (
// VerticalResolution >= BMP_IMAGE_HEADER.PixelHeight // VerticalResolution >= BMP_IMAGE_HEADER.PixelHeight
if (Argc != 5) { if (Argc != 5) {
Print(L"CapsuleApp: Invalid Parameter.\n"); Print(L"CapsuleApp: Incorrect parameter count.\n");
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -387,7 +387,7 @@ CreateNestedFmp (
EFI_STATUS Status; EFI_STATUS Status;
if (Argc != 5) { if (Argc != 5) {
Print(L"CapsuleApp: Invalid Parameter.\n"); Print(L"CapsuleApp: Incorrect parameter count.\n");
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -793,7 +793,8 @@ PrintUsage (
@param[in] SystemTable The system table. @param[in] SystemTable The system table.
@retval EFI_SUCCESS Command completed successfully. @retval EFI_SUCCESS Command completed successfully.
@retval EFI_INVALID_PARAMETER Command usage error. @retval EFI_UNSUPPORTED Command usage unsupported.
@retval EFI_INVALID_PARAMETER Command usage invalid.
@retval EFI_NOT_FOUND The input file can't be found. @retval EFI_NOT_FOUND The input file can't be found.
**/ **/
EFI_STATUS EFI_STATUS
@ -824,12 +825,12 @@ UefiMain (
} }
if (Argc < 2) { if (Argc < 2) {
PrintUsage(); PrintUsage();
return EFI_INVALID_PARAMETER; return EFI_UNSUPPORTED;
} }
if (StrCmp(Argv[1], L"-D") == 0) { if (StrCmp(Argv[1], L"-D") == 0) {
if (Argc < 3) { if (Argc != 3) {
Print(L"CapsuleApp: NO input capsule name.\n"); Print(L"CapsuleApp: Incorrect parameter count.\n");
return EFI_INVALID_PARAMETER; return EFI_UNSUPPORTED;
} }
Status = DumpCapsule(Argv[2]); Status = DumpCapsule(Argv[2]);
return Status; return Status;