chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tty-ask-password-agent: modernization
[elogind.git]
/
src
/
core
/
manager.c
diff --git
a/src/core/manager.c
b/src/core/manager.c
index 2e63c5ef1f967cb8c704dba36da5375cda6c8a2b..32c056588abca0493a5f62b02da87ae7d40cc2ea 100644
(file)
--- 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 */
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
/* 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);
* 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 */
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. */
/* 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);
/* Third, fire things up! */
q = manager_coldplug(m);
- if (q < 0)
+ if (q < 0
&& r == 0
)
r = q;
if (serialization) {
r = q;
if (serialization) {
@@
-1876,7
+1875,7
@@
int manager_loop(Manager *m) {
if (wait_usec <= 0)
wait_usec = 1;
} else
if (wait_usec <= 0)
wait_usec = 1;
} else
- wait_usec =
(usec_t) -1
;
+ wait_usec =
USEC_INFINITY
;
r = sd_event_run(m->event, wait_usec);
if (r < 0) {
r = sd_event_run(m->event, wait_usec);
if (r < 0) {
@@
-1978,10
+1977,7
@@
void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) {
}
void manager_send_unit_plymouth(Manager *m, Unit *u) {
}
void manager_send_unit_plymouth(Manager *m, Unit *u) {
- union sockaddr_union sa = {
- .un.sun_family = AF_UNIX,
- .un.sun_path = "\0/org/freedesktop/plymouthd",
- };
+ union sockaddr_union sa = PLYMOUTH_SOCKET;
int n = 0;
_cleanup_free_ char *message = NULL;
int n = 0;
_cleanup_free_ char *message = NULL;