]> err.no Git - systemd/commitdiff
journal: never fail if we cannot access /var, just print a warning
authorLennart Poettering <lennart@poettering.net>
Tue, 3 Jan 2012 20:07:12 +0000 (21:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 3 Jan 2012 20:08:58 +0000 (21:08 +0100)
src/journal/journald.c

index 5c8e713657409e9a57e920c94809c891fdcc0051..1faf570161a21457805e5836bb1590f07f0cb850 100644 (file)
@@ -1196,12 +1196,10 @@ static int system_journal_open(Server *s) {
                         fix_perms(s->system_journal, 0);
                 } else if (r < 0) {
 
-                        if (r == -ENOENT || r == -EROFS)
-                                r = 0;
-                        else {
-                                log_error("Failed to open system journal: %s", strerror(-r));
-                                return r;
-                        }
+                        if (r != -ENOENT && r != -EROFS)
+                                log_warning("Failed to open system journal: %s", strerror(-r));
+
+                        r = 0;
                 }
         }
 
@@ -1221,13 +1219,10 @@ static int system_journal_open(Server *s) {
                         free(fn);
 
                         if (r < 0) {
+                                if (r != -ENOENT)
+                                        log_warning("Failed to open runtime journal: %s", strerror(-r));
 
-                                if (r == -ENOENT)
-                                        r = 0;
-                                else {
-                                        log_error("Failed to open runtime journal: %s", strerror(-r));
-                                        return r;
-                                }
+                                r = 0;
                         }
 
                 } else {