errno-util: introduce ERRNO_IS_NEG_FS_WRITE_REFUSED()

This commit is contained in:
Yu Watanabe
2025-07-10 14:02:00 +09:00
parent f436c64e61
commit e28d408c6b
11 changed files with 26 additions and 21 deletions
+6
View File
@@ -188,6 +188,12 @@ static inline bool ERRNO_IS_NEG_PRIVILEGE(intmax_t r) {
}
_DEFINE_ABS_WRAPPER(PRIVILEGE);
/* Three different errors for writing on a filesystem */
static inline bool ERRNO_IS_NEG_FS_WRITE_REFUSED(intmax_t r) {
return r == -EROFS || ERRNO_IS_NEG_PRIVILEGE(r);
}
_DEFINE_ABS_WRAPPER(FS_WRITE_REFUSED);
/* Three different errors for "not enough disk space" */
static inline bool ERRNO_IS_NEG_DISK_SPACE(intmax_t r) {
return IN_SET(r,