Message ID | 20180425092946.18437-1-toke@toke.dk |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
Series | [iproute2] ingress: Don't break JSON output | expand |
On Wed, 25 Apr 2018 11:29:46 +0200 Toke Høiland-Jørgensen <toke@toke.dk> wrote: > The dash printed by the ingress qdisc breaks JSON output, so only print it > in regular output mode. > > Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Applied, thanks.
diff --git a/tc/q_ingress.c b/tc/q_ingress.c index 1e422298..93313c9c 100644 --- a/tc/q_ingress.c +++ b/tc/q_ingress.c @@ -40,7 +40,7 @@ static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv, static int ingress_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) { - fprintf(f, "---------------- "); + print_string(PRINT_FP, NULL, "---------------- ", NULL); return 0; }
The dash printed by the ingress qdisc breaks JSON output, so only print it in regular output mode. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> --- tc/q_ingress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)