From: Keith Wiles <keith.wiles@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/4] eal: turn off getopt_long error messages
Date: Sun, 16 Dec 2018 10:32:37 -0600 [thread overview]
Message-ID: <20181216163239.87702-2-keith.wiles@intel.com> (raw)
In-Reply-To: <20181216163239.87702-1-keith.wiles@intel.com>
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 <keith.wiles@intel.com>
---
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
next prev parent reply other threads:[~2018-12-16 16:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-16 16:32 [dpdk-dev] [PATCH 1/4] dfs:add FUSE based filesystem for DPDK Keith Wiles
2018-12-16 16:32 ` Keith Wiles [this message]
2018-12-16 16:32 ` [dpdk-dev] [PATCH 3/4] eal:add tailq walk routine Keith Wiles
2018-12-16 16:32 ` [dpdk-dev] [PATCH 4/4] ring:add ring " Keith Wiles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181216163239.87702-2-keith.wiles@intel.com \
--to=keith.wiles@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).