]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: make virPCIGetDeviceAddressFromSysfsLink() public
authorLaine Stump <laine@laine.org>
Tue, 7 Mar 2017 19:23:01 +0000 (14:23 -0500)
committerLaine Stump <laine@laine.org>
Fri, 24 Mar 2017 04:37:36 +0000 (00:37 -0400)
This function will be useful in virnetdev.c, so promote it from static.

src/libvirt_private.syms
src/util/virpci.c
src/util/virpci.h

index a1c7624246ff03bcfc96c7b2aad4b39ff7f90ad2..d0f4e98dd7f410af6b5fac03063f03b9d2f8b532 100644 (file)
@@ -2243,6 +2243,7 @@ virPCIDeviceSetUsedBy;
 virPCIDeviceUnbind;
 virPCIDeviceWaitForCleanup;
 virPCIEDeviceInfoFree;
+virPCIGetDeviceAddressFromSysfsLink;
 virPCIGetHeaderType;
 virPCIGetNetName;
 virPCIGetPhysicalFunction;
index 337afdab51c3e328b966e1cd945209f0a546fcf6..9878398100fcb61b013da307e474003e5b3ffc0f 100644 (file)
@@ -2594,7 +2594,7 @@ virPCIDeviceAddressIsEqual(virPCIDeviceAddressPtr bdf1,
             (bdf1->function == bdf2->function));
 }
 
-static virPCIDeviceAddressPtr
+virPCIDeviceAddressPtr
 virPCIGetDeviceAddressFromSysfsLink(const char *device_link)
 {
     virPCIDeviceAddressPtr bdf = NULL;
@@ -2923,6 +2923,14 @@ virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
 #else
 static const char *unsupported = N_("not supported on non-linux platforms");
 
+virPCIDeviceAddressPtr
+virPCIGetDeviceAddressFromSysfsLink(const char *device_link ATTRIBUTE_UNUSED)
+{
+    virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
+    return -1;
+}
+
+
 int
 virPCIGetPhysicalFunction(const char *vf_sysfs_path ATTRIBUTE_UNUSED,
                           virPCIDeviceAddressPtr *pf ATTRIBUTE_UNUSED)
index a5e8d005a908612db757a32c0eca156503ca58d9..4be9cc0fb125a2f870e53e307fcda4108f77c949 100644 (file)
@@ -186,6 +186,9 @@ int virPCIDeviceIsAssignable(virPCIDevicePtr dev,
                              int strict_acs_check);
 int virPCIDeviceWaitForCleanup(virPCIDevicePtr dev, const char *matcher);
 
+virPCIDeviceAddressPtr
+virPCIGetDeviceAddressFromSysfsLink(const char *device_link);
+
 int virPCIGetPhysicalFunction(const char *vf_sysfs_path,
                               virPCIDeviceAddressPtr *pf);