From nobody Fri May 3 05:20:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536134980327582.2960039948624; Wed, 5 Sep 2018 01:09:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 175ED859FF; Wed, 5 Sep 2018 08:09:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF93416EF3; Wed, 5 Sep 2018 08:09:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5E97B4A460; Wed, 5 Sep 2018 08:09:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8589Xi5022566 for ; Wed, 5 Sep 2018 04:09:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 145DA215670B; Wed, 5 Sep 2018 08:09:33 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8AC092156701 for ; Wed, 5 Sep 2018 08:09:32 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 5 Sep 2018 10:09:24 +0200 Message-Id: <20180905080926.3034-2-abologna@redhat.com> In-Reply-To: <20180905080926.3034-1-abologna@redhat.com> References: <20180905080926.3034-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/3] conf: Move virDomainPCIAddressAsString() to util/virpci X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 05 Sep 2018 08:09:38 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It's a better fit than conf/domain_conf. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- 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 a= ddrs, } =20 =20 -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; =20 -char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) - ATTRIBUTE_NONNULL(1); - virDomainPCIAddressSetPtr virDomainPCIAddressSetAlloc(unsigned int nbuses); =20 void virDomainPCIAddressSetFree(virDomainPCIAddressSetPtr addrs); @@ -138,7 +135,6 @@ bool virDomainPCIAddressValidate(virDomainPCIAddressSet= Ptr addrs, bool fromConfig) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); =20 - 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; =20 =20 # 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; } =20 +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; =20 +char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) + ATTRIBUTE_NONNULL(1); + int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf); =20 int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path, --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 05:20:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536134998597385.30362103662765; Wed, 5 Sep 2018 01:09:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0AC723082E71; Wed, 5 Sep 2018 08:09:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD2D55DD65; Wed, 5 Sep 2018 08:09:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 85D5218005DF; Wed, 5 Sep 2018 08:09:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8589X3d022571 for ; Wed, 5 Sep 2018 04:09:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id B3C77215670B; Wed, 5 Sep 2018 08:09:33 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5331C2156701 for ; Wed, 5 Sep 2018 08:09:33 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 5 Sep 2018 10:09:25 +0200 Message-Id: <20180905080926.3034-3-abologna@redhat.com> In-Reply-To: <20180905080926.3034-1-abologna@redhat.com> References: <20180905080926.3034-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/3] conf: Rename virDomainPCIAddressAsString() X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 05 Sep 2018 08:09:57 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The struct is called virPCIDeviceAddress and the functions operating on it should be named accordingly. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- src/conf/domain_addr.c | 6 +++--- src/libvirt_private.syms | 2 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_domain_address.c | 6 +++--- src/util/virpci.c | 2 +- src/util/virpci.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index d2e1142462..442e6aab94 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -604,7 +604,7 @@ virDomainPCIAddressReserveAddrInternal(virDomainPCIAddr= essSetPtr addrs, virErrorNumber errType =3D (fromConfig ? VIR_ERR_XML_ERROR : VIR_ERR_INTERNAL_ERROR= ); =20 - if (!(addrStr =3D virDomainPCIAddressAsString(addr))) + if (!(addrStr =3D virPCIDeviceAddressAsString(addr))) goto cleanup; =20 /* Add an extra bus if necessary */ @@ -689,7 +689,7 @@ virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr= addrs, if (!flags) return 0; =20 - if (!(addrStr =3D virDomainPCIAddressAsString(&dev->addr.pci))) + if (!(addrStr =3D virPCIDeviceAddressAsString(&dev->addr.pci))) goto cleanup; =20 if (virDeviceInfoPCIAddressIsPresent(dev)) { @@ -770,7 +770,7 @@ virDomainPCIAddressFindUnusedFunctionOnBus(virDomainPCI= AddressBusPtr bus, =20 *found =3D false; =20 - if (!(addrStr =3D virDomainPCIAddressAsString(searchAddr))) + if (!(addrStr =3D virPCIDeviceAddressAsString(searchAddr))) goto cleanup; =20 if (!virDomainPCIAddressFlagsCompatible(searchAddr, addrStr, bus->flag= s, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 04242a22b1..0fc5314b02 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2496,7 +2496,7 @@ virObjectUnref; =20 =20 # util/virpci.h -virDomainPCIAddressAsString; +virPCIDeviceAddressAsString; virPCIDeviceAddressGetIOMMUGroupAddresses; virPCIDeviceAddressGetIOMMUGroupNum; virPCIDeviceAddressGetSysfsFile; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8aa20496bc..b72506f4e1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -301,7 +301,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf, if (info->type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { size_t i; =20 - if (!(devStr =3D virDomainPCIAddressAsString(&info->addr.pci))) + if (!(devStr =3D virPCIDeviceAddressAsString(&info->addr.pci))) goto cleanup; for (i =3D 0; i < domainDef->ncontrollers; i++) { virDomainControllerDefPtr cont =3D domainDef->controllers[i]; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index dda14adeb3..24fdf12128 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1306,7 +1306,7 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRI= BUTE_UNUSED, * inappropriate address types. */ if (!info->pciConnectFlags) { - char *addrStr =3D virDomainPCIAddressAsString(&info->addr.pci); + char *addrStr =3D virPCIDeviceAddressAsString(&info->addr.pci); =20 VIR_WARN("qemuDomainDeviceCalculatePCIConnectFlags() thinks that t= he " "device with PCI address %s should not have a PCI address= ", @@ -1554,7 +1554,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr= def, memset(&tmp_addr, 0, sizeof(tmp_addr)); tmp_addr.slot =3D 2; =20 - if (!(addrStr =3D virDomainPCIAddressAsString(&tmp_addr))) + if (!(addrStr =3D virPCIDeviceAddressAsString(&tmp_addr))) goto cleanup; if (!virDomainPCIAddressValidate(addrs, &tmp_addr, addrStr, flags, true)) @@ -1743,7 +1743,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr d= ef, memset(&tmp_addr, 0, sizeof(tmp_addr)); tmp_addr.slot =3D 1; =20 - if (!(addrStr =3D virDomainPCIAddressAsString(&tmp_addr))) + if (!(addrStr =3D virPCIDeviceAddressAsString(&tmp_addr))) goto cleanup; if (!virDomainPCIAddressValidate(addrs, &tmp_addr, addrStr, flags, true)) diff --git a/src/util/virpci.c b/src/util/virpci.c index 512e365cad..d82da710ee 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1685,7 +1685,7 @@ virPCIGetAddrString(unsigned int domain, } =20 char * -virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) +virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr) { char *str; =20 diff --git a/src/util/virpci.h b/src/util/virpci.h index 9ef1b838b7..271a753be2 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -225,7 +225,7 @@ int virPCIGetAddrString(unsigned int domain, char **pciConfigAddr) ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK; =20 -char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) +char *virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr) ATTRIBUTE_NONNULL(1); =20 int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf); --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 05:20:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536135004193113.32394679151867; Wed, 5 Sep 2018 01:10:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C3E2307D855; Wed, 5 Sep 2018 08:10:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 103CE5E7C6; Wed, 5 Sep 2018 08:10:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AF489181A12F; Wed, 5 Sep 2018 08:10:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8589Y21022586 for ; Wed, 5 Sep 2018 04:09:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 612B8215670B; Wed, 5 Sep 2018 08:09:34 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F22582156701 for ; Wed, 5 Sep 2018 08:09:33 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 5 Sep 2018 10:09:26 +0200 Message-Id: <20180905080926.3034-4-abologna@redhat.com> In-Reply-To: <20180905080926.3034-1-abologna@redhat.com> References: <20180905080926.3034-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/3] util: Drop virPCIGetAddrString() X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 05 Sep 2018 08:10:03 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There's a single user for it which takes an existing virPCIDeviceAddress, passes its various bits to the function which in turn constructs a virPCIDevice and then copies the string representation for the caller to use: we can use virPCIDeviceAddressAsString() instead and avoid creating the virPCIDevice in the first place. Since the function ends up having no users after the change, we can just drop it. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- src/util/virnetdev.c | 6 +----- src/util/virpci.c | 16 ---------------- src/util/virpci.h | 7 ------- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 8eac419725..9cc9d18155 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -1305,11 +1305,7 @@ virNetDevGetVirtualFunctions(const char *pfname, goto cleanup; =20 for (i =3D 0; i < *n_vfname; i++) { - if (virPCIGetAddrString((*virt_fns)[i]->domain, - (*virt_fns)[i]->bus, - (*virt_fns)[i]->slot, - (*virt_fns)[i]->function, - &pciConfigAddr) < 0) { + if (!(pciConfigAddr =3D virPCIDeviceAddressAsString((*virt_fns)[i]= ))) { virReportSystemError(ENOSYS, "%s", _("Failed to get PCI Config Address Strin= g")); goto cleanup; diff --git a/src/util/virpci.c b/src/util/virpci.c index d82da710ee..1730d888f7 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1668,22 +1668,6 @@ virPCIDeviceReadID(virPCIDevicePtr dev, const char *= id_name) return id_str; } =20 -int -virPCIGetAddrString(unsigned int domain, - unsigned int bus, - unsigned int slot, - unsigned int function, - char **pciConfigAddr) -{ - VIR_AUTOPTR(virPCIDevice) dev =3D NULL; - - dev =3D virPCIDeviceNew(domain, bus, slot, function); - if (!dev || VIR_STRDUP(*pciConfigAddr, dev->name) < 0) - return -1; - - return 0; -} - char * virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr) { diff --git a/src/util/virpci.h b/src/util/virpci.h index 271a753be2..b4f72f8f06 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -218,13 +218,6 @@ int virPCIGetSysfsFile(char *virPCIDeviceName, char **pci_sysfs_device_link) ATTRIBUTE_RETURN_CHECK; =20 -int virPCIGetAddrString(unsigned int domain, - unsigned int bus, - unsigned int slot, - unsigned int function, - char **pciConfigAddr) - ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK; - char *virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr) ATTRIBUTE_NONNULL(1); =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list