From: Tobias Jungel Date: Fri, 26 Oct 2018 21:51:03 +0000 (+0200) Subject: bridge: fix vlan show stats formatting X-Git-Tag: v4.20.0~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45fca4ed94120a480cef70e8199083565f82bd51;p=thirdparty%2Fiproute2.git bridge: fix vlan show stats formatting The output of -statistics vlan show was broken previous change for json output. This aligns the format to vlan show. v2: fixed too greedy deletion that caused a -Wmaybe-uninitialized Signed-off-by: Tobias Jungel Signed-off-by: Stephen Hemminger --- diff --git a/bridge/vlan.c b/bridge/vlan.c index a111d5e66..d075a42d1 100644 --- a/bridge/vlan.c +++ b/bridge/vlan.c @@ -484,7 +484,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex) rem = RTA_PAYLOAD(list); ifname = ll_index_to_name(ifindex); - open_json_object(ifname); + open_vlan_port(ifindex); print_color_string(PRINT_FP, COLOR_IFNAME, NULL, "%-16s", ifname); @@ -505,8 +505,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex) print_one_vlan_stats(vstats); } - close_json_object(); - + close_vlan_port(); } static int print_vlan_stats(struct nlmsghdr *n, void *arg)