diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-18 11:12:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-18 11:12:31 +0200 |
commit | c198300fc44cdc62b43d7458ab9278b9c46fd733 (patch) | |
tree | 1f480dabca27651f6308b343cabfb8cb8f0b3e47 /src/shared | |
parent | 57ccf9073531e09890257d70d3176fec43da29a7 (diff) |
journalctl: don't choke on entries with no MESSAGE= field
https://bugs.freedesktop.org/show_bug.cgi?id=50177
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/logs-show.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index d60e5e5308..2ddff15bdb 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -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; } |