From: Martin Wilck <mwilck@xxxxxxxx> In cli_list_map_fmt(), we only need field widths for map properties, not for path properties. In json ouput, we need no field width padding at all. Likewise in the prstatus related functions. Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- multipathd/cli_handlers.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c index 1b563e7..db7646b 100644 --- a/multipathd/cli_handlers.c +++ b/multipathd/cli_handlers.c @@ -277,8 +277,7 @@ cli_list_map_json (void *v, struct strbuf *reply, void *data) struct vectors * vecs = (struct vectors *)data; char * param = get_keyparam(v, MAP); - param = convert_dev(param, 0); - get_path_layout(vecs->pathvec, 0); + param = convert_dev(param, 0); mpp = find_mp_by_str(vecs->mpvec, param); if (!mpp) @@ -400,7 +399,6 @@ cli_list_map_fmt (void *v, struct strbuf *reply, void *data) char * fmt = get_keyparam(v, FMT); param = convert_dev(param, 0); - get_path_layout(vecs->pathvec, 0); get_multipath_layout(vecs->mpvec, 1); mpp = find_mp_by_str(vecs->mpvec, param); if (!mpp) @@ -1266,8 +1264,7 @@ cli_getprstatus (void * v, struct strbuf *reply, void * data) struct vectors * vecs = (struct vectors *)data; char * param = get_keyparam(v, MAP); - param = convert_dev(param, 0); - get_path_layout(vecs->pathvec, 0); + param = convert_dev(param, 0); mpp = find_mp_by_str(vecs->mpvec, param); if (!mpp) @@ -1291,7 +1288,6 @@ cli_setprstatus(void * v, struct strbuf *reply, void * data) char * param = get_keyparam(v, MAP); param = convert_dev(param, 0); - get_path_layout(vecs->pathvec, 0); mpp = find_mp_by_str(vecs->mpvec, param); if (!mpp) @@ -1314,7 +1310,6 @@ cli_unsetprstatus(void * v, struct strbuf *reply, void * data) char * param = get_keyparam(v, MAP); param = convert_dev(param, 0); - get_path_layout(vecs->pathvec, 0); mpp = find_mp_by_str(vecs->mpvec, param); if (!mpp) -- 2.33.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel