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
+1 -1
View File
@@ -660,7 +660,7 @@ int loop_device_make_by_path_at(
r = fd;
/* Retry read-only? */
if (open_flags >= 0 || !(ERRNO_IS_PRIVILEGE(r) || r == -EROFS))
if (open_flags >= 0 || !ERRNO_IS_NEG_FS_WRITE_REFUSED(r))
return r;
fd = xopenat(dir_fd, path, basic_flags|direct_flags|O_RDONLY);