From 3a333585fe3c825430910bd5953e6b3956bb9944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 18 May 2026 12:33:08 +0200 Subject: [PATCH] repart: fix bogus errno in error message and returned value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by qarmin (RafaƂ Mikrut). --- src/repart/repart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/repart/repart.c b/src/repart/repart.c index dca90f2509..133a8e0211 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -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;