diff mbox series

[iproute2-next,01/10] tc: cbs: add support for JSON output

Message ID 20191225190418.8806-2-lesliemonis@gmail.com
State Accepted
Delegated to: stephen hemminger
Headers show
Series tc: add support for JSON output in some qdiscs | expand

Commit Message

Leslie Monis Dec. 25, 2019, 7:04 p.m. UTC
Enable proper JSON output for the CBS Qdisc.

Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
---
 tc/q_cbs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tc/q_cbs.c b/tc/q_cbs.c
index 9515a1f7..13bb08e9 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;
 }