1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

repart: fix incorrect error code propagation

This commit is contained in:
Lennart Poettering 2021-04-19 17:35:54 +02:00
parent 05e13b3558
commit a0ff997180

View File

@ -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); pfd = chase_symlinks_and_open(dn, fs, CHASE_PREFIX_ROOT|CHASE_WARN, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL);
if (pfd < 0) 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); tfd = openat(pfd, basename(*target), O_CREAT|O_EXCL|O_WRONLY|O_CLOEXEC, 0700);
if (tfd < 0) if (tfd < 0)