]> git.proxmox.com Git - qemu.git/commitdiff
qdev: Add a get_dev_path() function to BusInfo
authorAlex Williamson <alex.williamson@redhat.com>
Fri, 25 Jun 2010 17:08:52 +0000 (11:08 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 6 Jul 2010 15:36:28 +0000 (10:36 -0500)
This function is meant to provide a stable device path for buses
which are able to implement it.  If a bus has a globally unique
addresses scheme, one address level may be sufficient to provide
a path.  Other buses may need to recursively traverse up the
qdev tree.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.h

index cbc89f2c1eb1a0933dff83c923820108c9792902..3e22eecc062899031d4fc71b823401bfe2ab9484 100644 (file)
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -49,10 +49,13 @@ struct DeviceState {
 };
 
 typedef void (*bus_dev_printfn)(Monitor *mon, DeviceState *dev, int indent);
+typedef char *(*bus_get_dev_path)(DeviceState *dev);
+
 struct BusInfo {
     const char *name;
     size_t size;
     bus_dev_printfn print_dev;
+    bus_get_dev_path get_dev_path;
     Property *props;
 };