summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-03 21:07:12 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-03 21:08:58 +0100
commitadf7d506b50af9ba398a9925c8cd47ba328e720c (patch)
tree662b715916a258a7c7984571348c56454508feb1 /src
parent52f4f45bf48cfb757024f9abf49f1533b661397a (diff)
journal: never fail if we cannot access /var, just print a warning
Diffstat (limited to 'src')
-rw-r--r--src/journal/journald.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 5c8e713657..1faf570161 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -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 {