]> git.proxmox.com Git - mirror_qemu.git/commit
virtio-net: use aliases instead of duplicate qdev properties
authorGonglei <arei.gonglei@huawei.com>
Tue, 30 Sep 2014 06:10:27 +0000 (14:10 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Sep 2014 09:08:16 +0000 (11:08 +0200)
commit7779edfeb1822ff5f554a4c1f3e9798789a9352c
treedb1f666058bca4fda94cd65938ca2d57dc218d99
parent20e6dca1df6b6ea74c3d6af74dc2184f464b3035
virtio-net: use aliases instead of duplicate qdev properties

virtio-net-pci, virtio-net-s390, and virtio-net-ccw all duplicate the
qdev properties of their VirtIONet 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
VirtIONet child.  This way no duplication is necessary.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/s390x/s390-virtio-bus.c
hw/s390x/virtio-ccw.c
hw/virtio/virtio-pci.c