[vdagent-linux v2 1/2] vdagent: Silently ignore missing spicevmc device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On most distros, spice-vdagent will be autostarted as part of the
startup of the desktop environment session. This is done by
spice-vdagent.desktop, which has no way of checking if we are in a virt
environment with the needed devices present.

Currently, if /dev/virtio-ports/com.redhat.spice.0 is missing, we log an
error in syslog, and exit with an error exit code. This is too noisy
when autostarting it on a bare metal machine which have no use for
spice-vdagent. This reverts 0159111b to get rid of these warnings in the
session's logs

https://gitlab.freedesktop.org/spice/linux/vd_agent/issues/12

Signed-off-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>
---
Changes since v1:
- switched to g_debug as g_print would show in journalctl
- reworded the message

 src/vdagent/vdagent.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c
index 90247f9..ff3328c 100644
--- a/src/vdagent/vdagent.c
+++ b/src/vdagent/vdagent.c
@@ -451,8 +451,8 @@ int main(int argc, char *argv[])
             LOG_USER);
 
     if (file_test(portdev) != 0) {
-        syslog(LOG_ERR, "Cannot access vdagent virtio channel %s", portdev);
-        return 1;
+        g_debug("vdagent virtio channel %s does not exist, exiting", portdev);
+        return 0;
     }
 
     if (do_daemonize)
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]