MdeModulePkg CapsuleApp: Show clear message when option is unrecognized
authorStar Zeng <star.zeng@intel.com>
Fri, 13 Jul 2018 07:28:21 +0000 (15:28 +0800)
committerStar Zeng <star.zeng@intel.com>
Mon, 23 Jul 2018 01:17:31 +0000 (09:17 +0800)
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>
MdeModulePkg/Application/CapsuleApp/CapsuleApp.c

index 80b66bc..a83ebf3 100644 (file)
@@ -850,10 +850,17 @@ UefiMain (
     }\r
     return EFI_SUCCESS;\r
   }\r
+\r
   if (StrCmp(Argv[1], L"-E") == 0) {\r
     DumpEsrtData();\r
     return EFI_SUCCESS;\r
   }\r
+\r
+  if (Argv[1][0] == L'-') {\r
+    Print(L"CapsuleApp: Unrecognized option(%s).\n", Argv[1]);\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   CapsuleFirstIndex = 1;\r
   NoReset = FALSE;\r
   if ((Argc > 1) && (StrCmp(Argv[Argc - 1], L"-NR") == 0)) {\r