From patchwork Sun Dec 16 16:32:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wiles, Keith" X-Patchwork-Id: 48950 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 476CD1B8C0; Sun, 16 Dec 2018 17:32:47 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BC5FC1B8BE for ; Sun, 16 Dec 2018 17:32:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Dec 2018 08:32:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,361,1539673200"; d="scan'208";a="130405374" Received: from asooresh-mobl1.amr.corp.intel.com ([10.254.183.55]) by fmsmga001.fm.intel.com with ESMTP; 16 Dec 2018 08:32:43 -0800 From: Keith Wiles To: dev@dpdk.org Date: Sun, 16 Dec 2018 10:32:37 -0600 Message-Id: <20181216163239.87702-2-keith.wiles@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181216163239.87702-1-keith.wiles@intel.com> References: <20181216163239.87702-1-keith.wiles@intel.com> Subject: [dpdk-dev] [PATCH 2/4] eal: turn off getopt_long error messages X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When using dpdk register option api when parsing for log level the opterr flags was still set to one causing an error message from getopt_long(). Set opterr to zero to disable error messages. Signed-off-by: Keith Wiles --- lib/librte_eal/bsdapp/eal/eal.c | 1 + lib/librte_eal/linuxapp/eal/eal.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index b8152a75c..85d6dddc9 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -374,6 +374,7 @@ eal_log_level_parse(int argc, char **argv) argvopt = argv; optind = 1; optreset = 1; + opterr = 0; while ((opt = getopt_long(argc, argvopt, eal_short_options, eal_long_options, &option_index)) != EOF) { diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 361744d40..9a1289532 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -565,6 +565,7 @@ eal_log_level_parse(int argc, char **argv) argvopt = argv; optind = 1; + opterr = 0; while ((opt = getopt_long(argc, argvopt, eal_short_options, eal_long_options, &option_index)) != EOF) {