if (errno == EAGAIN)
return 0;
- log_warning("Failed to read from fifo: %s", strerror(errno));
+ log_warning("Failed to read from fifo: %m");
return -1;
}
s->epoll_fd = epoll_create1(EPOLL_CLOEXEC);
if (s->epoll_fd < 0) {
r = -errno;
- log_error("Failed to create epoll object: %s", strerror(errno));
+ log_error("Failed to create epoll object: %m");
goto fail;
}
f = new0(Fifo, 1);
if (!f) {
r = -ENOMEM;
- log_error("Failed to create fifo object: %s",
- strerror(errno));
+ log_error("Failed to create fifo object: %m");
goto fail;
}
if (epoll_ctl(s->epoll_fd, EPOLL_CTL_ADD, fd, &ev) < 0) {
r = -errno;
fifo_free(f);
- log_error("Failed to add fifo fd to epoll object: %s",
- strerror(errno));
+ log_error("Failed to add fifo fd to epoll object: %m");
goto fail;
}
s->n_fifos ++;
}
- r = bus_connect_system(&s->bus);
+ r = bus_open_system_systemd(&s->bus);
if (r < 0) {
log_error("Failed to get D-Bus connection: %s", strerror(-r));
r = -EIO;
if (errno == EINTR)
continue;
- log_error("epoll_wait() failed: %s", strerror(errno));
+ log_error("epoll_wait() failed: %m");
goto fail;
}