This function has utility outside of virpci.c, so make it public.
Also the name didn't fit convention, so change it to
virPCIDeviceAddressParse.
# util/virpci.h
virPCIDeviceAddressGetSysfsFile;
+virPCIDeviceAddressParse;
virPCIDeviceCopy;
virPCIDeviceDetach;
virPCIDeviceFileIterate;
return ret;
}
-static int
-virPCIParseDeviceAddress(char *address,
+int
+virPCIDeviceAddressParse(char *address,
virPCIDeviceAddressPtr bdf)
{
char *p = NULL;
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);
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);