Whamcloud - gitweb
LU-9480 lnet: cleanup lnetctl and cyaml 49/27349/15
authorSonia <sonia.sharma@intel.com>
Wed, 31 May 2017 08:48:15 +0000 (01:48 -0700)
committerAmir Shehata <amir.shehata@intel.com>
Tue, 22 Aug 2017 16:29:20 +0000 (16:29 +0000)
commit01a727fa0db8095657975b4589d768556cb6745c
tree749a8738a5649a047304fe52f7e1d34ffbade03b
parent1cb6cf3b691f9f3febd8a952ab5b3e3157c6e758
LU-9480 lnet: cleanup lnetctl and cyaml

lnetctl set commands results in segmentation fault
if no values are provided. This patch makes them
show help if no values are provided to with set commands.

Made general cleanups in the lnetctl code to consolidate
where the help is being printed. Created a function
check_cmd() which checks for the expected number of
arguments and for the -h/--help option and prints
the help string if either scenario is encountered.

fixed the fsm transition in cyaml to allow proper
parsing of empty cyaml documents

Change-Id: Ia081e9304ba2d6baa804e4c8890fb1988d860c1c
Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-on: https://review.whamcloud.com/27349
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
lnet/utils/cyaml/cyaml.c
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetctl.c