1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

loop-util: fix error handling

Follow-up for 972c8db589f1f031d1fbbe01d821ddb1795fe285.
This commit is contained in:
Yu Watanabe 2024-02-16 00:16:00 +09:00
parent 59a4e17249
commit 6383abd62c

View File

@ -679,7 +679,7 @@ int loop_device_make_by_path_at(
else
direct = direct_flags != 0;
if (fd < 0) {
r = -errno;
r = fd;
/* Retry read-only? */
if (open_flags >= 0 || !(ERRNO_IS_PRIVILEGE(r) || r == -EROFS))