mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-24 02:20:45 +07:00
journalctl: don't choke on entries with no MESSAGE= field
https://bugs.freedesktop.org/show_bug.cgi?id=50177
This commit is contained in:
parent
57ccf90735
commit
c198300fc4
@ -536,6 +536,10 @@ static int output_cat(sd_journal *j, OutputMode mode, unsigned line,
|
||||
|
||||
r = sd_journal_get_data(j, "MESSAGE", &data, &l);
|
||||
if (r < 0) {
|
||||
/* An entry without MESSAGE=? */
|
||||
if (r == -ENOENT)
|
||||
return 0;
|
||||
|
||||
log_error("Failed to get data: %s", strerror(-r));
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user