mirror_iproute2/rdma
Petr Machata 9091ff0251 lib: json_print: Add print_on_off()
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>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2020-11-13 19:43:15 -07:00
..
include/uapi/rdma rdma: update uapi headers 2020-08-06 16:25:04 +00:00
.gitignore rdma: Add basic infrastructure for RDMA tool 2017-08-21 17:07:44 -07:00
dev.c lib: json_print: Add print_on_off() 2020-11-13 19:43:15 -07:00
link.c rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
Makefile rdma: Add "stat show mr" support 2019-10-27 10:28:30 -07:00
rdma.c Unify batch processing across tools 2020-11-13 19:43:15 -07:00
rdma.h lib: json_print: Add print_on_off() 2020-11-13 19:43:15 -07:00
res-cmid.c rdma: Add "PID" criteria support for statistic counter auto mode 2020-08-06 16:26:04 +00:00
res-cq.c lib: json_print: Add print_on_off() 2020-11-13 19:43:15 -07:00
res-mr.c rdma: Add support to get MR in raw format 2020-07-05 18:11:37 +00:00
res-pd.c rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
res-qp.c rdma: Add support to get QP in raw format 2020-07-05 18:11:00 +00:00
res.c rdma: Properly print device and link names in CLI output 2020-08-16 15:50:02 -07:00
res.h rdma: Add "PID" criteria support for statistic counter auto mode 2020-08-06 16:26:04 +00:00
stat-mr.c rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
stat.c rdma: Add "PID" criteria support for statistic counter auto mode 2020-08-06 16:26:04 +00:00
stat.h rdma: Add "stat show mr" support 2019-10-27 10:28:30 -07:00
sys.c rdma: Rewrite custom JSON and prints logic to use common API 2019-11-20 02:27:36 +00:00
utils.c lib: json_print: Add print_on_off() 2020-11-13 19:43:15 -07:00