mirror of https://gitee.com/openkylin/qemu.git
virtio: add Virtio*BusClass sizes
Both VirtioPCIBusClass and VirtioCcwBusClass are typedefs of VirtioBusClass, but set .class_size in the TypeInfo anyway to be safe if that changes in the future. Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Message-Id: <20200824122051.99432-1-cohuck@redhat.com>
This commit is contained in:
parent
0a48666a31
commit
74ded8b487
|
@ -1237,6 +1237,7 @@ static const TypeInfo virtio_ccw_bus_info = {
|
|||
.name = TYPE_VIRTIO_CCW_BUS,
|
||||
.parent = TYPE_VIRTIO_BUS,
|
||||
.instance_size = sizeof(VirtioCcwBusState),
|
||||
.class_size = sizeof(VirtioCcwBusClass),
|
||||
.class_init = virtio_ccw_bus_class_init,
|
||||
};
|
||||
|
||||
|
|
|
@ -2133,6 +2133,7 @@ static const TypeInfo virtio_pci_bus_info = {
|
|||
.name = TYPE_VIRTIO_PCI_BUS,
|
||||
.parent = TYPE_VIRTIO_BUS,
|
||||
.instance_size = sizeof(VirtioPCIBusState),
|
||||
.class_size = sizeof(VirtioPCIBusClass),
|
||||
.class_init = virtio_pci_bus_class_init,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue