From 79216718f921505347bbfc61a4161adef6185cf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 21 Feb 2019 12:06:56 +0100 Subject: [PATCH] spice: merge options lists MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 to: $ 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 complicated) Signed-off-by: Marc-André Lureau Tested-by: Victor Toso Message-id: 20190221110703.5775-5-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/spice-core.c b/ui/spice-core.c index 784fddff7d..1cc9960277 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", -- 2.11.4.GIT