From patchwork Fri May 6 13:33:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 12841164 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14B7CC43217 for ; Fri, 6 May 2022 13:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441864AbiEFNpj (ORCPT ); Fri, 6 May 2022 09:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441907AbiEFNpb (ORCPT ); Fri, 6 May 2022 09:45:31 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2C4469495 for ; Fri, 6 May 2022 06:41:45 -0700 (PDT) Received: from fraeml713-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Kvs9G2bLdz685FT; Fri, 6 May 2022 21:38:58 +0800 (CST) Received: from lhreml715-chm.china.huawei.com (10.201.108.66) by fraeml713-chm.china.huawei.com (10.206.15.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 6 May 2022 15:41:43 +0200 Received: from P_UKIT01-A7bmah.china.huawei.com (10.47.73.106) by lhreml715-chm.china.huawei.com (10.201.108.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 6 May 2022 14:41:43 +0100 From: To: , CC: , , , , , , , Subject: [PATCH 06/10] rasdaemon: ras-mc-ctl: Add printing usage if necessary parameters are not passed for the vendor-error options Date: Fri, 6 May 2022 14:33:03 +0100 Message-ID: <20220506133307.1799-7-shiju.jose@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20220506133307.1799-1-shiju.jose@huawei.com> References: <20220506133307.1799-1-shiju.jose@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.73.106] X-ClientProxiedBy: lhreml744-chm.china.huawei.com (10.201.108.194) To lhreml715-chm.china.huawei.com (10.201.108.66) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org From: Shiju Jose Add printing usage if necessary parameters are not passed for the vendor-errors options. Signed-off-by: Shiju Jose --- util/ras-mc-ctl.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in index 8755b6f..959ea6b 100755 --- a/util/ras-mc-ctl.in +++ b/util/ras-mc-ctl.in @@ -1544,6 +1544,7 @@ sub vendor_errors_summary if ($num_args ne 0) { $platform_id = $ARGV[0]; } else { + usage(1); return; } @@ -1651,6 +1652,7 @@ sub vendor_errors if ($num_args ne 0) { $platform_id = $ARGV[0]; } else { + usage(1); return; }