Whamcloud - gitweb
LU-2144 utils: reset 'optind' to avoid segmentation fault
Sometimes lfsck_{start,stop} commands may be called several
times under the same lctl shell. Under such case, the function
getopt_long() called inside the lfsck_start/lfsck_stop may be
confused, and cause segmentation fault. So reset the external
variable 'optind' by force to avoid the segmentation fault.
Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I35b635eac44854ae4b17ae00bed778320dbe9d9e
Reviewed-on: http://review.whamcloud.com/4248
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>