[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190312164128.22536-2-nikolay@cumulusnetworks.com>
Date: Tue, 12 Mar 2019 18:41:26 +0200
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To: netdev@...r.kernel.org
Cc: roopa@...ulusnetworks.com, dsa@...ulusnetworks.com,
stephen@...workplumber.org,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH iproute2-next 1/3] 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@...ulusnetworks.com>
---
ip/iplink_xstats.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ip/iplink_xstats.c b/ip/iplink_xstats.c
index 908d9228369f..c64e6885678c 100644
--- a/ip/iplink_xstats.c
+++ b/ip/iplink_xstats.c
@@ -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;
}
--
2.17.2
Powered by blists - more mailing lists