daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
1abbee
From 046d996001c0b3fe34d34683e55f62481a5af932 Mon Sep 17 00:00:00 2001
1abbee
From: Jan Synacek <jsynacek@redhat.com>
1abbee
Date: Mon, 1 Feb 2016 09:29:02 +0100
1abbee
Subject: [PATCH] journalctl: improve error messages when the specified boot is
1abbee
 not found
1abbee
1abbee
Cherry-picked from: c34e939909710bf124e7741c3648592a30418ffd
1abbee
Resolves: #1082179
1abbee
---
1abbee
 src/journal/journalctl.c | 7 ++++---
1abbee
 1 file changed, 4 insertions(+), 3 deletions(-)
1abbee
1abbee
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
c62b8e
index 7058788efa..964f849ee0 100644
1abbee
--- a/src/journal/journalctl.c
1abbee
+++ b/src/journal/journalctl.c
1abbee
@@ -1090,10 +1090,11 @@ static int add_boot(sd_journal *j) {
1abbee
                 const char *reason = (r == 0) ? "No such boot ID in journal" : strerror(-r);
1abbee
 
1abbee
                 if (sd_id128_is_null(arg_boot_id))
1abbee
-                        log_error("Failed to look up boot %+i: %s", arg_boot_offset, reason);
1abbee
+                        log_error("Data from the specified boot (%+i) is not available: %s",
1abbee
+                                  arg_boot_offset, reason);
1abbee
                 else
1abbee
-                        log_error("Failed to look up boot ID "SD_ID128_FORMAT_STR"%+i: %s",
1abbee
-                                  SD_ID128_FORMAT_VAL(arg_boot_id), arg_boot_offset, reason);
1abbee
+                        log_error("Data from the specified boot ("SD_ID128_FORMAT_STR") is not available: %s",
1abbee
+                                  SD_ID128_FORMAT_VAL(arg_boot_id), reason);
1abbee
 
1abbee
                 return r == 0 ? -ENODATA : r;
1abbee
         }