From nobody Tue Feb 10 11:12:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 148917840063095.05086405874601; Fri, 10 Mar 2017 12:40:00 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2AKZgAh003409; Fri, 10 Mar 2017 15:35:42 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2AKZLdO018971 for ; Fri, 10 Mar 2017 15:35:21 -0500 Received: from vhost2.laine.org (ovpn-116-174.phx2.redhat.com [10.3.116.174]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2AKZHie012172 for ; Fri, 10 Mar 2017 15:35:20 -0500 From: Laine Stump To: libvir-list@redhat.com Date: Fri, 10 Mar 2017 15:35:00 -0500 Message-Id: <20170310203512.15478-8-laine@laine.org> In-Reply-To: <20170310203512.15478-1-laine@laine.org> References: <20170310203512.15478-1-laine@laine.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/19] util: make virPCIGetDeviceAddressFromSysfsLink() public 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This function will be useful in virnetdev.c, so promote it from static. --- src/libvirt_private.syms | 1 + src/util/virpci.c | 10 +++++++++- src/util/virpci.h | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 6c89d44..b44a6ee 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2227,6 +2227,7 @@ virPCIDeviceSetUsedBy; virPCIDeviceUnbind; virPCIDeviceWaitForCleanup; virPCIEDeviceInfoFree; +virPCIGetDeviceAddressFromSysfsLink; virPCIGetHeaderType; virPCIGetNetName; virPCIGetPhysicalFunction; diff --git a/src/util/virpci.c b/src/util/virpci.c index 337afda..9878398 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -2594,7 +2594,7 @@ virPCIDeviceAddressIsEqual(virPCIDeviceAddressPtr bdf= 1, (bdf1->function =3D=3D bdf2->function)); } =20 -static virPCIDeviceAddressPtr +virPCIDeviceAddressPtr virPCIGetDeviceAddressFromSysfsLink(const char *device_link) { virPCIDeviceAddressPtr bdf =3D NULL; @@ -2923,6 +2923,14 @@ virPCIGetVirtualFunctionInfo(const char *vf_sysfs_de= vice_path, #else static const char *unsupported =3D N_("not supported on non-linux platform= s"); =20 +virPCIDeviceAddressPtr +virPCIGetDeviceAddressFromSysfsLink(const char *device_link ATTRIBUTE_UNUS= ED) +{ + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); + return -1; +} + + int virPCIGetPhysicalFunction(const char *vf_sysfs_path ATTRIBUTE_UNUSED, virPCIDeviceAddressPtr *pf ATTRIBUTE_UNUSED) diff --git a/src/util/virpci.h b/src/util/virpci.h index a5e8d00..4be9cc0 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -186,6 +186,9 @@ int virPCIDeviceIsAssignable(virPCIDevicePtr dev, int strict_acs_check); int virPCIDeviceWaitForCleanup(virPCIDevicePtr dev, const char *matcher); =20 +virPCIDeviceAddressPtr +virPCIGetDeviceAddressFromSysfsLink(const char *device_link); + int virPCIGetPhysicalFunction(const char *vf_sysfs_path, virPCIDeviceAddressPtr *pf); =20 --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list