mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-11-03 20:47:11 +00:00
Instead of doing open-coded solution to generate JSON and prints, let's
reuse existing infrastructure and APIs to do the same as ip/*.
Before this change:
if (rd->json_output)
jsonw_uint_field(rd->jw, "sm_lid", sm_lid);
else
pr_out("sm_lid %u ", sm_lid);
After this change:
print_uint(PRINT_ANY, "sm_lid", "sm_lid %u ", sm_lid);
All the print functions are converted to support color but for now the
type of color is COLOR_NONE. This is done as a preparation to addition
of color enable option. Such change will require rewrite of command line
arguments parser which is out-of-scope for this patch.
Signed-off-by: Ido Kalir <idok@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
|
||
|---|---|---|
| .. | ||
| include/uapi/rdma | ||
| .gitignore | ||
| dev.c | ||
| link.c | ||
| Makefile | ||
| rdma.c | ||
| rdma.h | ||
| res-cmid.c | ||
| res-cq.c | ||
| res-mr.c | ||
| res-pd.c | ||
| res-qp.c | ||
| res.c | ||
| res.h | ||
| stat-mr.c | ||
| stat.c | ||
| stat.h | ||
| sys.c | ||
| utils.c | ||