summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-10 20:38:30 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-10 21:03:49 +0100
commit5a6158b6412100672e1cbddb22efdcc5101fed7f (patch)
tree6e00d2ec1afdb9b80db27fbcb064ea243ffe458e /src/core/unit.c
parentba64af90ecf48f7653a04bf3af1291385c9a69b8 (diff)
downloadsystemd-5a6158b6412100672e1cbddb22efdcc5101fed7f.tar.gz
core: try to continue if coldplugging of a unit fails
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 6c130d4cd1..ae019c7f7e 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2890,7 +2890,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
}
int unit_coldplug(Unit *u) {
- int r;
+ int r = 0, q = 0;
assert(u);
@@ -2901,17 +2901,16 @@ int unit_coldplug(Unit *u) {
u->coldplugged = true;
- if (UNIT_VTABLE(u)->coldplug) {
+ if (UNIT_VTABLE(u)->coldplug)
r = UNIT_VTABLE(u)->coldplug(u);
- if (r < 0)
- return r;
- }
- if (u->job) {
- r = job_coldplug(u->job);
- if (r < 0)
- return r;
- }
+ if (u->job)
+ q = job_coldplug(u->job);
+
+ if (r < 0)
+ return r;
+ if (q < 0)
+ return q;
return 0;
}