Whamcloud - gitweb
LU-8993 utils: Use absolute pathname for debug_daemon log file 85/25485/9
authorSteve Guminski <stephenx.guminski@intel.com>
Mon, 13 Feb 2017 20:24:08 +0000 (15:24 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Aug 2017 06:25:10 +0000 (06:25 +0000)
commit23f80c74c38dfd726ac1b50176989b3aa14e3a81
tree2d09addaaa18347f6ccbafaa5b5f52fe7cca515f
parent5506c15a65b3eebb9f15000105e6eb7c02742a10
LU-8993 utils: Use absolute pathname for debug_daemon log file

The lctl debug_daemon command is changed to always provide an
absolute pathname to the kernel.  The kernel code will return EINVAL
if the pathname does not begin with '/', leading to the confusing
error "Invalid argument". This patch allows the user to provide a
relative pathname to the command without generating this error.

The absolute_path function has been moved to string.c and renamed to
cfs_abs_path, so that it may be used by all utilities.

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I35af242bfcfcb9a56135aeabe0423e28e9634bab
Reviewed-on: https://review.whamcloud.com/25485
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/util/string.h
libcfs/libcfs/util/string.c
lnet/utils/debug.c
lustre/utils/libmount_utils_ldiskfs.c