05f43a9608
Fixes events whose data is struct with base to include the struct's base members. Test case is qapi-schema-test.json's event __org.qemu_x-command: { 'event': '__ORG.QEMU_X-EVENT', 'data': '__org.qemu_x-Struct' } { 'struct': '__org.qemu_x-Struct', 'base': '__org.qemu_x-Base', 'data': { '__org.qemu_x-member2': 'str' } } { 'struct': '__org.qemu_x-Base', 'data': { '__org.qemu_x-member1': '__org.qemu_x-Enum' } } Patch's effect on generated qapi_event_send___org_qemu_x_event(): -void qapi_event_send___org_qemu_x_event(const char *__org_qemu_x_member2, +void qapi_event_send___org_qemu_x_event(__org_qemu_x_Enum __org_qemu_x_member1, + const char *__org_qemu_x_member2, Error **errp) { QDict *qmp; @@ -224,6 +225,10 @@ void qapi_event_send___org_qemu_x_event( goto clean; } + visit_type___org_qemu_x_Enum(v, &__org_qemu_x_member1, "__org.qemu_x-member1", &local_err); + if (local_err) { + goto clean; + } visit_type_str(v, (char **)&__org_qemu_x_member2, "__org.qemu_x-member2", &local_err); if (local_err) { goto clean; Code is generated in a different order now, but that doesn't matter. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> |
||
---|---|---|
.. | ||
acpi-test-data | ||
image-fuzzer | ||
libqos | ||
multiboot | ||
qapi-schema | ||
qemu-iotests | ||
rocker | ||
tcg | ||
vmstate-static-checker-data | ||
.gitignore | ||
ac97-test.c | ||
ahci-test.c | ||
bios-tables-test.c | ||
boot-order-test.c | ||
check-block.sh | ||
check-qdict.c | ||
check-qfloat.c | ||
check-qint.c | ||
check-qjson.c | ||
check-qlist.c | ||
check-qom-interface.c | ||
check-qom-proplist.c | ||
check-qstring.c | ||
crypto-tls-x509-helpers.c | ||
crypto-tls-x509-helpers.h | ||
display-vga-test.c | ||
drive_del-test.c | ||
ds1338-test.c | ||
e1000-test.c | ||
eepro100-test.c | ||
endianness-test.c | ||
es1370-test.c | ||
fdc-test.c | ||
fw_cfg-test.c | ||
hd-geo-test.c | ||
i440fx-test.c | ||
i82801b11-test.c | ||
ide-test.c | ||
intel-hda-test.c | ||
ioh3420-test.c | ||
ipoctal232-test.c | ||
libqtest.c | ||
libqtest.h | ||
m48t59-test.c | ||
Makefile | ||
ne2000-test.c | ||
nvme-test.c | ||
pc-cpu-test.c | ||
pcnet-test.c | ||
pkix_asn1_tab.c | ||
pvpanic-test.c | ||
q35-test.c | ||
qemu-iotests-quick.sh | ||
qom-test.c | ||
rcutorture.c | ||
rtc-test.c | ||
rtl8139-test.c | ||
spapr-phb-test.c | ||
tco-test.c | ||
test-aio.c | ||
test-bitops.c | ||
test-coroutine.c | ||
test-crypto-cipher.c | ||
test-crypto-hash.c | ||
test-crypto-tlscredsx509.c | ||
test-crypto-tlssession.c | ||
test-cutils.c | ||
test-hbitmap.c | ||
test-int128.c | ||
test-iov.c | ||
test-mul64.c | ||
test-opts-visitor.c | ||
test-qdev-global-props.c | ||
test-qemu-opts.c | ||
test-qmp-commands.c | ||
test-qmp-event.c | ||
test-qmp-input-strict.c | ||
test-qmp-input-visitor.c | ||
test-qmp-output-visitor.c | ||
test-rcu-list.c | ||
test-rfifolock.c | ||
test-string-input-visitor.c | ||
test-string-output-visitor.c | ||
test-thread-pool.c | ||
test-throttle.c | ||
test-visitor-serialization.c | ||
test-vmstate.c | ||
test-write-threshold.c | ||
test-x86-cpuid.c | ||
test-xbzrle.c | ||
tmp105-test.c | ||
tpci200-test.c | ||
usb-hcd-ehci-test.c | ||
usb-hcd-ohci-test.c | ||
usb-hcd-uhci-test.c | ||
usb-hcd-xhci-test.c | ||
vhost-user-test.c | ||
virtio-9p-test.c | ||
virtio-balloon-test.c | ||
virtio-blk-test.c | ||
virtio-console-test.c | ||
virtio-net-test.c | ||
virtio-rng-test.c | ||
virtio-scsi-test.c | ||
virtio-serial-test.c | ||
vmxnet3-test.c | ||
wdt_ib700-test.c |