netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v2] tc/mqprio: Print extra info on invalid args.
Date: Thu,  6 Sep 2018 14:01:17 -0700	[thread overview]
Message-ID: <20180906210117.203461-1-caleb.raitto@gmail.com> (raw)

From: Caleb Raitto <caraitto@google.com>

Print the name of the argument that wasn't understood.

Signed-off-by: Caleb Raitto <caraitto@google.com>
---
 tc/q_mqprio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tc/q_mqprio.c b/tc/q_mqprio.c
index 89b46002..7cd18ae1 100644
--- a/tc/q_mqprio.c
+++ b/tc/q_mqprio.c
@@ -167,8 +167,7 @@ static int mqprio_parse_opt(struct qdisc_util *qu, int argc,
 			explain();
 			return -1;
 		} else {
-			fprintf(stderr, "Unknown argument\n");
-			return -1;
+			invarg("unknown argument", *argv);
 		}
 		argc--; argv++;
 	}
-- 
2.19.0.rc2.392.g5ba43deb5a-goog

             reply	other threads:[~2018-09-07  1:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06 21:01 Caleb Raitto [this message]
2018-09-10 19:15 ` [PATCH iproute2 v2] 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=20180906210117.203461-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).