summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Application
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-07-13 16:00:15 +0800
committerStar Zeng <star.zeng@intel.com>2018-07-23 09:17:39 +0800
commit10944bc390f52fcd418670fe0171da1d4f3b05cc (patch)
tree16ed498a1d48983782e4dd5d0ad2b7ad7657450e /MdeModulePkg/Application
parentd9c640b9282dd3a6ee45bc5886e7d5b0e586c95d (diff)
downloadedk2-10944bc390f52fcd418670fe0171da1d4f3b05cc.tar.gz
edk2-10944bc390f52fcd418670fe0171da1d4f3b05cc.tar.bz2
edk2-10944bc390f52fcd418670fe0171da1d4f3b05cc.zip
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>
Diffstat (limited to 'MdeModulePkg/Application')
-rw-r--r--MdeModulePkg/Application/CapsuleApp/CapsuleApp.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
index dbcffddea9..df5de91ef5 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
@@ -193,7 +193,7 @@ CreateBmpFmp (
// VerticalResolution >= BMP_IMAGE_HEADER.PixelHeight
if (Argc != 5) {
- Print(L"CapsuleApp: Invalid Parameter.\n");
+ Print(L"CapsuleApp: Incorrect parameter count.\n");
return EFI_UNSUPPORTED;
}
@@ -387,7 +387,7 @@ CreateNestedFmp (
EFI_STATUS Status;
if (Argc != 5) {
- Print(L"CapsuleApp: Invalid Parameter.\n");
+ Print(L"CapsuleApp: Incorrect parameter count.\n");
return EFI_UNSUPPORTED;
}
@@ -793,7 +793,8 @@ PrintUsage (
@param[in] SystemTable The system table.
@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.
**/
EFI_STATUS
@@ -824,12 +825,12 @@ UefiMain (
}
if (Argc < 2) {
PrintUsage();
- return EFI_INVALID_PARAMETER;
+ return EFI_UNSUPPORTED;
}
if (StrCmp(Argv[1], L"-D") == 0) {
- if (Argc < 3) {
- Print(L"CapsuleApp: NO input capsule name.\n");
- return EFI_INVALID_PARAMETER;
+ if (Argc != 3) {
+ Print(L"CapsuleApp: Incorrect parameter count.\n");
+ return EFI_UNSUPPORTED;
}
Status = DumpCapsule(Argv[2]);
return Status;