conf-parser: turn three bool function params into a flags fields
This makes things more readable and fixes some issues with incorrect flag propagation between the various flavours of config_parse().
This commit is contained in:
@@ -154,12 +154,11 @@ int unit_load_dropin(Unit *u) {
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
STRV_FOREACH(f, u->dropin_paths) {
|
||||
config_parse(u->id, *f, NULL,
|
||||
UNIT_VTABLE(u)->sections,
|
||||
config_item_perf_lookup, load_fragment_gperf_lookup,
|
||||
false, false, false, u);
|
||||
}
|
||||
STRV_FOREACH(f, u->dropin_paths)
|
||||
(void) config_parse(u->id, *f, NULL,
|
||||
UNIT_VTABLE(u)->sections,
|
||||
config_item_perf_lookup, load_fragment_gperf_lookup,
|
||||
0, u);
|
||||
|
||||
u->dropin_mtime = now(CLOCK_REALTIME);
|
||||
|
||||
|
||||
@@ -4450,7 +4450,7 @@ static int load_from_path(Unit *u, const char *path) {
|
||||
r = config_parse(u->id, filename, f,
|
||||
UNIT_VTABLE(u)->sections,
|
||||
config_item_perf_lookup, load_fragment_gperf_lookup,
|
||||
false, true, false, u);
|
||||
CONFIG_PARSE_ALLOW_INCLUDE, u);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
+1
-1
@@ -768,7 +768,7 @@ static int parse_config_file(void) {
|
||||
CONF_PATHS_NULSTR("systemd/system.conf.d") :
|
||||
CONF_PATHS_NULSTR("systemd/user.conf.d");
|
||||
|
||||
config_parse_many_nulstr(fn, conf_dirs_nulstr, "Manager\0", config_item_table_lookup, items, false, NULL);
|
||||
(void) config_parse_many_nulstr(fn, conf_dirs_nulstr, "Manager\0", config_item_table_lookup, items, CONFIG_PARSE_WARN, NULL);
|
||||
|
||||
/* Traditionally "0" was used to turn off the default unit timeouts. Fix this up so that we used USEC_INFINITY
|
||||
* like everywhere else. */
|
||||
|
||||
Reference in New Issue
Block a user