ndctl: add the ciniparser tool from ccan
Subsystems (2)
PATCH 1/2 ndctl: add the ciniparser tool from ccan
Import ciniparser tool from ccan [1], therefore, the ndctl monitor can read the configuration file by using this library.
[1]: https://ccodearchive.net/info/ciniparser.html
Signed-off-by QI Fuli <[email protected]>
--- Makefile.am | 6 +- ccan/ciniparser/LICENSE | 1 + ccan/ciniparser/ciniparser.c | 480 +++++++++++++++++++++++++++++++++++ ccan/ciniparser/ciniparser.h | 262 +++++++++++++++++++ ccan/ciniparser/dictionary.c | 266 +++++++++++++++++++ ccan/ciniparser/dictionary.h | 166 ++++++++++++ 6 files changed, 1180 insertions(+), 1 deletion(-) create mode 120000 ccan/ciniparser/LICENSE create mode 100644 ccan/ciniparser/ciniparser.c create mode 100644 ccan/ciniparser/ciniparser.h create mode 100644 ccan/ciniparser/dictionary.c create mode 100644 ccan/ciniparser/dictionary.h
Makefile.am +5 -1
@@ -56,7 +56,11 @@ libccan_a_SOURCES = \ ccan/array_size/array_size.h \ ccan/minmax/minmax.h \ ccan/short_types/short_types.h \ - ccan/endian/endian.h + ccan/endian/endian.h \ + ccan/ciniparser/ciniparser.h \ + ccan/ciniparser/ciniparser.c \ + ccan/ciniparser/dictionary.h \ + ccan/ciniparser/dictionary.c noinst_LIBRARIES += libutil.a libutil_a_SOURCES = \
ccan/ciniparser/LICENSE new file +1 -0
@@ -0,0 +1 @@ +../../licenses/BSD-MIT
ccan/ciniparser/ciniparser.c new file +480 -0
480 lines not on this page · raw message
ccan/ciniparser/ciniparser.h new file +262 -0
262 lines not on this page · raw message
ccan/ciniparser/dictionary.c new file +266 -0
266 lines not on this page · raw message
ccan/ciniparser/dictionary.h new file +166 -0
166 lines not on this page · raw message
Signature · 7 lines
2.20.0.rc2 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
PATCH 2/2 ndctl, monitor: refactor parse_config_file
This patch is used for refactoring parse_config_file by replacing the open coded implementation with ccan/ciniparser library.
Signed-off-by QI Fuli <[email protected]>
--- ndctl/Makefile.am | 1 + ndctl/monitor.c | 114 ++++++++++++--------------------------------- ndctl/monitor.conf | 2 + 3 files changed, 32 insertions(+), 85 deletions(-)
ndctl/Makefile.am +1 -0
@@ -28,6 +28,7 @@ ndctl_LDADD =\ lib/libndctl.la \ ../daxctl/lib/libdaxctl.la \ ../libutil.a \ + ../libccan.a \ $(UUID_LIBS) \ $(KMOD_LIBS) \ $(JSON_LIBS)
ndctl/monitor.c +29 -85
146 lines not on this page · raw message
ndctl/monitor.conf +2 -0
@@ -9,6 +9,8 @@ # Multiple space-separated values are allowed, but except the following # characters: : ? / \ % " ' $ & ! * { } [ ] ( ) = < > @ +[monitor] + # The objects to monitor are filtered via dimm's name by setting key "dimm". # If this value is different from the value of [--dimm=<value>] option, # both of the values will work.
Signature · 7 lines
2.20.0.rc2 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm