summaryrefslogtreecommitdiff
path: root/src/shared/machine-image.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-13 19:00:22 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-17 10:22:28 +0100
commit1c876927e4e63b90f72dd32cbc949a16948fe39e (patch)
treedeaa814a4f816e249844ea6695860f60f1fd1fc7 /src/shared/machine-image.c
parent7026a775e656bb9cd982fd450e3d9c60d62a0bdf (diff)
copy: change the various copy_xyz() calls to take a unified flags parameter
This adds a unified "copy_flags" parameter to all copy_xyz() function calls, replacing the various boolean flags so far used. This should make many invocations more readable as it is clear what behaviour is precisely requested. This also prepares ground for adding support for more modes later on.
Diffstat (limited to 'src/shared/machine-image.c')
-rw-r--r--src/shared/machine-image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c
index 7bc5c0a128..d96ff44e66 100644
--- a/src/shared/machine-image.c
+++ b/src/shared/machine-image.c
@@ -594,7 +594,7 @@ static int clone_auxiliary_file(const char *path, const char *new_name, const ch
if (!rs)
return -ENOMEM;
- return copy_file_atomic(path, rs, 0664, false, 0);
+ return copy_file_atomic(path, rs, 0664, 0, COPY_REFLINK);
}
int image_clone(Image *i, const char *new_name, bool read_only) {
@@ -656,7 +656,7 @@ int image_clone(Image *i, const char *new_name, bool read_only) {
case IMAGE_RAW:
new_path = strjoina("/var/lib/machines/", new_name, ".raw");
- r = copy_file_atomic(i->path, new_path, read_only ? 0444 : 0644, false, FS_NOCOW_FL);
+ r = copy_file_atomic(i->path, new_path, read_only ? 0444 : 0644, FS_NOCOW_FL, COPY_REFLINK);
break;
default: