aboutsummaryrefslogtreecommitdiff
path: root/ui/spice-core.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2015-01-13 17:57:51 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-01-22 11:18:41 +0100
commitfe4831b1e7e7007ae15ae0470a06898660ab3877 (patch)
tree20a5b812a5d393fdb8d4c1b3c561fbaab7addfb2 /ui/spice-core.c
parent699eae17b841e6784dc3864bf357e26bff1e9dfe (diff)
spice: add unix address support
Teach qemu to set up a Spice server with a UNIX socket using the following arguments -spice unix,addr=path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-core.c')
-rw-r--r--ui/spice-core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index fe705c1ae2..c8f7f183c6 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -436,6 +436,11 @@ static QemuOptsList qemu_spice_opts = {
},{
.name = "ipv6",
.type = QEMU_OPT_BOOL,
+#ifdef SPICE_ADDR_FLAG_UNIX_ONLY
+ },{
+ .name = "unix",
+ .type = QEMU_OPT_BOOL,
+#endif
},{
.name = "password",
.type = QEMU_OPT_STRING,
@@ -708,6 +713,10 @@ void qemu_spice_init(void)
addr_flags |= SPICE_ADDR_FLAG_IPV4_ONLY;
} else if (qemu_opt_get_bool(opts, "ipv6", 0)) {
addr_flags |= SPICE_ADDR_FLAG_IPV6_ONLY;
+#ifdef SPICE_ADDR_FLAG_UNIX_ONLY
+ } else if (qemu_opt_get_bool(opts, "unix", 0)) {
+ addr_flags |= SPICE_ADDR_FLAG_UNIX_ONLY;
+#endif
}
spice_server = spice_server_new();