summaryrefslogtreecommitdiff
path: root/src/basic/errno-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-07-15 13:32:03 +0200
committerLennart Poettering <lennart@poettering.net>2019-11-19 19:12:09 +0100
commite6376b6a4195e9caa0f8600db4aaf499b91b65d9 (patch)
tree1c121631533972c17e2c1f84fbd2e32bdab42809 /src/basic/errno-util.h
parent25f9288e31a586460c13d49edea9edafdca2a972 (diff)
downloadsystemd-e6376b6a4195e9caa0f8600db4aaf499b91b65d9.tar.gz
errno: add new ERRNO_IS_NOT_SUPPORTED() helper
Diffstat (limited to 'src/basic/errno-util.h')
-rw-r--r--src/basic/errno-util.h8
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);
+}