util: make virPCIGetDeviceAddressFromSysfsLink() public

This function will be useful in virnetdev.c, so promote it from static.
This commit is contained in:
Laine Stump 2017-03-07 14:23:01 -05:00
parent d6ee56d723
commit 9a238c16b3
3 changed files with 13 additions and 1 deletions

View File

@ -2243,6 +2243,7 @@ virPCIDeviceSetUsedBy;
virPCIDeviceUnbind; virPCIDeviceUnbind;
virPCIDeviceWaitForCleanup; virPCIDeviceWaitForCleanup;
virPCIEDeviceInfoFree; virPCIEDeviceInfoFree;
virPCIGetDeviceAddressFromSysfsLink;
virPCIGetHeaderType; virPCIGetHeaderType;
virPCIGetNetName; virPCIGetNetName;
virPCIGetPhysicalFunction; virPCIGetPhysicalFunction;

View File

@ -2594,7 +2594,7 @@ virPCIDeviceAddressIsEqual(virPCIDeviceAddressPtr bdf1,
(bdf1->function == bdf2->function)); (bdf1->function == bdf2->function));
} }
static virPCIDeviceAddressPtr virPCIDeviceAddressPtr
virPCIGetDeviceAddressFromSysfsLink(const char *device_link) virPCIGetDeviceAddressFromSysfsLink(const char *device_link)
{ {
virPCIDeviceAddressPtr bdf = NULL; virPCIDeviceAddressPtr bdf = NULL;
@ -2923,6 +2923,14 @@ virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
#else #else
static const char *unsupported = N_("not supported on non-linux platforms"); 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 int
virPCIGetPhysicalFunction(const char *vf_sysfs_path ATTRIBUTE_UNUSED, virPCIGetPhysicalFunction(const char *vf_sysfs_path ATTRIBUTE_UNUSED,
virPCIDeviceAddressPtr *pf ATTRIBUTE_UNUSED) virPCIDeviceAddressPtr *pf ATTRIBUTE_UNUSED)

View File

@ -186,6 +186,9 @@ int virPCIDeviceIsAssignable(virPCIDevicePtr dev,
int strict_acs_check); int strict_acs_check);
int virPCIDeviceWaitForCleanup(virPCIDevicePtr dev, const char *matcher); int virPCIDeviceWaitForCleanup(virPCIDevicePtr dev, const char *matcher);
virPCIDeviceAddressPtr
virPCIGetDeviceAddressFromSysfsLink(const char *device_link);
int virPCIGetPhysicalFunction(const char *vf_sysfs_path, int virPCIGetPhysicalFunction(const char *vf_sysfs_path,
virPCIDeviceAddressPtr *pf); virPCIDeviceAddressPtr *pf);