Whamcloud - gitweb
LU-7796 utils: print error with valueless lctl set_param 03/18703/4
authorRyan Haasken <haasken@cray.com>
Fri, 26 Feb 2016 19:52:39 +0000 (13:52 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 6 Apr 2016 01:40:06 +0000 (01:40 +0000)
commite2973925ca550ad8ef7ad9af72d7d8766f9c1f41
treea9414614ae2563930656673c4ae8cad8bcb35bed
parentfade46a42bbc0abb7f1db107f6ad0827d4442cc3
LU-7796 utils: print error with valueless lctl set_param

If lctl set_param is called with space-separated arguments, and there
is a trailing parameter without a value, print an error instead of
returning silently.  Also, allow values which contain equal signs when
lctl set_param is given space-separated arguments.

Print a warning message for both formats whenever the value contains
an '=' character because it is likely that the user made an error.

Also fix the return values of jt_lcfg_setparam, so they are always
negative on error.

Add tests for "lctl set_param" to verify that it returns an error when
a value is omitted in either format and to check that "lctl set_param"
accepts values which contain the '=' character in either format.

Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: Ie9d709c5aa533f778cc83f4b58f40fe4b084c754
Reviewed-on: http://review.whamcloud.com/18703
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh
lustre/utils/lustre_cfg.c