]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-serial: use aliases instead of duplicate qdev properties
authorGonglei <arei.gonglei@huawei.com>
Tue, 30 Sep 2014 06:10:31 +0000 (14:10 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 6 Jan 2015 22:02:28 +0000 (16:02 -0600)
commitaa383e9a8307325a8dc8569f13cf11d083c8b008
treeecbcaf47c7a43ff95ec59a55e6e897e116333f96
parentf06c87b11937ec797b59485d16c937538a82d7a8
virtio-serial: use aliases instead of duplicate qdev properties

virtio-serial-{pci, s390, ccw} all duplicate the
qdev properties of their VirtIOSerial 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
VirtIOSerial 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>
(cherry picked from commit 4f456d8025c7259c66b2b2bcec99d5c6c94d99be)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/s390x/s390-virtio-bus.c
hw/s390x/virtio-ccw.c
hw/virtio/virtio-pci.c