daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
65878a
From b92a3a82b9bfdce438821f6f941f81ef2b4dd9e1 Mon Sep 17 00:00:00 2001
65878a
From: Lennart Poettering <lennart@poettering.net>
65878a
Date: Tue, 17 Dec 2013 19:56:06 +0100
65878a
Subject: [PATCH] journald: downgrade warning message when /dev/kmsg does not
65878a
 exist
65878a
65878a
---
65878a
 src/journal/journald-kmsg.c | 3 ++-
65878a
 1 file changed, 2 insertions(+), 1 deletion(-)
65878a
65878a
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
65878a
index 21649d0..9895808 100644
65878a
--- a/src/journal/journald-kmsg.c
65878a
+++ b/src/journal/journald-kmsg.c
65878a
@@ -382,7 +382,8 @@ int server_open_dev_kmsg(Server *s) {
65878a
 
65878a
         s->dev_kmsg_fd = open("/dev/kmsg", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
65878a
         if (s->dev_kmsg_fd < 0) {
65878a
-                log_warning("Failed to open /dev/kmsg, ignoring: %m");
65878a
+                log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
65878a
+                         "Failed to open /dev/kmsg, ignoring: %m");
65878a
                 return 0;
65878a
         }
65878a