summaryrefslogtreecommitdiff
path: root/src/partition
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-04-21 23:21:21 +0200
committerLennart Poettering <lennart@poettering.net>2021-04-21 23:30:00 +0200
commit554a2b64934a1cc6815f2df126811271d5c0ac9d (patch)
treeeb13d0c87a9c4b8572aa92c6b92faf1a919e1e7e /src/partition
parent7feb1dd6544d1bf373dbe13dd33cf563ed16f891 (diff)
downloadsystemd-554a2b64934a1cc6815f2df126811271d5c0ac9d.tar.gz
repart: prefix the correct path with root dir in log output
When we copy files into the freshly formatted file system, the mount point prefix must be prepended to the *target* path, not the *source* path. Not just in code but in the log message about it, too.
Diffstat (limited to 'src/partition')
-rw-r--r--src/partition/repart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index 3e88d38205..9e297f19b9 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -2846,7 +2846,7 @@ static int do_copy_files(Partition *p, const char *fs) {
UID_INVALID, GID_INVALID,
COPY_REFLINK|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS);
if (r < 0)
- return log_error_errno(r, "Failed to copy %s%s to %s: %m", strempty(arg_root), *source, *target);
+ return log_error_errno(r, "Failed to copy '%s' to '%s%s': %m", *source, strempty(arg_root), *target);
} else {
/* We are looking at a regular file */
@@ -2864,7 +2864,7 @@ static int do_copy_files(Partition *p, const char *fs) {
r = copy_bytes(sfd, tfd, UINT64_MAX, COPY_REFLINK|COPY_SIGINT);
if (r < 0)
- return log_error_errno(r, "Failed to copy '%s%s' to '%s': %m", strempty(arg_root), *source, *target);
+ return log_error_errno(r, "Failed to copy '%s' to '%s%s': %m", *source, strempty(arg_root), *target);
(void) copy_xattr(sfd, tfd);
(void) copy_access(sfd, tfd);