chiark / gitweb /
journald: avoid logging to kmsg in the normal paths
[elogind.git] / src / journal / journald-kmsg.c
index 0c17eab5c7efa495eacef853f3fe931084d886d5..284ace984d58f839731bce88f0c0d34a91e3d13f 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/epoll.h>
 #include <fcntl.h>
 #include <sys/mman.h>
+#include <sys/socket.h>
 
 #include <systemd/sd-messages.h>
 #include <libudev.h>
@@ -274,7 +275,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
         if ((priority & LOG_FACMASK) == LOG_KERN)
                 IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel");
         else {
-                syslog_read_identifier((const char**) &p, &identifier, &pid);
+                syslog_parse_identifier((const char**) &p, &identifier, &pid);
 
                 /* Avoid any messages we generated ourselves via
                  * log_info() and friends. */
@@ -358,7 +359,7 @@ int server_flush_dev_kmsg(Server *s) {
         if (!s->dev_kmsg_readable)
                 return 0;
 
-        log_info("Flushing /dev/kmsg...");
+        log_debug("Flushing /dev/kmsg...");
 
         for (;;) {
                 r = server_read_dev_kmsg(s);