Whamcloud - gitweb
LU-13224 utils: expose llapi_param* functions 45/37545/15
authorGian-Carlo DeFazio <defazio1@llnl.gov>
Tue, 11 Feb 2020 21:08:18 +0000 (13:08 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 7 Apr 2020 17:19:08 +0000 (17:19 +0000)
commit9b44cf70a95b2ee97a17697dc97fbe462ad1f5b9
tree647426e1b224c0a3beffa1371735a0e8ea466863
parentaed166fa29e6f39e53bcc0402ed4875776915a55
LU-13224 utils: expose llapi_param* functions

Added an interface to find files in sysfs,procfs,etc.,
and read them into a file or buffer.
The interface is meant to return the same results as
the "lctl list_param" and "lctl get_param" commands,
but doesn't require starting an lctl process.

The interface is being used by lctl for parts of
its "list_param" and "get_param" commands.

The output of lctl get_param is altered slightly.
Previously, for some multi-line files lctl would
print the param name and first line of the file on
the same line such as:

param=line 1
line 2
line 3

Now multi-line files consistently put a newline
after the param name and before the content such as:

param=
line 1
line 2
line 3

Added debug output to failing test sanity 300d.

Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Change-Id: I2726b27b0042d58c97284f8348970deb6efc43d1
Reviewed-on: https://review.whamcloud.com/37545
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/Makefile.am
lustre/doc/llapi_param_get_paths.3 [new file with mode: 0644]
lustre/doc/llapi_param_get_value.3 [new file with mode: 0644]
lustre/include/lustre/lustreapi.h
lustre/tests/sanity.sh
lustre/utils/liblustreapi_param.c
lustre/utils/lustre_cfg.c