summaryrefslogtreecommitdiff
path: root/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-28 02:44:47 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-28 02:44:47 +0100
commitd46de8a1a249e179687361dcaeba27e1c586253a (patch)
tree42f790e46583f88c557ac33ea67e857654a794a4 /load-fragment.c
parent98b5b2986fa1b85fd2d2e80f867f1647b4e4e3b5 (diff)
rework config file load logic
Diffstat (limited to 'load-fragment.c')
-rw-r--r--load-fragment.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/load-fragment.c b/load-fragment.c
index 2757506aba..9273fc8b83 100644
--- a/load-fragment.c
+++ b/load-fragment.c
@@ -824,7 +824,7 @@ finish:
}
int unit_load_fragment(Unit *u) {
- int r = -ENOENT;
+ int r = 0;
ExecContext *c;
assert(u);
@@ -851,14 +851,16 @@ int unit_load_fragment(Unit *u) {
if (r >= 0 && c &&
(c->output == EXEC_KERNEL || c->output == EXEC_SYSLOG)) {
+ int k;
+
/* If syslog or kernel logging is requested, make sure
* our own logging daemon is run first. */
- if ((r = unit_add_dependency(u, UNIT_AFTER, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0)
- return r;
+ if ((k = unit_add_dependency(u, UNIT_AFTER, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0)
+ return k;
- if ((r = unit_add_dependency(u, UNIT_REQUIRES, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0)
- return r;
+ if ((k = unit_add_dependency(u, UNIT_REQUIRES, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0)
+ return k;
}
return r;