All of lore.kernel.org
 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

* Re: [PATCH iproute2 v2] tc/mqprio: Print extra info on invalid args.
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-09-10 19:15 UTC (permalink / raw)
  To: Caleb Raitto; +Cc: netdev, jhs, xiyou.wangcong, jiri, Caleb Raitto

On Thu,  6 Sep 2018 14:01:17 -0700
Caleb Raitto <caleb.raitto@gmail.com> wrote:

> From: Caleb Raitto <caraitto@google.com>
> 
> Print the name of the argument that wasn't understood.
> 
> Signed-off-by: Caleb Raitto <caraitto@google.com>

That is simpler, thanks. Applied

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.