util: Fix const'ness of 1st arg to virPCIGetNetName()

The first arg isn't modified in the function, so it should be const.
This commit is contained in:
Laine Stump 2017-08-06 22:48:59 -04:00
parent 48f33bb5df
commit 0dc67e6d2d
2 changed files with 3 additions and 3 deletions

View File

@ -2857,7 +2857,7 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr addr,
* Returns the network device name of a pci device
*/
int
virPCIGetNetName(char *device_link_sysfs_path, char **netname)
virPCIGetNetName(const char *device_link_sysfs_path, char **netname)
{
char *pcidev_sysfs_net_path = NULL;
int ret = -1;
@ -2991,7 +2991,7 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr dev ATTRIBUTE_UNUSED,
}
int
virPCIGetNetName(char *device_link_sysfs_path ATTRIBUTE_UNUSED,
virPCIGetNetName(const char *device_link_sysfs_path ATTRIBUTE_UNUSED,
char **netname ATTRIBUTE_UNUSED)
{
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));

View File

@ -207,7 +207,7 @@ int virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link,
int virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr addr,
char **pci_sysfs_device_link);
int virPCIGetNetName(char *device_link_sysfs_path, char **netname);
int virPCIGetNetName(const char *device_link_sysfs_path, char **netname);
int virPCIGetSysfsFile(char *virPCIDeviceName,
char **pci_sysfs_device_link)