mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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.
This commit is contained in:
@@ -1694,6 +1694,7 @@ virObjectUnref;
|
||||
|
||||
# util/virpci.h
|
||||
virPCIDeviceAddressGetSysfsFile;
|
||||
virPCIDeviceAddressParse;
|
||||
virPCIDeviceCopy;
|
||||
virPCIDeviceDetach;
|
||||
virPCIDeviceFileIterate;
|
||||
|
||||
@@ -2046,8 +2046,8 @@ logStrToLong_ui(char const *s,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
virPCIParseDeviceAddress(char *address,
|
||||
int
|
||||
virPCIDeviceAddressParse(char *address,
|
||||
virPCIDeviceAddressPtr bdf)
|
||||
{
|
||||
char *p = NULL;
|
||||
@@ -2111,7 +2111,7 @@ virPCIGetDeviceAddressFromSysfsLink(const char *device_link,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (virPCIParseDeviceAddress(config_address, *bdf) != 0) {
|
||||
if (virPCIDeviceAddressParse(config_address, *bdf) != 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Failed to parse PCI config address '%s'"),
|
||||
config_address);
|
||||
|
||||
@@ -152,6 +152,8 @@ int virPCIGetAddrString(unsigned int domain,
|
||||
char **pciConfigAddr)
|
||||
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf);
|
||||
|
||||
int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
|
||||
char **pfname, int *vf_index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user