[systemd-devel] [PATCH 2/3] journald-server: r should be checked after journal_file_open_reliably
Lukas Nykryn
lnykryn at redhat.com
Tue Jul 9 06:45:37 PDT 2013
---
src/journal/journald-server.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 44ba916..6beaa8a 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -910,11 +910,12 @@ static int system_journal_open(Server *s) {
if (r >= 0)
server_fix_perms(s, s->system_journal, 0);
- } else if (r < 0) {
- if (r != -ENOENT && r != -EROFS)
- log_warning("Failed to open system journal: %s", strerror(-r));
+ else if (r < 0) {
+ if (r != -ENOENT && r != -EROFS)
+ log_warning("Failed to open system journal: %s", strerror(-r));
- r = 0;
+ r = 0;
+ }
}
if (!s->runtime_journal &&
--
1.8.1.4
More information about the systemd-devel
mailing list