tc/mqprio: Print extra info on invalid args.
Subsystems (2)
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.
Signed-off-by Caleb Raitto <[email protected]>
--- tc/q_mqprio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tc/q_mqprio.c +2 -1
@@ -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
Quoted 6 lines · On Wed, 5 Sep 2018 13:24:19 -0700 Caleb Raitto <[email protected]> wrote:
From: Caleb Raitto <[email protected]>
Print the name of the argument that wasn't understood, and also print the usage string.
Signed-off-by Caleb Raitto <[email protected]>
The standard code pattern in iproute2 is to use invarg(). Why not use that?