From a0ff9971802b664aaa12481c46cec11eae77ea51 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 19 Apr 2021 17:35:54 +0200 Subject: [PATCH] repart: fix incorrect error code propagation --- src/partition/repart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partition/repart.c b/src/partition/repart.c index 04d5bb18f4..6ad12772fd 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -2710,7 +2710,7 @@ static int do_copy_files(Partition *p, const char *fs) { pfd = chase_symlinks_and_open(dn, fs, CHASE_PREFIX_ROOT|CHASE_WARN, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL); if (pfd < 0) - return log_error_errno(tfd, "Failed to open parent directory of target: %m"); + return log_error_errno(pfd, "Failed to open parent directory of target: %m"); tfd = openat(pfd, basename(*target), O_CREAT|O_EXCL|O_WRONLY|O_CLOEXEC, 0700); if (tfd < 0)