mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-25 23:21:33 +03:00
journal: never fail if we cannot access /var, just print a warning
This commit is contained in:
parent
52f4f45bf4
commit
adf7d506b5
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user