[iproute2,v2] tc/mqprio: Print extra info on invalid args.
diff mbox series

Message ID 20180906210117.203461-1-caleb.raitto@gmail.com
State Accepted
Delegated to: stephen hemminger
Headers show
Series
  • [iproute2,v2] tc/mqprio: Print extra info on invalid args.
Related show

Commit Message

Caleb Raitto Sept. 6, 2018, 9:01 p.m. UTC
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(-)

Comments

Stephen Hemminger Sept. 10, 2018, 7:15 p.m. UTC | #1
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

Patch
diff mbox series

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++;
 	}