Blame SOURCES/0004-Not-having-the-virtio-channel-is-not-an-error-instea.patch

46eaa5
From 528a816d2be5fccb531e7711a4c2efea7dbd0348 Mon Sep 17 00:00:00 2001
46eaa5
From: Colin Walters <walters@verbum.org>
46eaa5
Date: Tue, 11 Jun 2013 15:21:13 -0400
46eaa5
Subject: [PATCH] Not having the virtio channel is not an error; instead
46eaa5
 silently do nothing
46eaa5
46eaa5
Fedora for example bundles the SPICE agent by default; however, we
46eaa5
don't want to spew an error when running non-virtualized, or with
46eaa5
plain VNC.
46eaa5
46eaa5
Let's just silently exit; while we could change LOG_ERR -> LOG_INFO
46eaa5
or something, that's still pointless noise in most people's syslog.
46eaa5
46eaa5
Someone who was debugging a misconfigured SPICE setup would pretty
46eaa5
quickly notice that they were missing the virtio port.
46eaa5
46eaa5
(This patch is part of a larger initiative to reduce error
46eaa5
 spew on default startup in common deployment scenarios such as
46eaa5
 KVM+VNC.)
46eaa5
46eaa5
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
46eaa5
---
46eaa5
 src/vdagent.c | 4 +---
46eaa5
 1 file changed, 1 insertion(+), 3 deletions(-)
46eaa5
46eaa5
diff --git a/src/vdagent.c b/src/vdagent.c
46eaa5
index 9e238d3..10ebf6e 100644
46eaa5
--- a/src/vdagent.c
46eaa5
+++ b/src/vdagent.c
46eaa5
@@ -226,9 +226,7 @@ int main(int argc, char *argv[])
46eaa5
             LOG_USER);
46eaa5
 
46eaa5
     if (file_test(portdev) != 0) {
46eaa5
-        syslog(LOG_ERR, "Missing virtio device '%s': %s",
46eaa5
-                portdev, strerror(errno));
46eaa5
-        return 1;
46eaa5
+        return 0;
46eaa5
     }
46eaa5
 
46eaa5
     if (do_daemonize)