From: Stephen Hemminger <stephen@networkplumber.org>
To: Julien Fortin <julien@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com, dsahern@gmail.com
Subject: Re: [PATCH iproute2-next master v2] bridge: fdb show: fix fdb entry state output (+ add json support)
Date: Mon, 27 Jul 2020 09:30:27 -0700 [thread overview]
Message-ID: <20200727093027.467da3a7@hermes.lan> (raw)
In-Reply-To: <20200727162009.7618-1-julien@cumulusnetworks.com>
On Mon, 27 Jul 2020 18:20:09 +0200
Julien Fortin <julien@cumulusnetworks.com> wrote:
> diff --git a/bridge/fdb.c b/bridge/fdb.c
> index d1f8afbe..765f4e51 100644
> --- a/bridge/fdb.c
> +++ b/bridge/fdb.c
> @@ -62,7 +62,10 @@ static const char *state_n2a(unsigned int s)
> if (s & NUD_REACHABLE)
> return "";
>
> - sprintf(buf, "state=%#x", s);
> + if (is_json_context())
> + sprintf(buf, "%#x", s);
> + else
> + sprintf(buf, "state %#x", s)
Please keep the "state=%#x" for the non JSON case.
No need to change output format.
next prev parent reply other threads:[~2020-07-27 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 16:20 [PATCH iproute2-next master v2] bridge: fdb show: fix fdb entry state output (+ add json support) Julien Fortin
2020-07-27 16:30 ` Stephen Hemminger [this message]
2020-07-27 23:25 ` Julien Fortin
2020-07-28 21:08 ` David Ahern
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=20200727093027.467da3a7@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=julien@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
/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).