Whamcloud - gitweb
LU-13224 utils: expose llapi_param* functions 39/38239/2
authorGian-Carlo DeFazio <defazio1@llnl.gov>
Tue, 11 Feb 2020 21:08:18 +0000 (13:08 -0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Apr 2020 16:05:05 +0000 (16:05 +0000)
commitc1ff1110d090686833196918ccf289cf62a280d6
treeb54fc537bb6430eb003b0ccafc36dfef9e9b04fa
parent1ffa416586c6abb53a72031f0286aecf3da4bd01
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.

Lustre-commit: 9b44cf70a95b2ee97a17697dc97fbe462ad1f5b9
Lustre-change: https://review.whamcloud.com/37545

Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Change-Id: I2726b27b0042d58c97284f8348970deb6efc43d1
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/38239
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@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