core: turn unit_load_fragment_and_dropin_optional() into a flag

unit_load_fragment_and_dropin() and unit_load_fragment_and_dropin_optional()
are really the same, with one minor difference in behaviour. Let's drop
the second function.

"_optional" in the name suggests that it's the "dropin" part that is optional.
(Which it is, but in this case, we mean the fragment to be optional.)
I think the new version with a flag is easier to understand.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-10-11 10:45:33 +02:00
parent 349176ae6c
commit c362077087
12 changed files with 21 additions and 42 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ static int timer_load(Unit *u) {
assert(u);
assert(u->load_state == UNIT_STUB);
r = unit_load_fragment_and_dropin(u);
r = unit_load_fragment_and_dropin(u, true);
if (r < 0)
return r;