[PATCH 07/19] util: make virPCIGetDeviceAddressFromSysfsLink() public

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 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)
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);
 
+virPCIDeviceAddressPtr
+virPCIGetDeviceAddressFromSysfsLink(const char *device_link);
+
 int virPCIGetPhysicalFunction(const char *vf_sysfs_path,
                               virPCIDeviceAddressPtr *pf);
 
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux