chiark / gitweb /
logind: fix operation precedence mix-up
[elogind.git] / src / journal / journald.c
index 17aac8877b778f663669617e16097bc6d4456aa2..36f9abe47ecd957e347a45f7be11e0a09840e2fa 100644 (file)
@@ -868,7 +868,8 @@ static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned
                         return;
         }
 
-        log_debug("Failed to forward syslog message: %m");
+        if (errno != ENOENT)
+                log_debug("Failed to forward syslog message: %m");
 }
 
 static void forward_syslog_raw(Server *s, int priority, const char *buffer, struct ucred *ucred, struct timeval *tv) {
@@ -2146,11 +2147,8 @@ finish:
         journal_file_close(s->runtime_journal);
         s->runtime_journal = NULL;
 
-        if (r >= 0) {
-                char path[] = "/run/log/journal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
-                sd_id128_to_string(machine, path + 17);
-                rm_rf(path, false, true, false);
-        }
+        if (r >= 0)
+                rm_rf("/run/log/journal", false, true, false);
 
         return r;
 }
@@ -2227,6 +2225,8 @@ static int process_event(Server *s, struct epoll_event *ev) {
                         return -errno;
                 }
 
+                log_info("Received SIG%s", signal_to_string(sfsi.ssi_signo));
+
                 if (sfsi.ssi_signo == SIGUSR1) {
                         touch("/run/systemd/journal/flushed");
                         server_flush_to_var(s);
@@ -2239,7 +2239,6 @@ static int process_event(Server *s, struct epoll_event *ev) {
                         return 1;
                 }
 
-                log_debug("Received SIG%s", signal_to_string(sfsi.ssi_signo));
                 return 0;
 
         } else if (ev->data.fd == s->proc_kmsg_fd) {