repart: fix bogus errno in error message and returned value

Reported by qarmin (Rafał Mikrut).
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-05-18 12:45:56 +02:00
parent f0405bfdff
commit 3a333585fe
+2 -2
View File
@@ -3442,8 +3442,8 @@ static int context_copy_from_one(Context *context, const char *src) {
if (!np->copy_blocks_path)
return log_oom();
np->copy_blocks_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
if (np->copy_blocks_fd < 0)
np->copy_blocks_fd = r = RET_NERRNO(fcntl(fd, F_DUPFD_CLOEXEC, 3));
if (r < 0)
return log_error_errno(r, "Failed to duplicate file descriptor of %s: %m", src);
np->copy_blocks_offset = start;