netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 v2] tc/mqprio: Print extra info on invalid args.
@ 2018-09-06 21:01 Caleb Raitto
  2018-09-10 19:15 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Caleb Raitto @ 2018-09-06 21:01 UTC (permalink / raw)
  To: stephen, netdev; +Cc: jhs, xiyou.wangcong, jiri, Caleb Raitto

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-11  0:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-06 21:01 [PATCH iproute2 v2] tc/mqprio: Print extra info on invalid args Caleb Raitto
2018-09-10 19:15 ` Stephen Hemminger

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).