Whamcloud - gitweb
LU-8853 nodemap: fix up lctl nodemap_info 68/23868/4
authorKit Westneat <kit.westneat@gmail.com>
Fri, 18 Nov 2016 21:10:55 +0000 (16:10 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 14 Jul 2023 03:11:13 +0000 (03:11 +0000)
When nodemap_info was moved over to using param_display, some of the
functionality got lost. This patch modifies nodemap_info to use
GET_PARAM instead of LIST_PARAM when a nodemap is specified.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I85df8e1cb43e002f4a112b9b671725862210dbec
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/23868
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
lustre/utils/lustre_cfg.c

index 180f37c..e6d63a6 100644 (file)
@@ -1599,16 +1599,15 @@ int jt_nodemap_info(int argc, char **argv)
        }
 
        if (argc == 1 || strcmp("list", argv[1]) == 0) {
-               popt.po_only_path = 1;
                popt.po_only_dir = 1;
                rc = param_display(&popt, "nodemap/*", NULL, LIST_PARAM);
        } else if (strcmp("all", argv[1]) == 0) {
-               rc = param_display(&popt, "nodemap/*/*", NULL, LIST_PARAM);
+               rc = param_display(&popt, "nodemap/*/*", NULL, GET_PARAM);
        } else {
                char    pattern[PATH_MAX];
 
                snprintf(pattern, sizeof(pattern), "nodemap/%s/*", argv[1]);
-               rc = param_display(&popt, pattern, NULL, LIST_PARAM);
+               rc = param_display(&popt, pattern, NULL, GET_PARAM);
                if (rc == -ESRCH)
                        fprintf(stderr,
                                "error: nodemap_info: cannot find nodemap %s\n",