summaryrefslogtreecommitdiff
path: root/src/systemctl
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/systemctl
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/systemctl')
-rw-r--r--src/systemctl/systemctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 2336ae34f4..60f8bc3df5 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5300,7 +5300,7 @@ static int cat_file(const char *filename, bool newline) {
ansi_normal());
fflush(stdout);
- return copy_bytes(fd, STDOUT_FILENO, (uint64_t) -1, false);
+ return copy_bytes(fd, STDOUT_FILENO, (uint64_t) -1, 0);
}
static int cat(int argc, char *argv[], void *userdata) {
@@ -6582,7 +6582,7 @@ static int create_edit_temp_file(const char *new_path, const char *original_path
if (r < 0)
return log_error_errno(r, "Failed to create directories for \"%s\": %m", new_path);
- r = copy_file(original_path, t, 0, 0644, 0);
+ r = copy_file(original_path, t, 0, 0644, 0, COPY_REFLINK);
if (r == -ENOENT) {
r = touch(t);