mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-22 14:09:22 +00:00
virnetdev: Document reasons for ignoring some SIOCETHTOOL errno values
Recently reverted commit id '6f2a0198' showed a need to add extra comments when dealing with filtering of potential "non-issues". Scanning through upstream patch postings indicates early on the reasons for the filtering of specific ioctl failures were provided; however, when converted from causing an error to VIR_DEBUG's the reasons were missing. A future read/change of the code incorrectly assumed they could or should be removed.
This commit is contained in:
parent
a3f63b853c
commit
301bd80194
@ -3166,13 +3166,13 @@ virNetDevSendEthtoolIoctl(const char *ifname, void *cmd)
|
|||||||
ret = ioctl(sock, SIOCETHTOOL, &ifr);
|
ret = ioctl(sock, SIOCETHTOOL, &ifr);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case EPERM:
|
case EPERM: /* attempt to call SIOCETHTOOL from unprivileged code */
|
||||||
VIR_DEBUG("ethtool ioctl: permission denied");
|
VIR_DEBUG("ethtool ioctl: permission denied");
|
||||||
break;
|
break;
|
||||||
case EINVAL:
|
case EINVAL: /* kernel doesn't support SIOCETHTOOL */
|
||||||
VIR_DEBUG("ethtool ioctl: invalid request");
|
VIR_DEBUG("ethtool ioctl: invalid request");
|
||||||
break;
|
break;
|
||||||
case EOPNOTSUPP:
|
case EOPNOTSUPP: /* kernel doesn't support specific feature */
|
||||||
VIR_DEBUG("ethtool ioctl: request not supported");
|
VIR_DEBUG("ethtool ioctl: request not supported");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user