tc: allow qdisc without options
Pfifo_fast needs no options. So don't force it to have parsing code.
This commit is contained in:
parent
488c41d216
commit
e9e78b0db0
|
|
@ -137,15 +137,15 @@ static int tc_qdisc_modify(int cmd, unsigned flags, int argc, char **argv)
|
|||
if (est.ewma_log)
|
||||
addattr_l(&req.n, sizeof(req), TCA_RATE, &est, sizeof(est));
|
||||
|
||||
if (q) {
|
||||
if (!q->parse_qopt) {
|
||||
fprintf(stderr, "qdisc '%s' does not support option parsing\n", k);
|
||||
return -1;
|
||||
}
|
||||
if (q->parse_qopt(q, argc, argv, &req.n))
|
||||
return 1;
|
||||
} else {
|
||||
if (argc) {
|
||||
if (argc) {
|
||||
if (q) {
|
||||
if (!q->parse_qopt) {
|
||||
fprintf(stderr, "qdisc '%s' does not support option parsing\n", k);
|
||||
return -1;
|
||||
}
|
||||
if (q->parse_qopt(q, argc, argv, &req.n))
|
||||
return 1;
|
||||
} else {
|
||||
if (matches(*argv, "help") == 0)
|
||||
usage();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue