From e8f280bd0af47158a9d6c3da940754cdd6f51d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 8 Nov 2018 14:26:00 +0100 Subject: [PATCH 1/4] sd_bus: use structured intialization in one more place --- src/libsystemd/sd-bus/bus-error.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c index e73f7057e1..5415aa76a3 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c @@ -205,8 +205,7 @@ _public_ void sd_bus_error_free(sd_bus_error *e) { free((void*) e->message); } - e->name = e->message = NULL; - e->_need_free = 0; + *e = (sd_bus_error) {}; } _public_ int sd_bus_error_set(sd_bus_error *e, const char *name, const char *message) { From b98a3c286e165697a1a6c837e6f7f727b97a88fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 9 Nov 2018 20:48:50 +0100 Subject: [PATCH 2/4] man: add missing link in sd-bus(3) Follow-up for 576af73f4a01e0fec9f376ead40fcce558aeebe8. --- man/sd-bus.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/man/sd-bus.xml b/man/sd-bus.xml index c1aef96024..4620590be4 100644 --- a/man/sd-bus.xml +++ b/man/sd-bus.xml @@ -47,6 +47,7 @@ sd_bus_attach_event3, sd_bus_creds_get_pid3, sd_bus_creds_new_from_pid3, +sd_bus_close3, sd_bus_default3, sd-bus-errors3, sd_bus_error3, From a90db619ca7acd7696d9d18d2d8a8c5206281757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 10 Nov 2018 07:43:57 +0100 Subject: [PATCH 3/4] shared: fix typo --- src/shared/seccomp-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index 7829bbd415..54280f5916 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -933,7 +933,7 @@ int seccomp_load_syscall_filter_set(uint32_t default_action, const SyscallFilter assert(set); /* The one-stop solution: allocate a seccomp object, add the specified filter to it, and apply it. Once for - * earch local arch. */ + * each local arch. */ SECCOMP_FOREACH_LOCAL_ARCH(arch) { _cleanup_(seccomp_releasep) scmp_filter_ctx seccomp = NULL; From 8e143a123276a9636987b08f555603927ca9e186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 11 Nov 2018 12:33:06 +0100 Subject: [PATCH 4/4] journalctl: do not treat EINTR as an error when waiting for events Fixup for 2a1e0f2228bbdfbc18635e959f47df7da50b62fe. Fixes #10724. Reproducer: start 'journalctl -f' in a terminal window, change window size. --- src/journal/journalctl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index b7cef573e3..8c9a6106df 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -2058,8 +2058,13 @@ static int wait_for_change(sd_journal *j, int poll_fd) { if (r < 0) return log_error_errno(r, "Failed to determine journal waiting time: %m"); - if (ppoll(pollfds, ELEMENTSOF(pollfds), timeout == USEC_INFINITY ? NULL : timespec_store(&ts, timeout), NULL) < 0) + if (ppoll(pollfds, ELEMENTSOF(pollfds), + timeout == USEC_INFINITY ? NULL : timespec_store(&ts, timeout), NULL) < 0) { + if (errno == EINTR) + return 0; + return log_error_errno(errno, "Couldn't wait for journal event: %m"); + } if (pollfds[1].revents & (POLLHUP|POLLERR)) { /* STDOUT has been closed? */ log_debug("Standard output has been closed.");