[Spice-devel] [PATCH 1/4] vdagentd-proto: define default virtio-port path

Victor Toso victortoso at redhat.com
Fri May 12 11:19:37 UTC 2017


From: Victor Toso <me at victortoso.com>

---
 src/vdagent/vdagent.c   | 2 +-
 src/vdagentd-proto.h    | 2 ++
 src/vdagentd/vdagentd.c | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c
index 6f025e8..9900303 100644
--- a/src/vdagent/vdagent.c
+++ b/src/vdagent/vdagent.c
@@ -44,7 +44,7 @@
 #include "x11.h"
 #include "file-xfers.h"
 
-static const char *portdev = "/dev/virtio-ports/com.redhat.spice.0";
+static const char *portdev = DEFAULT_VIRTIO_PORT_PATH;
 static const char *vdagentd_socket = VDAGENTD_SOCKET;
 static int debug = 0;
 static const char *fx_dir = NULL;
diff --git a/src/vdagentd-proto.h b/src/vdagentd-proto.h
index 9815488..f72a890 100644
--- a/src/vdagentd-proto.h
+++ b/src/vdagentd-proto.h
@@ -25,6 +25,8 @@
 
 #define VDAGENTD_SOCKET "/var/run/spice-vdagentd/spice-vdagent-sock"
 
+#define DEFAULT_VIRTIO_PORT_PATH "/dev/virtio-ports/com.redhat.spice.0"
+
 enum {
     VDAGENTD_GUEST_XORG_RESOLUTION, /* client -> daemon, arg1: overall width,
                                        arg2: overall height, data: array of
diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c
index f3ac606..800a09c 100644
--- a/src/vdagentd/vdagentd.c
+++ b/src/vdagentd/vdagentd.c
@@ -54,7 +54,7 @@ struct agent_data {
 
 /* variables */
 static const char *pidfilename = "/var/run/spice-vdagentd/spice-vdagentd.pid";
-static const char *portdev = "/dev/virtio-ports/com.redhat.spice.0";
+static const char *portdev = DEFAULT_VIRTIO_PORT_PATH;
 static const char *vdagentd_socket = VDAGENTD_SOCKET;
 static const char *uinput_device = "/dev/uinput";
 static int debug = 0;
-- 
2.12.2



More information about the Spice-devel mailing list