]> xenbits.xensource.com Git - libvirt.git/commit
virQEMUBuildNetdevCommandlineFromJSON: Prepare for quirky 'guestfwd'
authorPeter Krempa <pkrempa@redhat.com>
Fri, 15 May 2020 08:59:40 +0000 (10:59 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 20 May 2020 07:41:57 +0000 (09:41 +0200)
commitda820e1c2225bc9944fb72c55e4895021d6881e9
tree7559657311489b9f3c588fc9fea522d17e84120f
parentb6738ffc9f8be5a2a61236cd9bef7fd317982f01
virQEMUBuildNetdevCommandlineFromJSON: Prepare for quirky 'guestfwd'

QEMU models guestfwd as:

 'guestfwd': [
                 { "str": "tcp:10.0.2.1:4600-chardev:charchannel0" },
                 { "str": "...."},
             ]

but the command line as:

guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,guestfwd=...

I guess the original idea was to make it extensible while not worrying
about adding another object for it. Either way it requires us to add yet
another JSON->cmdline convertor for arrays.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/util/virqemu.c