From a8edb3eddf00bd0e030fa07f4ac387b3bc9de093 Mon Sep 17 00:00:00 2001 From: Emoly Liu Date: Mon, 25 Apr 2016 15:41:40 +0800 Subject: [PATCH] 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 --- lustre/utils/lustre_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 1.8.3.1