From 301bd80194a18baefd95e4325de93dd06b7a8ce4 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Fri, 6 Nov 2015 10:06:11 -0500 Subject: [PATCH] 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. --- src/util/virnetdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 971e24da9f..3bd7dbb564 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -3166,13 +3166,13 @@ virNetDevSendEthtoolIoctl(const char *ifname, void *cmd) ret = ioctl(sock, SIOCETHTOOL, &ifr); if (ret != 0) { switch (errno) { - case EPERM: + case EPERM: /* attempt to call SIOCETHTOOL from unprivileged code */ VIR_DEBUG("ethtool ioctl: permission denied"); break; - case EINVAL: + case EINVAL: /* kernel doesn't support SIOCETHTOOL */ VIR_DEBUG("ethtool ioctl: invalid request"); break; - case EOPNOTSUPP: + case EOPNOTSUPP: /* kernel doesn't support specific feature */ VIR_DEBUG("ethtool ioctl: request not supported"); break; default: