From nobody Sun Feb 8 22:34:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1531472946419604.9062217921165; Fri, 13 Jul 2018 02:09:06 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E3F4520986ADA; Fri, 13 Jul 2018 02:09:03 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0AA1B20986ACF for ; Fri, 13 Jul 2018 02:09:02 -0700 (PDT) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2018 02:09:02 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by orsmga006.jf.intel.com with ESMTP; 13 Jul 2018 02:08:55 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,347,1526367600"; d="scan'208";a="57367758" From: Star Zeng To: edk2-devel@lists.01.org Date: Fri, 13 Jul 2018 17:08:43 +0800 Message-Id: <1531472923-253528-7-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1531472923-253528-1-git-send-email-star.zeng@intel.com> References: <1531472923-253528-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH 6/6] MdeModulePkg CapsuleApp: Use EFI_UNSUPPORTED for incorrect Argc case X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Jiewen Yao , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Align code to use EFI_UNSUPPORTED for all incorrect Argc cases. Cc: Michael D Kinney Cc: Jiewen Yao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Application/CapsuleApp/CapsuleApp.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c b/MdeModulePk= g/Application/CapsuleApp/CapsuleApp.c index dbcffddea9ce..df5de91ef524 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c @@ -193,7 +193,7 @@ CreateBmpFmp ( // VerticalResolution >=3D BMP_IMAGE_HEADER.PixelHeight =20 if (Argc !=3D 5) { - Print(L"CapsuleApp: Invalid Parameter.\n"); + Print(L"CapsuleApp: Incorrect parameter count.\n"); return EFI_UNSUPPORTED; } =20 @@ -387,7 +387,7 @@ CreateNestedFmp ( EFI_STATUS Status; =20 if (Argc !=3D 5) { - Print(L"CapsuleApp: Invalid Parameter.\n"); + Print(L"CapsuleApp: Incorrect parameter count.\n"); return EFI_UNSUPPORTED; } =20 @@ -793,7 +793,8 @@ PrintUsage ( @param[in] SystemTable The system table. =20 @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") =3D=3D 0) { - if (Argc < 3) { - Print(L"CapsuleApp: NO input capsule name.\n"); - return EFI_INVALID_PARAMETER; + if (Argc !=3D 3) { + Print(L"CapsuleApp: Incorrect parameter count.\n"); + return EFI_UNSUPPORTED; } Status =3D DumpCapsule(Argv[2]); return Status; --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel