about summary refs log tree commit diff
path: root/shared/systemd/src/basic/errno-util.h
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-05-19 16:38:51 +0200
committerSebastien Bacher <seb128@ubuntu.com>2020-05-19 16:38:51 +0200
commit96642ebde58e1eea692aea6a92d33f45452fa9c0 (patch)
tree106ddfa2180b3997e8965787b5cb122982ebab9d /shared/systemd/src/basic/errno-util.h
parent8f6881ac06714ef99cc470a03e7ac0ce1af49a16 (diff)
parentd460892bbfece74fb6d3cd846bf6ef548290be41 (diff)
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latestt pu
Diffstat (limited to 'shared/systemd/src/basic/errno-util.h')
-rw-r--r--shared/systemd/src/basic/errno-util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/systemd/src/basic/errno-util.h b/shared/systemd/src/basic/errno-util.h
index 8f1be6c0..65a6384e 100644
--- a/shared/systemd/src/basic/errno-util.h
+++ b/shared/systemd/src/basic/errno-util.h
@@ -101,3 +101,11 @@ static inline bool ERRNO_IS_PRIVILEGE(int r) {
                       EACCES,
                       EPERM);
 }
+
+/* Three difference errors for "not enough disk space" */
+static inline bool ERRNO_IS_DISK_SPACE(int r) {
+        return IN_SET(abs(r),
+                      ENOSPC,
+                      EDQUOT,
+                      EFBIG);
+}