It's a better fit than conf/domain_conf. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- src/conf/domain_addr.c | 14 -------------- src/conf/domain_addr.h | 4 ---- src/libvirt_private.syms | 2 +- src/util/virpci.c | 13 +++++++++++++ src/util/virpci.h | 3 +++ 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index b62fd53c66..d2e1142462 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -573,20 +573,6 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr addrs, } -char * -virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) -{ - char *str; - - ignore_value(virAsprintf(&str, "%.4x:%.2x:%.2x.%.1x", - addr->domain, - addr->bus, - addr->slot, - addr->function)); - return str; -} - - /* * Check if the PCI slot is used by another device. */ diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 5ad9d8ef3d..f8ab742715 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -124,9 +124,6 @@ struct _virDomainPCIAddressSet { typedef struct _virDomainPCIAddressSet virDomainPCIAddressSet; typedef virDomainPCIAddressSet *virDomainPCIAddressSetPtr; -char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) - ATTRIBUTE_NONNULL(1); - virDomainPCIAddressSetPtr virDomainPCIAddressSetAlloc(unsigned int nbuses); void virDomainPCIAddressSetFree(virDomainPCIAddressSetPtr addrs); @@ -138,7 +135,6 @@ bool virDomainPCIAddressValidate(virDomainPCIAddressSetPtr addrs, bool fromConfig) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); - int virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus, virDomainControllerModelPCI model) ATTRIBUTE_NONNULL(1); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index e2340d23a6..04242a22b1 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -119,7 +119,6 @@ virPCIDeviceAddressParseXML; virDomainCCWAddressAssign; virDomainCCWAddressSetCreateFromDomain; virDomainCCWAddressSetFree; -virDomainPCIAddressAsString; virDomainPCIAddressBusIsFullyReserved; virDomainPCIAddressBusSetModel; virDomainPCIAddressEnsureAddr; @@ -2497,6 +2496,7 @@ virObjectUnref; # util/virpci.h +virDomainPCIAddressAsString; virPCIDeviceAddressGetIOMMUGroupAddresses; virPCIDeviceAddressGetIOMMUGroupNum; virPCIDeviceAddressGetSysfsFile; diff --git a/src/util/virpci.c b/src/util/virpci.c index 6cf2acf2d1..512e365cad 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1684,6 +1684,19 @@ virPCIGetAddrString(unsigned int domain, return 0; } +char * +virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) +{ + char *str; + + ignore_value(virAsprintf(&str, "%.4x:%.2x:%.2x.%.1x", + addr->domain, + addr->bus, + addr->slot, + addr->function)); + return str; +} + virPCIDevicePtr virPCIDeviceNew(unsigned int domain, unsigned int bus, diff --git a/src/util/virpci.h b/src/util/virpci.h index 2ac87694df..9ef1b838b7 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -225,6 +225,9 @@ int virPCIGetAddrString(unsigned int domain, char **pciConfigAddr) ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK; +char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) + ATTRIBUTE_NONNULL(1); + int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf); int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path, -- 2.17.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list