ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From 602fa0f30e4770b1f45e005a7ed9417065b0d640 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 17 Dec 2013 19:56:06 +0100
Subject: [PATCH] journald: downgrade warning message when /dev/kmsg does not
 exist

---
 src/journal/journald-kmsg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 21649d0..9895808 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -382,7 +382,8 @@ int server_open_dev_kmsg(Server *s) {
 
         s->dev_kmsg_fd = open("/dev/kmsg", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
         if (s->dev_kmsg_fd < 0) {
-                log_warning("Failed to open /dev/kmsg, ignoring: %m");
+                log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
+                         "Failed to open /dev/kmsg, ignoring: %m");
                 return 0;
         }