chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hashmap: hashmap_move_one() should return -ENOENT when 'other' is NULL
[elogind.git]
/
src
/
journal
/
journald-kmsg.c
diff --git
a/src/journal/journald-kmsg.c
b/src/journal/journald-kmsg.c
index 12992e7d78b5f36e4e1ba1576fe672501e2249f5..fb8ea08e31b56dd25b30ac0d684da22299e70dd7 100644
(file)
--- a/
src/journal/journald-kmsg.c
+++ b/
src/journal/journald-kmsg.c
@@
-25,7
+25,7
@@
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <sys/socket.h>
-#include
<systemd/sd-messages.h>
+#include
"systemd/sd-messages.h"
#include <libudev.h>
#include "journald-server.h"
#include <libudev.h>
#include "journald-server.h"
@@
-152,7
+152,7
@@
static void dev_kmsg_record(Server *s, char *p, size_t l) {
/* Did we lose any? */
if (serial > *s->kernel_seqnum)
server_driver_message(s, SD_MESSAGE_JOURNAL_MISSED, "Missed %"PRIu64" kernel messages",
/* Did we lose any? */
if (serial > *s->kernel_seqnum)
server_driver_message(s, SD_MESSAGE_JOURNAL_MISSED, "Missed %"PRIu64" kernel messages",
- serial - *s->kernel_seqnum
- 1
);
+ serial - *s->kernel_seqnum);
/* Make sure we never read this one again. Note that
* we always store the next message serial we expect
/* Make sure we never read this one again. Note that
* we always store the next message serial we expect
@@
-274,6
+274,9
@@
static void dev_kmsg_record(Server *s, char *p, size_t l) {
if (asprintf(&syslog_priority, "PRIORITY=%i", priority & LOG_PRIMASK) >= 0)
IOVEC_SET_STRING(iovec[n++], syslog_priority);
if (asprintf(&syslog_priority, "PRIORITY=%i", priority & LOG_PRIMASK) >= 0)
IOVEC_SET_STRING(iovec[n++], syslog_priority);
+ if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0)
+ IOVEC_SET_STRING(iovec[n++], syslog_facility);
+
if ((priority & LOG_FACMASK) == LOG_KERN)
IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel");
else {
if ((priority & LOG_FACMASK) == LOG_KERN)
IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel");
else {
@@
-295,9
+298,6
@@
static void dev_kmsg_record(Server *s, char *p, size_t l) {
if (syslog_pid)
IOVEC_SET_STRING(iovec[n++], syslog_pid);
}
if (syslog_pid)
IOVEC_SET_STRING(iovec[n++], syslog_pid);
}
-
- if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0)
- IOVEC_SET_STRING(iovec[n++], syslog_facility);
}
message = cunescape_length_with_prefix(p, pl, "MESSAGE=");
}
message = cunescape_length_with_prefix(p, pl, "MESSAGE=");