From: Tobias Jungel <tobias.jungel@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: [iproute2 PATCH] bridge: fix vlan show stats formatting
Date: Sat, 20 Oct 2018 15:42:33 +0200 [thread overview]
Message-ID: <09b37bb3d091567c1f8958994e69e1221a61c0dc.camel@gmail.com> (raw)
The output of -statistics vlan show was broken previous change for json
output. This aligns the format to vlan show.
Signed-off-by: Tobias Jungel <tobias.jungel@gmail.com>
---
bridge/vlan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/bridge/vlan.c b/bridge/vlan.c
index bdce55ae..85f4a539 100644
--- a/bridge/vlan.c
+++ b/bridge/vlan.c
@@ -487,8 +487,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex)
list = brtb[LINK_XSTATS_TYPE_BRIDGE];
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);
@@ -509,8 +508,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(const struct sockaddr_nl *who,
next reply other threads:[~2018-10-20 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-20 13:42 Tobias Jungel [this message]
2018-10-22 16:47 ` [iproute2 PATCH] bridge: fix vlan show stats formatting Stephen Hemminger
2018-10-22 17:00 ` Stephen Hemminger
2018-10-26 21:51 ` [iproute2 PATCH v2] " Tobias Jungel
2018-10-29 16:58 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09b37bb3d091567c1f8958994e69e1221a61c0dc.camel@gmail.com \
--to=tobias.jungel@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).