chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core/mount: remove "fail" again
[elogind.git]
/
src
/
core
/
dbus.c
diff --git
a/src/core/dbus.c
b/src/core/dbus.c
index 7291bdc3f367550deb11ba2da681298faa407166..260775cd85eedd0a40debd909933b4cec7d813c8 100644
(file)
--- a/
src/core/dbus.c
+++ b/
src/core/dbus.c
@@
-39,7
+39,7
@@
#include "dbus.h"
#include "bus-util.h"
#include "bus-error.h"
#include "dbus.h"
#include "bus-util.h"
#include "bus-error.h"
-#include "bus-errors.h"
+#include "bus-
common-
errors.h"
#include "strxcpyx.h"
#include "bus-internal.h"
#include "selinux-access.h"
#include "strxcpyx.h"
#include "bus-internal.h"
#include "selinux-access.h"
@@
-624,7
+624,7
@@
static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void
nfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC);
if (nfd < 0) {
nfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC);
if (nfd < 0) {
- log_warning
(
"Failed to accept private connection, ignoring: %m");
+ log_warning
_errno(errno,
"Failed to accept private connection, ignoring: %m");
return 0;
}
return 0;
}
@@
-958,22
+958,16
@@
static int bus_init_private(Manager *m) {
(void) unlink(sa.un.sun_path);
fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
(void) unlink(sa.un.sun_path);
fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
- if (fd < 0) {
- log_error("Failed to allocate private socket: %m");
- return -errno;
- }
+ if (fd < 0)
+ return log_error_errno(errno, "Failed to allocate private socket: %m");
r = bind(fd, &sa.sa, salen);
r = bind(fd, &sa.sa, salen);
- if (r < 0) {
- log_error("Failed to bind private socket: %m");
- return -errno;
- }
+ if (r < 0)
+ return log_error_errno(errno, "Failed to bind private socket: %m");
r = listen(fd, SOMAXCONN);
r = listen(fd, SOMAXCONN);
- if (r < 0) {
- log_error("Failed to make private socket listening: %m");
- return -errno;
- }
+ if (r < 0)
+ return log_error_errno(errno, "Failed to make private socket listening: %m");
r = sd_event_add_io(m->event, &s, fd, EPOLLIN, bus_on_connection, m);
if (r < 0)
r = sd_event_add_io(m->event, &s, fd, EPOLLIN, bus_on_connection, m);
if (r < 0)
@@
-1150,15
+1144,20
@@
void bus_track_serialize(sd_bus_track *t, FILE *f) {
int bus_track_deserialize_item(char ***l, const char *line) {
const char *e;
int bus_track_deserialize_item(char ***l, const char *line) {
const char *e;
+ int r;
assert(l);
assert(line);
e = startswith(line, "subscribed=");
if (!e)
assert(l);
assert(line);
e = startswith(line, "subscribed=");
if (!e)
- return -EINVAL;
+ return 0;
+
+ r = strv_extend(l, e);
+ if (r < 0)
+ return r;
- return
strv_extend(l, e)
;
+ return
1
;
}
int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l) {
}
int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l) {