chiark / gitweb /
journalctl: don't choke on entries with no MESSAGE= field
[elogind.git] / src / shared / logs-show.c
index d60e5e53081c3cdacf828dc6562ef8837f2a9390..2ddff15bdb8e80a7522736a385056b3e7ed51496 100644 (file)
@@ -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;
         }