[PATCH iproute2 json v2 06/27] ip: iplink.c: open/close json obj for ip -brief -json link show dev DEV

From
Julien Fortin <hidden>
Date
2017-08-17 17:40:40
Reply to
Julien Fortin, 2017-08-17
From: Julien Fortin <redacted>

Signed-off-by: Julien Fortin <redacted>
---
 ip/iplink.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/ip/iplink.c b/ip/iplink.c
index 5aff2fde..19bda1b9 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -1041,10 +1041,12 @@ int iplink_get(unsigned int flags, char *name, __u32 filt_mask)
 	if (rtnl_talk(&rth, &req.n, &answer.n, sizeof(answer)) < 0)
 		return -2;
 
+	open_json_object(NULL);
 	if (brief)
 		print_linkinfo_brief(NULL, &answer.n, stdout, NULL);
 	else
 		print_linkinfo(NULL, &answer.n, stdout);
+	close_json_object();
 
 	return 0;
 }
-- 
2.14.1
Thread (33 messages) 33 messages, 4 authors, 2017-09-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help