summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-18 17:05:18 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-20 19:48:16 -0400
commit1cd974edfd7cd91dcdf321e7202bd220bac50a2d (patch)
tree5264a4bb74ad325bd68c09eaa10b8e1450be6aa7 /src
parent0d8c31ff7237149b505290652864b4e7e866b2a7 (diff)
systemd: return the first error from manager_startup()
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 2e63c5ef1f..0653d7e59a 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1005,11 +1005,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
dual_timestamp_get(&m->units_load_finish_timestamp);
/* Second, deserialize if there is something to deserialize */
- if (serialization) {
- q = manager_deserialize(m, serialization, fds);
- if (q < 0)
- r = q;
- }
+ if (serialization)
+ r = manager_deserialize(m, serialization, fds);
/* Any fds left? Find some unit which wants them. This is
* useful to allow container managers to pass some file
@@ -1017,13 +1014,15 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
* socket-based activation of entire containers. */
if (fdset_size(fds) > 0) {
q = manager_distribute_fds(m, fds);
- if (q < 0)
+ if (q < 0 && r == 0)
r = q;
}
/* We might have deserialized the notify fd, but if we didn't
* then let's create the bus now */
- manager_setup_notify(m);
+ q = manager_setup_notify(m);
+ if (q < 0 && r == 0)
+ r = q;
/* We might have deserialized the kdbus control fd, but if we
* didn't, then let's create the bus now. */
@@ -1033,7 +1032,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
/* Third, fire things up! */
q = manager_coldplug(m);
- if (q < 0)
+ if (q < 0 && r == 0)
r = q;
if (serialization) {