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,6 +137,7 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv) ...@@ -137,6 +137,7 @@ 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 (argc) {
if (q) { if (q) {
if (!q->parse_qopt) { if (!q->parse_qopt) {
fprintf(stderr, "qdisc '%s' does not support option parsing\n", k); fprintf(stderr, "qdisc '%s' does not support option parsing\n", k);
...@@ -145,7 +146,6 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv) ...@@ -145,7 +146,6 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
if (q->parse_qopt(q, argc, argv, &req.n)) if (q->parse_qopt(q, argc, argv, &req.n))
return 1; return 1;
} else { } else {
if (argc) {
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