ip: iplink.c: open/close json obj for ip -brief -json link show dev DEV
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
parent
d0e720111a
commit
e4a1216aeb
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue