提交 0dc67e6d 编写于 作者: L Laine Stump

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

The first arg isn't modified in the function, so it should be const.
上级 48f33bb5
......@@ -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));
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册