Skip to contentSkip to conversation

tc/mqprio: Print extra info on invalid args.

PATCH Superseded Caleb Raitto 2 participants 2 messages Sep 6, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tc/mqprio: Print extra info on invalid args.

From: Caleb Raitto <[email protected]>

Print the name of the argument that wasn't understood, and also print the usage string.

---
 tc/q_mqprio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tc/q_mqprio.c +2 -1
index 89b46002..cf2eceb4 100644
@@ -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++;
Signature · 1 line
2.19.0.rc1.350.ge57e33dbd1-goog