Commit a77905ef authored by David Ward's avatar David Ward Committed by Stephen Hemminger

tc: gred: Print usage text if no arguments appear after "gred"

This is more helpful to the user, since the command takes two forms,
and the message that would otherwise appear about missing parameters
assumes one of those forms.
Signed-off-by: default avatarDavid Ward <david.ward@ll.mit.edu>
parent d73e0408
...@@ -213,6 +213,10 @@ static int gred_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n ...@@ -213,6 +213,10 @@ static int gred_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n
argc--; argv++; argc--; argv++;
} }
if (!ok) {
explain();
return -1;
}
if (!opt.qth_min || !opt.qth_max || !opt.limit || !avpkt || if (!opt.qth_min || !opt.qth_max || !opt.limit || !avpkt ||
(opt.DP<0)) { (opt.DP<0)) {
fprintf(stderr, "Required parameter (min, max, limit, " fprintf(stderr, "Required parameter (min, max, limit, "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment