Commit e9e78b0d authored by Stephen Hemminger's avatar Stephen Hemminger

tc: allow qdisc without options

Pfifo_fast needs no options. So don't force it to have parsing code.
parent 488c41d2
...@@ -137,15 +137,15 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv) ...@@ -137,15 +137,15 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
if (est.ewma_log) if (est.ewma_log)
addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est)); addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est));
if (q) { if (argc) {
if (!q->parse_qopt) { if (q) {
fprintf(stderr, "qdisc '%s' does not support option parsing\n", k); if (!q->parse_qopt) {
return -1; fprintf(stderr, "qdisc '%s' does not support option parsing\n", k);
} return -1;
if (q->parse_qopt(q, argc, argv, &req.n)) }
return 1; if (q->parse_qopt(q, argc, argv, &req.n))
} else { return 1;
if (argc) { } else {
if (matches(*argv, "help") == 0) if (matches(*argv, "help") == 0)
usage(); usage();
......
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