From: Emoly Liu Date: Mon, 25 Apr 2016 07:41:40 +0000 (+0800) Subject: LU-8064 lctl: fix a typo in lustre_cfg.c X-Git-Tag: 2.8.53~18 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a8edb3eddf00bd0e030fa07f4ac387b3bc9de093 LU-8064 lctl: fix a typo in lustre_cfg.c When checking overflow issue in param_dispaly(), we should use rc2 not rc, because rc2 is the return value of pathname string size. Signed-off-by: Emoly Liu Change-Id: I35820b00c7a4e264444e5574967d56c54b4a469b Reviewed-on: http://review.whamcloud.com/19759 Reviewed-by: Bob Glossman Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index 19fdf66..f9d4a16 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -1171,7 +1171,7 @@ param_display(struct param_opts *popt, char *pattern, char *value, * there isn't much point trying to use fprintf() */ continue; } - if (rc >= sizeof(pathname)) { + if (rc2 >= sizeof(pathname)) { fprintf(stderr, "error: %s: overflow processing '%s'\n", opname, pathname); if (rc == 0)