chiark / gitweb /
journald: be more careful when we try to flush the runtime journal to disk and the...
[elogind.git] / src / journal / journald-server.c
index 1b5a22b122ae1eab6b14673f6a234808f30fe1d8..88163c01167a19407bb38098ec28b768b3fb6773 100644 (file)
@@ -938,6 +938,12 @@ int server_flush_to_var(Server *s) {
                 server_rotate(s);
                 server_vacuum(s);
 
+                if (!s->system_journal) {
+                        log_notice("Didn't flush runtime journal since rotation of system journal wasn't successful.");
+                        r = -EIO;
+                        goto finish;
+                }
+
                 log_debug("Retrying write.");
                 r = journal_file_copy_entry(f, s->system_journal, o, f->current_offset, NULL, NULL, NULL);
                 if (r < 0) {