From: Stephen Hemminger <stephen@networkplumber.org>
To: Tariq Toukan <tariqt@mellanox.com>
Cc: David Ahern <dsahern@gmail.com>,
netdev@vger.kernel.org, Moshe Shemesh <moshe@mellanox.com>,
Aya Levin <ayal@mellanox.com>, Jiri Pirko <jiri@mellanox.com>
Subject: Re: [PATCH V2 iproute2 1/3] devlink: Add helper for left justification print
Date: Wed, 2 Oct 2019 07:48:04 -0700 [thread overview]
Message-ID: <20191002074804.3ad4e5e2@hermes.lan> (raw)
In-Reply-To: <1570026916-27592-2-git-send-email-tariqt@mellanox.com>
On Wed, 2 Oct 2019 17:35:14 +0300
Tariq Toukan <tariqt@mellanox.com> wrote:
> static void pr_out_str(struct dl *dl, const char *name, const char *val)
> {
> - if (dl->json_output) {
> + __pr_out_indent_newline(dl);
> + if (dl->json_output)
> jsonw_string_field(dl->jw, name, val);
> - } else {
> - if (g_indent_newline)
> - pr_out("%s %s", name, val);
> - else
> - pr_out(" %s %s", name, val);
> - }
> + else
> + pr_out("%s %s", name, val)
Overall this looks like an improvement.
Why doesn't devlink already use existing json_print infrastructure?
next prev parent reply other threads:[~2019-10-02 14:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 14:35 [PATCH V2 iproute2 0/3] Devlink health FMSG fixes and enhancements Tariq Toukan
2019-10-02 14:35 ` [PATCH V2 iproute2 1/3] devlink: Add helper for left justification print Tariq Toukan
2019-10-02 14:48 ` Stephen Hemminger [this message]
2019-10-02 17:14 ` Jiri Pirko
2019-10-02 14:35 ` [PATCH V2 iproute2 2/3] devlink: Left justification on FMSG output Tariq Toukan
2019-10-02 14:35 ` [PATCH V2 iproute2 3/3] devlink: Fix inconsistency between command input and output Tariq Toukan
2019-10-09 3:23 ` [PATCH V2 iproute2 0/3] Devlink health FMSG fixes and enhancements 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=20191002074804.3ad4e5e2@hermes.lan \
--to=stephen@networkplumber.org \
--cc=ayal@mellanox.com \
--cc=dsahern@gmail.com \
--cc=jiri@mellanox.com \
--cc=moshe@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.