From 9b4d223c2cd31776ae95b338c06b2db0bb1f3a5d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 6 Mar 2009 10:58:13 -0800 Subject: [PATCH] netdev: Don't log a warning for unsupported ethtool operations. Plenty of devices don't support ethtool, and we don't use ethtool for anything essential, so there's no point in logging a warning here. --- lib/netdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/netdev.c b/lib/netdev.c index 95d3d2c3..f754cad3 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -203,8 +203,14 @@ do_ethtool(struct netdev *netdev, struct ethtool_cmd *ecmd, if (ioctl(netdev->netdev_fd, SIOCETHTOOL, &ifr) == 0) { return 0; } else { - VLOG_WARN_RL(&rl, "ethtool command %s on network device %s failed: %s", - cmd_name, netdev->name, strerror(errno)); + if (errno != EOPNOTSUPP) { + VLOG_WARN_RL(&rl, "ethtool command %s on network device %s " + "failed: %s", cmd_name, netdev->name, + strerror(errno)); + } else { + /* The device doesn't support this operation. That's pretty + * common, so there's no point in logging anything. */ + } return errno; } } -- 2.30.2