From: Caleb Raitto <caleb.raitto@gmail.com>
To: stephen@networkplumber.org, netdev@vger.kernel.org
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
Caleb Raitto <caraitto@google.com>
Subject: [PATCH iproute2] tc/mqprio: Print extra info on invalid args.
Date: Wed, 5 Sep 2018 13:24:19 -0700 [thread overview]
Message-ID: <20180905202419.238812-1-caleb.raitto@gmail.com> (raw)
From: Caleb Raitto <caraitto@google.com>
Print the name of the argument that wasn't understood, and also print
the usage string.
Signed-off-by: Caleb Raitto <caraitto@google.com>
---
tc/q_mqprio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tc/q_mqprio.c b/tc/q_mqprio.c
index 89b46002..cf2eceb4 100644
--- a/tc/q_mqprio.c
+++ b/tc/q_mqprio.c
@@ -167,7 +167,8 @@ static int mqprio_parse_opt(struct qdisc_util *qu, int argc,
explain();
return -1;
} else {
- fprintf(stderr, "Unknown argument\n");
+ fprintf(stderr, "Unknown argument: %s\n", *argv);
+ explain();
return -1;
}
argc--; argv++;
--
2.19.0.rc1.350.ge57e33dbd1-goog
next reply other threads:[~2018-09-06 0:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 20:24 Caleb Raitto [this message]
2018-09-06 10:39 ` [PATCH iproute2] tc/mqprio: Print extra info on invalid args Stephen Hemminger
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=20180905202419.238812-1-caleb.raitto@gmail.com \
--to=caleb.raitto@gmail.com \
--cc=caraitto@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=xiyou.wangcong@gmail.com \
/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).