ryantimwilson / rpms / systemd

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