From: Lennart Poettering Date: Mon, 19 Apr 2021 15:35:54 +0000 (+0200) Subject: repart: fix incorrect error code propagation X-Git-Tag: v249-rc1~388^2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0ff9971802b664aaa12481c46cec11eae77ea51;p=thirdparty%2Fsystemd.git repart: fix incorrect error code propagation --- diff --git a/src/partition/repart.c b/src/partition/repart.c index 04d5bb18f42..6ad12772fdd 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)