chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
journalctl: don't choke on entries with no MESSAGE= field
[elogind.git]
/
src
/
shared
/
logs-show.c
diff --git
a/src/shared/logs-show.c
b/src/shared/logs-show.c
index d60e5e53081c3cdacf828dc6562ef8837f2a9390..2ddff15bdb8e80a7522736a385056b3e7ed51496 100644
(file)
--- 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;
}