summaryrefslogtreecommitdiffstats
path: root/hw/spapr_vty.c
diff options
context:
space:
mode:
authorAnthony Liguori2011-12-23 22:34:39 +0100
committerAndreas Färber2012-06-18 15:14:38 +0200
commit0866aca1de15a12547f52ff8563cf7c163e1898e (patch)
tree511c043eb3de19d479f708209e588d828b751903 /hw/spapr_vty.c
parentqdev: Connect busses with their parent devices (diff)
downloadqemu-0866aca1de15a12547f52ff8563cf7c163e1898e.tar.gz
qemu-0866aca1de15a12547f52ff8563cf7c163e1898e.tar.xz
qemu-0866aca1de15a12547f52ff8563cf7c163e1898e.zip
qbus: Make child devices links
Make qbus children show up as link<> properties. There is no stable addressing for qbus children so we use an unstable naming convention. This is okay in QOM though because the composition name is expected to be what's stable. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/spapr_vty.c')
-rw-r--r--hw/spapr_vty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/spapr_vty.c b/hw/spapr_vty.c
index c9674f36a6..f340b83237 100644
--- a/hw/spapr_vty.c
+++ b/hw/spapr_vty.c
@@ -160,7 +160,7 @@ static TypeInfo spapr_vty_info = {
VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus)
{
VIOsPAPRDevice *sdev, *selected;
- DeviceState *iter;
+ BusChild *kid;
/*
* To avoid the console bouncing around we want one VTY to be
@@ -169,7 +169,9 @@ VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus)
*/
selected = NULL;
- QTAILQ_FOREACH(iter, &bus->bus.children, sibling) {
+ QTAILQ_FOREACH(kid, &bus->bus.children, sibling) {
+ DeviceState *iter = kid->child;
+
/* Only look at VTY devices */
if (!object_dynamic_cast(OBJECT(iter), "spapr-vty")) {
continue;