From: QI Fuli <[email protected]> This patch set is used to make ndctl support global configuration files. All files with .conf suffix under {sysconfdir}/ndctl can be regarded as ndctl global configuration files that all ndctl commands can refer to.
Signed-off-by: QI Fuli <[email protected]> v1 -> v2: - Update the version of iniparser helper QI Fuli (5): ndctl, util: add iniparser helper ndctl, util: add parse-configs helper ndctl: make ndctl support configuration files ndctl, config: add the default ndctl configuration file ndctl, monitor: refator monitor for supporting multiple config files Documentation/ndctl/Makefile.am | 2 +- Documentation/ndctl/ndctl-monitor.txt | 8 +- Makefile.am | 8 +- configure.ac | 6 +- ndctl/Makefile.am | 9 +- ndctl/lib/Makefile.am | 4 + ndctl/lib/libndctl.c | 52 ++ ndctl/lib/libndctl.sym | 2 + ndctl/lib/private.h | 1 + ndctl/libndctl.h | 2 + ndctl/monitor.c | 69 ++- ndctl/ndctl.c | 1 + ndctl/ndctl.conf | 56 ++ util/dictionary.c | 383 ++++++++++++ util/dictionary.h | 175 ++++++ util/iniparser.c | 838 ++++++++++++++++++++++++++ util/iniparser.h | 360 +++++++++++ util/parse-configs.c | 82 +++ util/parse-configs.h | 34 ++ 19 files changed, 2048 insertions(+), 44 deletions(-) create mode 100644 ndctl/ndctl.conf create mode 100644 util/dictionary.c create mode 100644 util/dictionary.h create mode 100644 util/iniparser.c create mode 100644 util/iniparser.h create mode 100644 util/parse-configs.c create mode 100644 util/parse-configs.h -- 2.31.1
