提交 9a238c16 编写于 作者: L Laine Stump

util: make virPCIGetDeviceAddressFromSysfsLink() public

This function will be useful in virnetdev.c, so promote it from static.
上级 d6ee56d7
...@@ -2243,6 +2243,7 @@ virPCIDeviceSetUsedBy; ...@@ -2243,6 +2243,7 @@ virPCIDeviceSetUsedBy;
virPCIDeviceUnbind; virPCIDeviceUnbind;
virPCIDeviceWaitForCleanup; virPCIDeviceWaitForCleanup;
virPCIEDeviceInfoFree; virPCIEDeviceInfoFree;
virPCIGetDeviceAddressFromSysfsLink;
virPCIGetHeaderType; virPCIGetHeaderType;
virPCIGetNetName; virPCIGetNetName;
virPCIGetPhysicalFunction; virPCIGetPhysicalFunction;
......
...@@ -2594,7 +2594,7 @@ virPCIDeviceAddressIsEqual(virPCIDeviceAddressPtr bdf1, ...@@ -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, ...@@ -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)
......
...@@ -186,6 +186,9 @@ int virPCIDeviceIsAssignable(virPCIDevicePtr dev, ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册