提交 31a4a679 编写于 作者: L Laine Stump

pci: rename virPCIParseDeviceAddress and make it public

This function has utility outside of virpci.c, so make it public.

Also the name didn't fit convention, so change it to
virPCIDeviceAddressParse.
上级 1d829e13
...@@ -1694,6 +1694,7 @@ virObjectUnref; ...@@ -1694,6 +1694,7 @@ virObjectUnref;
# util/virpci.h # util/virpci.h
virPCIDeviceAddressGetSysfsFile; virPCIDeviceAddressGetSysfsFile;
virPCIDeviceAddressParse;
virPCIDeviceCopy; virPCIDeviceCopy;
virPCIDeviceDetach; virPCIDeviceDetach;
virPCIDeviceFileIterate; virPCIDeviceFileIterate;
......
...@@ -2046,8 +2046,8 @@ logStrToLong_ui(char const *s, ...@@ -2046,8 +2046,8 @@ logStrToLong_ui(char const *s,
return ret; return ret;
} }
static int int
virPCIParseDeviceAddress(char *address, virPCIDeviceAddressParse(char *address,
virPCIDeviceAddressPtr bdf) virPCIDeviceAddressPtr bdf)
{ {
char *p = NULL; char *p = NULL;
...@@ -2111,7 +2111,7 @@ virPCIGetDeviceAddressFromSysfsLink(const char *device_link, ...@@ -2111,7 +2111,7 @@ virPCIGetDeviceAddressFromSysfsLink(const char *device_link,
goto out; goto out;
} }
if (virPCIParseDeviceAddress(config_address, *bdf) != 0) { if (virPCIDeviceAddressParse(config_address, *bdf) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to parse PCI config address '%s'"), _("Failed to parse PCI config address '%s'"),
config_address); config_address);
......
...@@ -152,6 +152,8 @@ int virPCIGetAddrString(unsigned int domain, ...@@ -152,6 +152,8 @@ int virPCIGetAddrString(unsigned int domain,
char **pciConfigAddr) char **pciConfigAddr)
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK; ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf);
int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path, int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
char **pfname, int *vf_index); char **pfname, int *vf_index);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册