Whamcloud - gitweb
LU-6025 utils: reset optind before calls to getopt_long() 63/13063/4
authorKit Westneat <kit.westneat@gmail.com>
Sat, 13 Dec 2014 17:36:29 +0000 (12:36 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 29 Dec 2014 17:21:47 +0000 (17:21 +0000)
commit81b3399d79d6e8bbe64d3fb68c27209274b4cf9c
tree88145317e66550402012c12641eeed46b938c187
parent93452566b13360c76852b3d7ae3daa08912925f4
LU-6025 utils: reset optind before calls to getopt_long()

The nodemap commands in lctl were not properly resetting optind
between calls to getopt_long(). This patch sets optind to 0 before
calling any subcommands.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I14a1f34000c678799298dae3c248c839a1f32d52
Reviewed-on: http://review.whamcloud.com/13063
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
libcfs/libcfs/util/parser.c
lnet/utils/lnetctl.c
lustre/utils/lfs.c
lustre/utils/obd.c