mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
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.
This commit is contained in:
parent
2b44daaa20
commit
6b44a121c1
4
coccinelle/enotsup.cocci
Normal file
4
coccinelle/enotsup.cocci
Normal file
@ -0,0 +1,4 @@
|
||||
@@
|
||||
@@
|
||||
- ENOTSUP
|
||||
+ EOPNOTSUPP
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user