netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iproute PATCH] bridge: fdb: Fix for missing keywords in non-JSON output
@ 2018-10-09 12:44 Phil Sutter
  2018-10-15 16:31 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2018-10-09 12:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

While migrating to JSON print library, some keywords were dropped from
standard output by accident. Add them back to unbreak output parsers.

Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 bridge/fdb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bridge/fdb.c b/bridge/fdb.c
index 4dbc894ceab93..6487fac579c20 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -182,7 +182,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 		if (!is_json_context())
 			fprintf(fp, "dev ");
 		print_color_string(PRINT_ANY, COLOR_IFNAME,
-				   "ifname", "%s ",
+				   "ifname", "dev %s ",
 				   ll_index_to_name(r->ndm_ifindex));
 	}
 
@@ -199,7 +199,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 
 		print_color_string(PRINT_ANY,
 				   ifa_family_color(family),
-				    "dst", "%s ", dst);
+				    "dst", "dst %s ", dst);
 	}
 
 	if (vid)
@@ -246,7 +246,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 
 
 	if (tb[NDA_MASTER])
-		print_string(PRINT_ANY, "master", "%s ",
+		print_string(PRINT_ANY, "master", "master %s ",
 			     ll_index_to_name(rta_getattr_u32(tb[NDA_MASTER])));
 
 	print_string(PRINT_ANY, "state", "%s\n",
-- 
2.19.0

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

* Re: [iproute PATCH] bridge: fdb: Fix for missing keywords in non-JSON output
  2018-10-09 12:44 [iproute PATCH] bridge: fdb: Fix for missing keywords in non-JSON output Phil Sutter
@ 2018-10-15 16:31 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-10-15 16:31 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netdev

On Tue,  9 Oct 2018 14:44:08 +0200
Phil Sutter <phil@nwl.cc> wrote:

> While migrating to JSON print library, some keywords were dropped from
> standard output by accident. Add them back to unbreak output parsers.
> 
> Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library")
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Good catch. Applied.

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

end of thread, other threads:[~2018-10-16  0:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09 12:44 [iproute PATCH] bridge: fdb: Fix for missing keywords in non-JSON output Phil Sutter
2018-10-15 16:31 ` 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).