aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeslie Monis <lesliemonis@gmail.com>2019-12-26 00:34:09 +0530
committerStephen Hemminger <stephen@networkplumber.org>2019-12-29 09:57:27 -0800
commitd8f673074bba4727bfba642e46bfab91462b8d9d (patch)
tree828d34434500b81e0345b123e723de0beac2989c
parent2dda733f6d7b8273a7564f9b2717554df6e95230 (diff)
downloadiproute2-d8f673074bba4727bfba642e46bfab91462b8d9d.tar.gz
tc: cbs: add support for JSON output
Enable proper JSON output for the CBS Qdisc. Signed-off-by: Leslie Monis <lesliemonis@gmail.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r--tc/q_cbs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tc/q_cbs.c b/tc/q_cbs.c
index 9515a1f7f..13bb08e97 100644
--- a/tc/q_cbs.c
+++ b/tc/q_cbs.c
@@ -125,11 +125,11 @@ static int cbs_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if (RTA_PAYLOAD(tb[TCA_CBS_PARMS]) < sizeof(*qopt))
return -1;
- fprintf(f, "hicredit %d ", qopt->hicredit);
- fprintf(f, "locredit %d ", qopt->locredit);
- fprintf(f, "sendslope %d ", qopt->sendslope);
- fprintf(f, "idleslope %d ", qopt->idleslope);
- fprintf(f, "offload %d ", qopt->offload);
+ print_int(PRINT_ANY, "hicredit", "hicredit %d ", qopt->hicredit);
+ print_int(PRINT_ANY, "locredit", "locredit %d ", qopt->locredit);
+ print_int(PRINT_ANY, "sendslope", "sendslope %d ", qopt->sendslope);
+ print_int(PRINT_ANY, "idleslope", "idleslope %d ", qopt->idleslope);
+ print_int(PRINT_ANY, "offload", "offload %d ", qopt->offload);
return 0;
}