From: Kit Westneat Date: Fri, 18 Nov 2016 21:10:55 +0000 (-0500) Subject: LU-8853 nodemap: fix up lctl nodemap_info X-Git-Tag: 2.15.57~53 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F23868%2F4;p=fs%2Flustre-release.git LU-8853 nodemap: fix up lctl nodemap_info 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 Change-Id: I85df8e1cb43e002f4a112b9b671725862210dbec Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/23868 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Sebastien Buisson Reviewed-by: Vitaliy Kuznetsov --- diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index 180f37c..e6d63a6 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -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",