netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] ingress: Don't break JSON output
@ 2018-04-25  9:29 Toke Høiland-Jørgensen
  2018-04-25 18:10 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-04-25  9:29 UTC (permalink / raw)
  To: netdev; +Cc: Toke Høiland-Jørgensen

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(-)

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;
 }
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2] ingress: Don't break JSON output
  2018-04-25  9:29 [PATCH iproute2] ingress: Don't break JSON output Toke Høiland-Jørgensen
@ 2018-04-25 18:10 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-04-25 18:10 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen; +Cc: netdev

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-25 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-25  9:29 [PATCH iproute2] ingress: Don't break JSON output Toke Høiland-Jørgensen
2018-04-25 18:10 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).