Eric Blake <[email protected]> writes: [...] >> +++ b/qapi/sockets.json >> @@ -152,3 +152,16 @@ >> 'unix': 'UnixSocketAddress', >> 'vsock': 'VsockSocketAddress', >> 'fd': 'String' } } >> + >> +## >> +# @DummyStruct: >> +# >> +# Both block-core and migration needs SocketAddressList >> +# I am open to comments about how to share it >> +# >> +# @dummy-list: A dummy list >> +# >> +# Since: 3.1 >> +## >> +{ 'struct': 'DummyStruct', >> + 'data': { 'dummy-list': ['SocketAddress'] } } > > We've had a couple of threads about this in the last couple of months; > maybe it's time for a qapi generator patch where we add an optional > 'gen-list':true marker to any struct that needs to have a list > generated for C code even when no QMP command uses the list form.
Maybe. As long as we need just a few such lists, stuffing them all into DummyForceArrays should do fine. There's no need for a fresh dummy type for each list. Beyond a certain point, the DummyForceArrays hack may become bothersome enough to justify development and maintenance of a proper QAPI feature. You mentioned "a couple of threads". Have they resulted in fresh dummy types? Or, to ask the same question differently, for which types do we force generation of list types?
