ip: xstats: add json output support
This adds only initial object support if json argument is specified. Later patches convert the current xstats users to json. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
be029b3a58
commit
8ff3d1d3a3
|
|
@ -70,10 +70,13 @@ int iplink_ifla_xstats(int argc, char **argv)
|
|||
return -1;
|
||||
}
|
||||
|
||||
new_json_obj(json);
|
||||
if (rtnl_dump_filter(&rth, lu->print_ifla_xstats, stdout) < 0) {
|
||||
delete_json_obj();
|
||||
fprintf(stderr, "Dump terminated\n");
|
||||
return -1;
|
||||
}
|
||||
delete_json_obj();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue