qapi: Convert simple union SocketAddressLegacy to flat one
commit935a867c878d1450bf240caa18489649fcdff771
authorMarkus Armbruster <armbru@redhat.com>
Fri, 17 Sep 2021 14:31:19 +0000 (17 16:31 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 27 Sep 2021 06:23:25 +0000 (27 08:23 +0200)
treee2ed4270ca8f9ff116e51f29d0ef7352980441d8
parent3218c0e91c7a3b07377556eb0f2de35f150dd568
qapi: Convert simple union SocketAddressLegacy to flat one

Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

To prepare for their removal, convert simple union SocketAddressLegacy
to an equivalent flat one, with existing enum SocketAddressType
replacing implicit enum type SocketAddressLegacyKind.  Adds some
boilerplate to the schema, which is a bit ugly, but a lot easier to
maintain than the simple union feature.

Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-9-armbru@redhat.com>
chardev/char-socket.c
chardev/char-udp.c
qapi/sockets.json
tests/unit/test-yank.c
util/qemu-sockets.c