errno-util: let's beef up ERRNO_IS_NOT_SUPPORTED() with socket not supported errors
This commit is contained in:
@@ -87,12 +87,16 @@ static inline bool ERRNO_IS_RESOURCE(int r) {
|
||||
ENOMEM);
|
||||
}
|
||||
|
||||
/* Three different errors for "operation/system call/ioctl not supported" */
|
||||
/* Seven different errors for "operation/system call/ioctl/socket feature not supported" */
|
||||
static inline bool ERRNO_IS_NOT_SUPPORTED(int r) {
|
||||
return IN_SET(abs(r),
|
||||
EOPNOTSUPP,
|
||||
ENOTTY,
|
||||
ENOSYS);
|
||||
ENOSYS,
|
||||
EAFNOSUPPORT,
|
||||
EPFNOSUPPORT,
|
||||
EPROTONOSUPPORT,
|
||||
ESOCKTNOSUPPORT);
|
||||
}
|
||||
|
||||
/* Two different errors for access problems */
|
||||
|
||||
Reference in New Issue
Block a user