Don't fail silently when we cannot open the webdav virtio port.
Signed-off-by: Jakub Janků <[email protected]>
---
spice/spice-webdavd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c
index 3fac28b..d9b1fae 100644
--- a/spice/spice-webdavd.c
+++ b/spice/spice-webdavd.c
@@ -24,6 +24,7 @@
#include <gio/gunixoutputstream.h>
#include <fcntl.h>
#include <glib/gstdio.h>
+#include <errno.h>
#endif
#ifdef G_OS_WIN32
@@ -703,8 +704,12 @@ open_mux_path (const char *path)
g_debug ("Open %s", path);
#ifdef G_OS_UNIX
port_fd = g_open (path, O_RDWR);
+ gint errsv = errno;
if (port_fd == -1)
+ {
+ g_printerr("Failed to open %s: %s\n", path, g_strerror(errsv));
exit (1);
+ }
wait_for_virtio_host (port_fd);
--
2.21.0
_______________________________________________
Spice-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/spice-devel