The path to the config file for a PCI device is conventiently stored in a virPCIDevice object, but that object's contents aren't directly visible outside of virpci.c, so we need to have an accessor function for it if anyone needs to look at it. --- New in "V2" src/libvirt_private.syms | 1 + src/util/virpci.c | 6 ++++++ src/util/virpci.h | 1 + 3 files changed, 8 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 1c0b912..77e4b63 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2135,6 +2135,7 @@ virPCIDeviceCopy; virPCIDeviceDetach; virPCIDeviceFileIterate; virPCIDeviceFree; +virPCIDeviceGetConfigPath; virPCIDeviceGetDriverPathAndName; virPCIDeviceGetIOMMUGroupDev; virPCIDeviceGetIOMMUGroupList; diff --git a/src/util/virpci.c b/src/util/virpci.c index 6c8174a..0c06249 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1848,6 +1848,12 @@ virPCIDeviceGetName(virPCIDevicePtr dev) return dev->name; } +const char * +virPCIDeviceGetConfigPath(virPCIDevicePtr dev) +{ + return dev->path; +} + void virPCIDeviceSetManaged(virPCIDevicePtr dev, bool managed) { dev->managed = managed; diff --git a/src/util/virpci.h b/src/util/virpci.h index 5c63eab..a5e8d00 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -97,6 +97,7 @@ virPCIDevicePtr virPCIDeviceNew(unsigned int domain, virPCIDevicePtr virPCIDeviceCopy(virPCIDevicePtr dev); void virPCIDeviceFree(virPCIDevicePtr dev); const char *virPCIDeviceGetName(virPCIDevicePtr dev); +const char *virPCIDeviceGetConfigPath(virPCIDevicePtr dev); int virPCIDeviceDetach(virPCIDevicePtr dev, virPCIDeviceListPtr activeDevs, -- 2.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list