Blame SOURCES/0512-journalctl-continue-operation-even-if-we-run-into-an.patch
|
|
de541a |
From f5a2a7b3630d0ba9a25f8a81cdeaf5336b745e3e Mon Sep 17 00:00:00 2001
|
|
|
de541a |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
de541a |
Date: Mon, 2 Nov 2015 23:13:01 +0100
|
|
|
de541a |
Subject: [PATCH] journalctl: continue operation, even if we run into an
|
|
|
de541a |
invalid file
|
|
|
de541a |
|
|
|
de541a |
(cherry picked from commit 4f52b822b05c373f40fea1a41ae3ade5d5ff558e)
|
|
|
de541a |
|
|
|
de541a |
Related: #1465759
|
|
|
de541a |
---
|
|
|
de541a |
src/journal/journalctl.c | 7 ++-----
|
|
|
de541a |
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
de541a |
|
|
|
de541a |
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
|
|
|
de541a |
index c771cff8b..8c8379732 100644
|
|
|
de541a |
--- a/src/journal/journalctl.c
|
|
|
de541a |
+++ b/src/journal/journalctl.c
|
|
|
de541a |
@@ -1804,15 +1804,12 @@ static int access_check(sd_journal *j) {
|
|
|
de541a |
SET_FOREACH(code, j->errors, it) {
|
|
|
de541a |
int err;
|
|
|
de541a |
|
|
|
de541a |
- err = -PTR_TO_INT(code);
|
|
|
de541a |
- assert(err > 0);
|
|
|
de541a |
+ err = abs(PTR_TO_INT(code));
|
|
|
de541a |
|
|
|
de541a |
if (err == EACCES)
|
|
|
de541a |
continue;
|
|
|
de541a |
|
|
|
de541a |
- log_warning_errno(err, "Error was encountered while opening journal files: %m");
|
|
|
de541a |
- if (r == 0)
|
|
|
de541a |
- r = -err;
|
|
|
de541a |
+ log_warning_errno(err, "An error was encountered while opening journal files, ignoring: %m");
|
|
|
de541a |
}
|
|
|
de541a |
|
|
|
de541a |
return r;
|