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: David Ward <david.ward@ll.mit.edu>
This commit is contained in:
David Ward 2015-05-18 11:35:10 -04:00 committed by Stephen Hemminger
parent d73e0408e2
commit a77905ef6a

View File

@ -213,6 +213,10 @@ static int gred_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n
argc--; argv++;
}
if (!ok) {
explain();
return -1;
}
if (!opt.qth_min || !opt.qth_max || !opt.limit || !avpkt ||
(opt.DP<0)) {
fprintf(stderr, "Required parameter (min, max, limit, "