summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-06 21:19:20 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-07 01:19:56 +0100
commitcda134ab1eac84f874aacf8e885a07112a7fd5ce (patch)
tree1c1739debf6148d09afd9f18cd61e1c2471fab94 /src/systemctl/systemctl.c
parent0c2576ef74a9f9b96519cdcb7f9c01742d8255e2 (diff)
copy: teach copy_bytes() sendfile() support, and then replace sendfile_full() by it
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d9e9c2a6c3..c903c54e9b 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -67,6 +67,7 @@
#include "logs-show.h"
#include "socket-util.h"
#include "fileio.h"
+#include "copy.h"
#include "env-util.h"
#include "bus-util.h"
#include "bus-message.h"
@@ -4647,7 +4648,7 @@ static int cat(sd_bus *bus, char **args) {
ansi_highlight_off());
fflush(stdout);
- r = sendfile_full(STDOUT_FILENO, fragment_path);
+ r = copy_file_fd(fragment_path, STDOUT_FILENO);
if (r < 0) {
log_warning("Failed to cat %s: %s", fragment_path, strerror(-r));
continue;
@@ -4662,7 +4663,7 @@ static int cat(sd_bus *bus, char **args) {
ansi_highlight_off());
fflush(stdout);
- r = sendfile_full(STDOUT_FILENO, *path);
+ r = copy_file_fd(*path, STDOUT_FILENO);
if (r < 0) {
log_warning("Failed to cat %s: %s", *path, strerror(-r));
continue;