From b793438999e9ec3b28111575e93ca1303837c7c8 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 6 Jul 2010 22:27:57 -0300 Subject: [PATCH 04/24] qdev: Add a get_dev_path() function to BusInfo RH-Author: Alex Williamson Message-id: <20100706222757.1033.92738.stgit@localhost.localdomain> Patchwork-id: 10507 O-Subject: [RHEL6.0 qemu-kvm PATCH 04/17] qdev: Add a get_dev_path() function to BusInfo Bugzilla: 596328 RH-Acked-by: Juan Quintela RH-Acked-by: Amit Shah RH-Acked-by: Zachary Amsden RH-Acked-by: Jes Sorensen Bugzilla: 596328 Upstream commit: 6772b9364a9ef8b44a7c4deef0544df95bf88741 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 Signed-off-by: Anthony Liguori --- hw/qdev.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost --- hw/qdev.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/qdev.h b/hw/qdev.h index d8fbc73..f9791f1 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -47,10 +47,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; }; -- 1.7.0.3