提交 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, ...@@ -2857,7 +2857,7 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr addr,
* Returns the network device name of a pci device * Returns the network device name of a pci device
*/ */
int int
virPCIGetNetName(char *device_link_sysfs_path, char **netname) virPCIGetNetName(const char *device_link_sysfs_path, char **netname)
{ {
char *pcidev_sysfs_net_path = NULL; char *pcidev_sysfs_net_path = NULL;
int ret = -1; int ret = -1;
...@@ -2991,7 +2991,7 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr dev ATTRIBUTE_UNUSED, ...@@ -2991,7 +2991,7 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr dev ATTRIBUTE_UNUSED,
} }
int int
virPCIGetNetName(char *device_link_sysfs_path ATTRIBUTE_UNUSED, virPCIGetNetName(const char *device_link_sysfs_path ATTRIBUTE_UNUSED,
char **netname ATTRIBUTE_UNUSED) char **netname ATTRIBUTE_UNUSED)
{ {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported)); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
......
...@@ -207,7 +207,7 @@ int virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link, ...@@ -207,7 +207,7 @@ int virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link,
int virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr addr, int virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr addr,
char **pci_sysfs_device_link); 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, int virPCIGetSysfsFile(char *virPCIDeviceName,
char **pci_sysfs_device_link) char **pci_sysfs_device_link)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册