chiark / gitweb /
journal: react with immediate rotation to a couple of more errors
[elogind.git] / src / journal / journal-file.c
index 474dd5ca7c2d7b65e046c9d834b8e17ca3ffdfb5..5d540a7d407da1be3babba109f7fdf210f08db6b 100644 (file)
@@ -1887,7 +1887,10 @@ int journal_file_open_reliably(
         char *p;
 
         r = journal_file_open(fname, flags, mode, template, ret);
-        if (r != -EBADMSG)
+        if (r != -EBADMSG && /* corrupted */
+            r != -ENODATA && /* truncated */
+            r != -EHOSTDOWN && /* other machine */
+            r != -EPROTONOSUPPORT) /* incompatible feature */
                 return r;
 
         if ((flags & O_ACCMODE) == O_RDONLY)