Whamcloud - gitweb
LU-8064 lctl: fix a typo in lustre_cfg.c 59/19759/3
authorEmoly Liu <emoly.liu@intel.com>
Mon, 25 Apr 2016 07:41:40 +0000 (15:41 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 May 2016 00:00:19 +0000 (00:00 +0000)
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 <emoly.liu@intel.com>
Change-Id: I35820b00c7a4e264444e5574967d56c54b4a469b
Reviewed-on: http://review.whamcloud.com/19759
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/lustre_cfg.c

index 19fdf66..f9d4a16 100644 (file)
@@ -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)