I've cherry-picked the qapi related parts from my previous -audiodev patch series, we can hopefully concentrate on one thing at a time. The most important changes in this patch series are the flattening of the Netdev structures. This way we can add proper nested structure support into OptsVisitor, without requiring backward-compatibility hacks.
These patches are essentially same as the patches in v3 -audiodev option, except that I updated it to master (and fixed the conflicts due to error handling related changes). Please review. Kővágó, Zoltán (5): qapi: support implicit structs in OptsVisitor qapi: convert NumaOptions into a flat union qapi: change Netdev and NetLegacy into a flat union qapi: support nested structs in OptsVisitor opts: produce valid command line in qemu_opts_print block.c | 2 +- hw/arm/musicpal.c | 2 +- hw/core/qdev-properties-system.c | 2 +- hw/net/allwinner_emac.c | 2 +- hw/net/cadence_gem.c | 2 +- hw/net/dp8393x.c | 2 +- hw/net/e1000.c | 2 +- hw/net/eepro100.c | 2 +- hw/net/etraxfs_eth.c | 2 +- hw/net/fsl_etsec/etsec.c | 2 +- hw/net/lan9118.c | 2 +- hw/net/lance.c | 2 +- hw/net/mcf_fec.c | 2 +- hw/net/milkymist-minimac2.c | 2 +- hw/net/mipsnet.c | 2 +- hw/net/ne2000-isa.c | 2 +- hw/net/ne2000.c | 2 +- hw/net/opencores_eth.c | 2 +- hw/net/pcnet-pci.c | 2 +- hw/net/rocker/rocker_fp.c | 2 +- hw/net/rtl8139.c | 2 +- hw/net/smc91c111.c | 2 +- hw/net/spapr_llan.c | 2 +- hw/net/stellaris_enet.c | 2 +- hw/net/vhost_net.c | 18 ++-- hw/net/virtio-net.c | 6 +- hw/net/vmxnet3.c | 2 +- hw/net/xen_nic.c | 2 +- hw/net/xgmac.c | 2 +- hw/net/xilinx_axienet.c | 2 +- hw/net/xilinx_ethlite.c | 2 +- hw/usb/dev-network.c | 2 +- include/net/net.h | 4 +- monitor.c | 14 +-- net/clients.h | 20 ++--- net/dump.c | 9 +- net/hub.c | 24 +++-- net/l2tpv3.c | 9 +- net/net.c | 110 +++++++++++------------ net/netmap.c | 6 +- net/slirp.c | 9 +- net/socket.c | 11 +-- net/tap-win32.c | 9 +- net/tap.c | 29 +++--- net/vde.c | 9 +- net/vhost-user.c | 15 ++-- numa.c | 2 +- qapi-schema.json | 150 +++++++++++++++++++++++--------- qapi/opts-visitor.c | 129 ++++++++++++++++++++++----- tests/qapi-schema/qapi-schema-test.json | 9 +- tests/test-opts-visitor.c | 34 ++++++++ util/qemu-option.c | 47 +++++++++- 52 files changed, 471 insertions(+), 262 deletions(-) -- 2.4.3