errno: add new ERRNO_IS_NOT_SUPPORTED() helper

This commit is contained in:
Lennart Poettering
2019-11-19 19:12:09 +01:00
parent 25f9288e31
commit e6376b6a41
+8
View File
@@ -86,3 +86,11 @@ static inline bool ERRNO_IS_RESOURCE(int r) {
ENFILE,
ENOMEM);
}
/* Three different errors for "operation/system call/ioctl not supported" */
static inline bool ERRNO_IS_NOT_SUPPORTED(int r) {
return IN_SET(abs(r),
EOPNOTSUPP,
ENOTTY,
ENOSYS);
}