summaryrefslogtreecommitdiffstats
path: root/src/shared/conf-parser.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-01-25 18:30:43 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-03-07 18:49:44 +0100
commite5abff372d028d28d50165358cd48b624cd0c2d2 (patch)
treedeff5a7ab41edcf31dedd391c90f19bc3650c6d0 /src/shared/conf-parser.h
parentconstants: drop duplicated CONF_PATHS defines (diff)
downloadsystemd-e5abff372d028d28d50165358cd48b624cd0c2d2.tar.xz
systemd-e5abff372d028d28d50165358cd48b624cd0c2d2.zip
shared/conf-parser: collapse pkgdir and conf_file args into one
This essentially reverts 5656cdfeeabc16b5489f5ec7a0a36025a2ec1f23. I find it much easier to understand what is going on when the path-relative-to-the-search-path is passed in full, instead of being constructed from two parts, with one of the parts being implicit in some places. Also, we call 'systemd-analyze cat-config <path>' with <path> with the same meaning, so this makes the internal and external APIs more consistent.
Diffstat (limited to 'src/shared/conf-parser.h')
-rw-r--r--src/shared/conf-parser.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index 3057356479..2c75ba5d8b 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -93,25 +93,14 @@ int config_parse(
void *userdata,
struct stat *ret_stat); /* possibly NULL */
-int config_parse_config_file_full(
- const char *conf_file,
- const char *pkgdir,
+int config_parse_config_file(
+ const char *conf_file, /* a path like "systemd/frobnicator.conf" */
const char *sections, /* nulstr */
ConfigItemLookup lookup,
const void *table,
ConfigParseFlags flags,
void *userdata);
-static inline int config_parse_config_file(
- const char *conf_file,
- const char *sections, /* nulstr */
- ConfigItemLookup lookup,
- const void *table,
- ConfigParseFlags flags,
- void *userdata) {
- return config_parse_config_file_full(conf_file, "systemd", sections, lookup, table, flags, userdata);
-}
-
int config_parse_many(
const char* const* conf_files, /* possibly empty */
const char* const* conf_file_dirs,