OSDN Git Service

spice: merge options lists
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 21 Feb 2019 11:06:56 +0000 (12:06 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 21 Feb 2019 13:09:17 +0000 (14:09 +0100)
commit79216718f921505347bbfc61a4161adef6185cf2
treef786f4c04d0f47b5c2d271646c88a8c7372b7a28
parent83f7180227a4c383e00fcbc0c079805557a657c8
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 <marcandre.lureau@redhat.com>
Tested-by: Victor Toso <victortoso@redhat.com>
Message-id: 20190221110703.5775-5-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/spice-core.c