summary refs log tree commit diff stats
path: root/hw/qdev.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2010-06-25 11:08:52 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2010-07-06 10:36:28 -0500
commit6772b9364a9ef8b44a7c4deef0544df95bf88741 (patch)
treef933bd41b55cbdfdf9260774102f8c71b550ebf7 /hw/qdev.h
parent44ae28f3152138e71ccad66c201d730b93374bc2 (diff)
downloadfocaccia-qemu-6772b9364a9ef8b44a7c4deef0544df95bf88741.tar.gz
focaccia-qemu-6772b9364a9ef8b44a7c4deef0544df95bf88741.zip
qdev: Add a get_dev_path() function to BusInfo
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>
Diffstat (limited to 'hw/qdev.h')
-rw-r--r--hw/qdev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/qdev.h b/hw/qdev.h
index cbc89f2c1e..3e22eecc06 100644
--- 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;
 };