[PATCH phodav 06/13] spice: print err when g_open fails

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

 



Don't fail silently when we cannot open the webdav virtio port.

Signed-off-by: Jakub Janků <jjanku@xxxxxxxxxx>
---
 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
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]