diff options
author | Stefan Hajnoczi | 2014-06-18 11:58:33 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2014-07-01 09:15:02 +0200 |
commit | caffdac363801cd2cf2bf01ad013a8c1e1e43800 (patch) | |
tree | a3d5038dd85dd265ea553454804b115b176362b2 /hw/s390x/virtio-ccw.h | |
parent | qdev: add qdev_alias_all_properties() (diff) | |
download | qemu-caffdac363801cd2cf2bf01ad013a8c1e1e43800.tar.gz qemu-caffdac363801cd2cf2bf01ad013a8c1e1e43800.tar.xz qemu-caffdac363801cd2cf2bf01ad013a8c1e1e43800.zip |
virtio-blk: use aliases instead of duplicate qdev properties
virtio-blk-pci, virtio-blk-s390, and virtio-blk-ccw all duplicate the
qdev properties of their VirtIOBlock child. This approach does not work
well with string or pointer properties since we must be careful about
leaking or double-freeing them.
Use the QOM alias property to forward property accesses to the
VirtIOBlock child. This way no duplication is necessary.
Remember to stop calling virtio_blk_set_conf() so that we don't clobber
the values already set on the VirtIOBlock instance.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.h')
-rw-r--r-- | hw/s390x/virtio-ccw.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index b8b8a8abaa..5a1f16ee5d 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -144,7 +144,6 @@ typedef struct VHostSCSICcw { typedef struct VirtIOBlkCcw { VirtioCcwDevice parent_obj; VirtIOBlock vdev; - VirtIOBlkConf blk; } VirtIOBlkCcw; /* virtio-balloon-ccw */ |