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