summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-04-19 17:35:54 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-15 19:39:06 +0200
commit130799546b715ff2af6714abe8323bbf89503499 (patch)
treee6b0aa2d128dd93acb85c87dbbac617a51f5be29
parentf66253f0e3bca4bb5e3a4ce9a54c3f1de7d3e886 (diff)
downloadsystemd-130799546b715ff2af6714abe8323bbf89503499.tar.gz
repart: fix incorrect error code propagation
(cherry picked from commit a0ff9971802b664aaa12481c46cec11eae77ea51) (cherry picked from commit a9b9f49b089f297b8ba2acf2b71f7fbd71f65e21)
-rw-r--r--src/partition/repart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 9ed79caa87..37fd7dcc2e 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -2635,7 +2635,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)