summaryrefslogtreecommitdiffstats
path: root/src/shared/loop-util.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:23:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:23:33 +0000
commita40ea05d08f1d6dce2fb12fb119a33540bf6256f (patch)
tree76580546179a403e346084143bd92393474e71be /src/shared/loop-util.c
parentAdding upstream version 252.22. (diff)
downloadsystemd-upstream/252.23.tar.xz
systemd-upstream/252.23.zip
Adding upstream version 252.23.upstream/252.23
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/loop-util.c')
-rw-r--r--src/shared/loop-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c
index 3396cf5..ef35e31 100644
--- a/src/shared/loop-util.c
+++ b/src/shared/loop-util.c
@@ -637,7 +637,7 @@ int loop_device_make_by_path(
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))