1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-03 01:17:45 +03:00

errno: add new ERRNO_IS_NOT_SUPPORTED() helper

This commit is contained in:
Lennart Poettering 2019-07-15 13:32:03 +02:00
parent 25f9288e31
commit e6376b6a41

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);
}