mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-06 23:31:03 +00:00
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 <tobias.jungel@gmail.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
f900a21611
commit
45fca4ed94
@ -484,7 +484,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex)
|
|||||||
rem = RTA_PAYLOAD(list);
|
rem = RTA_PAYLOAD(list);
|
||||||
|
|
||||||
ifname = ll_index_to_name(ifindex);
|
ifname = ll_index_to_name(ifindex);
|
||||||
open_json_object(ifname);
|
open_vlan_port(ifindex);
|
||||||
|
|
||||||
print_color_string(PRINT_FP, COLOR_IFNAME,
|
print_color_string(PRINT_FP, COLOR_IFNAME,
|
||||||
NULL, "%-16s", ifname);
|
NULL, "%-16s", ifname);
|
||||||
@ -505,8 +505,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex)
|
|||||||
|
|
||||||
print_one_vlan_stats(vstats);
|
print_one_vlan_stats(vstats);
|
||||||
}
|
}
|
||||||
close_json_object();
|
close_vlan_port();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int print_vlan_stats(struct nlmsghdr *n, void *arg)
|
static int print_vlan_stats(struct nlmsghdr *n, void *arg)
|
||||||
|
Loading…
Reference in New Issue
Block a user