From 6b44a121c15584f340f73cf9ef8aa144ddcc22b2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 5 Jan 2018 13:41:33 +0100 Subject: [PATCH] cocci: there's not ENOTSUP, there's only EOPNOTSUPP On Linux the former is a compat alias to the latter, and that's really weird, as inside the kernel the two are distinct. Which means we really should stay away from it. --- coccinelle/enotsup.cocci | 4 ++++ src/udev/net/ethtool-util.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 coccinelle/enotsup.cocci diff --git a/coccinelle/enotsup.cocci b/coccinelle/enotsup.cocci new file mode 100644 index 0000000000..c65734d382 --- /dev/null +++ b/coccinelle/enotsup.cocci @@ -0,0 +1,4 @@ +@@ +@@ +- ENOTSUP ++ EOPNOTSUPP diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c index 1401584956..9bdaef8d90 100644 --- a/src/udev/net/ethtool-util.c +++ b/src/udev/net/ethtool-util.c @@ -401,7 +401,7 @@ static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_uset return -errno; if (ecmd.req.link_mode_masks_nwords >= 0 || ecmd.req.cmd != ETHTOOL_GLINKSETTINGS) - return -ENOTSUP; + return -EOPNOTSUPP; ecmd.req.link_mode_masks_nwords = -ecmd.req.link_mode_masks_nwords; @@ -412,7 +412,7 @@ static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_uset return -errno; if (ecmd.req.link_mode_masks_nwords <= 0 || ecmd.req.cmd != ETHTOOL_GLINKSETTINGS) - return -ENOTSUP; + return -EOPNOTSUPP; u = new0(struct ethtool_link_usettings , 1); if (!u)