mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
journalctl: improve error messages when the specified boot is not found
This commit is contained in:
parent
0f1a9a830c
commit
c34e939909
@ -1136,10 +1136,11 @@ static int add_boot(sd_journal *j) {
|
|||||||
const char *reason = (r == 0) ? "No such boot ID in journal" : strerror(-r);
|
const char *reason = (r == 0) ? "No such boot ID in journal" : strerror(-r);
|
||||||
|
|
||||||
if (sd_id128_is_null(arg_boot_id))
|
if (sd_id128_is_null(arg_boot_id))
|
||||||
log_error("Failed to look up boot %+i: %s", arg_boot_offset, reason);
|
log_error("Data from the specified boot (%+i) is not available: %s",
|
||||||
|
arg_boot_offset, reason);
|
||||||
else
|
else
|
||||||
log_error("Failed to look up boot ID "SD_ID128_FORMAT_STR"%+i: %s",
|
log_error("Data from the specified boot ("SD_ID128_FORMAT_STR") is not available: %s",
|
||||||
SD_ID128_FORMAT_VAL(arg_boot_id), arg_boot_offset, reason);
|
SD_ID128_FORMAT_VAL(arg_boot_id), reason);
|
||||||
|
|
||||||
return r == 0 ? -ENODATA : r;
|
return r == 0 ? -ENODATA : r;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user