summaryrefslogtreecommitdiff
path: root/src/journal/journalctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r--src/journal/journalctl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 1fdd7fc5c8..96b0ddd80f 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1662,8 +1662,7 @@ static int access_check(sd_journal *j) {
assert(err > 0);
if (err != EACCES)
- log_warning("Error was encountered while opening journal files: %s",
- strerror(err));
+ log_warning_errno(err, "Error was encountered while opening journal files: %m");
}
return r;
@@ -1814,9 +1813,8 @@ int main(int argc, char *argv[]) {
else
r = sd_journal_open(&j, !arg_merge*SD_JOURNAL_LOCAL_ONLY + arg_journal_type);
if (r < 0) {
- log_error("Failed to open %s: %s",
- arg_directory ? arg_directory : arg_file ? "files" : "journal",
- strerror(-r));
+ log_error_errno(r, "Failed to open %s: %m",
+ arg_directory ? arg_directory : arg_file ? "files" : "journal");
return EXIT_FAILURE;
}