[Top][All Lists]

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

[Qemu-devel] [PATCH v2 05/12] spice: merge options lists

From: Marc-André Lureau
Subject: [Qemu-devel] [PATCH v2 05/12] spice: merge options lists
Date: Thu, 20 Dec 2018 18:15:46 +0400

Passing several -spice options to qemu command line, or calling
several time qemu_opts_set() will ignore all but the first option
list. Since the spice server is a singleton, it makes sense to merge
all the options, the last value being the one taken into account.

This changes the behaviour from, for ex:
$ qemu... -spice port=5900 -spice port=5901 -> port: 5900
$ qemu... -spice port=5900 -spice port=5901 -> port: 5901

(if necessary we could instead produce an error when an option is
given twice, although this makes handling default values and such more

Signed-off-by: Marc-André Lureau <address@hidden>
 ui/spice-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 1f1501de78..6fefd95cea 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -398,6 +398,7 @@ static SpiceChannelList *qmp_query_spice_channels(void)
 static QemuOptsList qemu_spice_opts = {
     .name = "spice",
     .head = QTAILQ_HEAD_INITIALIZER(qemu_spice_opts.head),
+    .merge_lists = true,
     .desc = {
             .name = "port",

reply via email to

[Prev in Thread] Current Thread [Next in Thread]