]> Git Repo - qemu.git/commitdiff
virtio: add virtio_bus_get_dev_path.
authorKONRAD Frederic <[email protected]>
Thu, 16 May 2013 17:06:07 +0000 (19:06 +0200)
committerAnthony Liguori <[email protected]>
Thu, 16 May 2013 19:18:38 +0000 (14:18 -0500)
This adds virtio_bus_get_dev_path to fix migration id string which is wrong
since the virtio refactoring.

Signed-off-by: KONRAD Frederic <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-id: 1368723967[email protected]
Cc: mdroth <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/virtio/virtio-bus.c

index aab72ffb42ebfc1377caaa826435c884c5eb05ae..ea2e11ae95ba621b3b07cf5b56c1f0bd15766c8e 100644 (file)
@@ -154,12 +154,26 @@ void virtio_bus_set_vdev_config(VirtioBusState *bus, uint8_t *config)
     }
 }
 
+static char *virtio_bus_get_dev_path(DeviceState *dev)
+{
+    BusState *bus = qdev_get_parent_bus(dev);
+    DeviceState *proxy = DEVICE(bus->parent);
+    return qdev_get_dev_path(proxy);
+}
+
+static void virtio_bus_class_init(ObjectClass *klass, void *data)
+{
+    BusClass *bus_class = BUS_CLASS(klass);
+    bus_class->get_dev_path = virtio_bus_get_dev_path;
+}
+
 static const TypeInfo virtio_bus_info = {
     .name = TYPE_VIRTIO_BUS,
     .parent = TYPE_BUS,
     .instance_size = sizeof(VirtioBusState),
     .abstract = true,
     .class_size = sizeof(VirtioBusClass),
+    .class_init = virtio_bus_class_init
 };
 
 static void virtio_register_types(void)
This page took 0.023029 seconds and 4 git commands to generate.