treewide: replace EBADFD with posix EBADF

EBADF was used in some places already, some other places used EBADFD
(with and without an #ifdef). EBADFD is linux specific.
This commit is contained in:
Wim Taymans 2026-05-27 13:36:39 +02:00
parent db8bb8d489
commit 7303a55b50
4 changed files with 12 additions and 16 deletions

View file

@ -107,9 +107,7 @@ static inline int res_to_err(int res)
case -ENOKEY: return ERR_AUTHKEY;
#endif
case -ECONNRESET: case -EPIPE: return ERR_CONNECTIONTERMINATED;
#ifdef EBADFD
case -EBADFD: return ERR_BADSTATE;
#endif
case -EBADF: return ERR_BADSTATE;
#ifdef ENODATA
case -ENODATA: return ERR_NODATA;
#endif
@ -144,9 +142,7 @@ static inline int err_to_res(int err)
case ERR_KILLED: return -EFAULT;
case ERR_INVALIDSERVER: return -EINVAL;
case ERR_MODINITFAILED: return -EIO;
#ifdef EBADFD
case ERR_BADSTATE: return -EBADFD;
#endif
case ERR_BADSTATE: return -EBADF;
case ERR_NODATA: return -ENODATA;
case ERR_VERSION: return -EPROTO;
case ERR_TOOLARGE: return -E2BIG;