projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b64cea6
)
errno-util: add new ERRNO_IS_DISK_SPACE() helper
author
Lennart Poettering
<lennart@poettering.net>
Mon, 15 Jul 2019 11:32:03 +0000
(13:32 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 4 Dec 2019 09:57:44 +0000
(10:57 +0100)
src/basic/errno-util.h
patch
|
blob
|
history
diff --git
a/src/basic/errno-util.h
b/src/basic/errno-util.h
index 8f1be6c00ea38b49e18fec333b6742ae31e47dad..65a6384eeb0457013ff6bb2306d51b49da4eec4a 100644
(file)
--- a/
src/basic/errno-util.h
+++ b/
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);
+}