ryantimwilson / rpms / systemd

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