From 4f52b822b05c373f40fea1a41ae3ade5d5ff558e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 2 Nov 2015 23:13:01 +0100 Subject: journalctl: continue operation, even if we run into an invalid file --- src/journal/journalctl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index a35783e3ff..30ae6e39c3 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -1729,15 +1729,12 @@ static int access_check(sd_journal *j) { SET_FOREACH(code, j->errors, it) { int err; - err = -PTR_TO_INT(code); - assert(err > 0); + err = abs(PTR_TO_INT(code)); if (err == EACCES) continue; - log_warning_errno(err, "Error was encountered while opening journal files: %m"); - if (r == 0) - r = -err; + log_warning_errno(err, "An error was encountered while opening journal files, ignoring: %m"); } return r; -- cgit v1.2.3-54-g00ecf