From: Marc-André Lureau Date: Thu, 21 Feb 2019 11:06:56 +0000 (+0100) Subject: spice: merge options lists X-Git-Tag: v4.0.0-rc0~83^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79216718f921505347bbfc61a4161adef6185cf2;p=thirdparty%2Fqemu.git spice: merge options lists 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 --- diff --git a/ui/spice-core.c b/ui/spice-core.c index 784fddff7d4..1cc99602771 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",