From: Leon Romanovsky <leon@kernel.org>
To: Petr Machata <me@pmachata.org>
Cc: netdev@vger.kernel.org, dsahern@gmail.com,
stephen@networkplumber.org, john.fastabend@gmail.com,
jiri@nvidia.com, idosch@nvidia.com,
Jakub Kicinski <kuba@kernel.org>, Roman Mashak <mrv@mojatatu.com>
Subject: Re: [PATCH iproute2-next v4 03/11] lib: json_print: Add print_on_off()
Date: Tue, 10 Nov 2020 12:05:54 +0200 [thread overview]
Message-ID: <20201110100554.GB371586@unreal> (raw)
In-Reply-To: <f9e1baac29bddcb406d41e06d8414a4b4d6bcf62.1604869679.git.me@pmachata.org>
On Sun, Nov 08, 2020 at 10:14:08PM +0100, Petr Machata wrote:
> The value of a number of booleans is shown as "on" and "off" in the plain
> output, and as an actual boolean in JSON mode. Add a function that does
> that.
>
> RDMA tool already uses a function named print_on_off(). This function
> always shows "on" and "off", even in JSON mode. Since there are probably
> very few if any consumers of this interface at this point, migrate it to
> the new central print_on_off() as well.
>
> Signed-off-by: Petr Machata <me@pmachata.org>
> ---
>
> Notes:
> v3:
> - Rename to print_on_off(). [David Ahern]
> - Move over to json_print.c and make it a variant of print_bool().
> Convert RDMA tool over to print_on_off(). [Leon Romanovsky]
>
> include/json_print.h | 1 +
> lib/json_print.c | 34 +++++++++++++++++++++++++++-------
> rdma/dev.c | 2 +-
> rdma/rdma.h | 1 -
> rdma/res-cq.c | 2 +-
> rdma/utils.c | 5 -----
> 6 files changed, 30 insertions(+), 15 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2020-11-10 10:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 21:14 [PATCH iproute2-next v4 00/11] Add a tool for configuration of DCB Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 01/11] Unify batch processing across tools Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 02/11] lib: Add parse_one_of(), parse_on_off() Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 03/11] lib: json_print: Add print_on_off() Petr Machata
2020-11-09 5:15 ` Leon Romanovsky
2020-11-10 10:05 ` Leon Romanovsky [this message]
2020-11-08 21:14 ` [PATCH iproute2-next v4 04/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_open() Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 05/11] lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare() Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 06/11] lib: Extract from devlink/mnlg a helper, mnlu_socket_recv_run() Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 07/11] lib: Extract from iplink_vlan a helper to parse key:value arrays Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 08/11] lib: parse_mapping: Update argc, argv on error Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 09/11] lib: parse_mapping: Recognize a keyword "all" Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 10/11] Add skeleton of a new tool, dcb Petr Machata
2020-11-08 21:14 ` [PATCH iproute2-next v4 11/11] dcb: Add a subtool for the DCB ETS object Petr Machata
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=20201110100554.GB371586@unreal \
--to=leon@kernel.org \
--cc=dsahern@gmail.com \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=me@pmachata.org \
--cc=mrv@mojatatu.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 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.