]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/main.c
conf: replace config_parse_many_nulstr() with config_parse_config_file()
authorFranck Bui <fbui@suse.com>
Fri, 27 Jan 2023 10:32:27 +0000 (11:32 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 13 Mar 2023 18:31:21 +0000 (03:31 +0900)
commit07e0ffc8234b8212a6509fe6dbc1811be03fc3ae
treec6e3c15a443bad9f9f6c9c2f220e3fa352cc0f35
parent4fed028ae48e0b70325d78dd7e44e7f776a7aa0a
conf: replace config_parse_many_nulstr() with config_parse_config_file()

All daemons use a similar scheme to read their main config files and theirs
drop-ins. The main config files are always stored in /etc/systemd directory and
it's easy enough to construct the name of the drop-in directories based on the
name of the main config file.

Hence the new helper does that internally, which allows to reduce and simplify
the args passed previously to config_parse_many_nulstr().

Besides the overall code simplification it results:

  16 files changed, 87 insertions(+), 159 deletions(-)

it allows to identify clearly the locations in the code where configuration
files are parsed.
16 files changed:
src/basic/constants.h
src/core/main.c
src/coredump/coredump.c
src/home/homed-conf.c
src/journal-remote/journal-remote-main.c
src/journal-remote/journal-upload.c
src/journal/journald-server.c
src/login/logind-core.c
src/network/networkd-conf.c
src/oom/oomd.c
src/pstore/pstore.c
src/resolve/resolved-conf.c
src/shared/conf-parser.c
src/shared/conf-parser.h
src/shared/sleep-config.c
src/timesync/timesyncd-conf.c