diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-15 13:32:03 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-11-19 19:12:09 +0100 |
commit | e6376b6a4195e9caa0f8600db4aaf499b91b65d9 (patch) | |
tree | 1c121631533972c17e2c1f84fbd2e32bdab42809 /src/basic/errno-util.h | |
parent | update TODO (diff) | |
download | systemd-e6376b6a4195e9caa0f8600db4aaf499b91b65d9.tar.xz systemd-e6376b6a4195e9caa0f8600db4aaf499b91b65d9.zip |
errno: add new ERRNO_IS_NOT_SUPPORTED() helper
Diffstat (limited to 'src/basic/errno-util.h')
-rw-r--r-- | src/basic/errno-util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h index 6053cde62d..b2723b864e 100644 --- a/src/basic/errno-util.h +++ b/src/basic/errno-util.h @@ -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); +} |