From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Wiles Subject: [PATCH] eal: turn off getopt_long error messages Date: Sun, 16 Dec 2018 10:45:59 -0600 Message-ID: <20181216164559.89835-1-keith.wiles@intel.com> To: dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 80EE41B5C8 for ; Sun, 16 Dec 2018 17:46:05 +0100 (CET) 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) { -- 2.17.1