summaryrefslogtreecommitdiff
path: root/src/basic/fd-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-10 21:03:30 +0200
committerLennart Poettering <lennart@poettering.net>2018-11-26 18:09:01 +0100
commitb3cade0c2792298d6cce0a0b2c8c4974ed981b00 (patch)
tree5598dc65714c86d1cc93685258c885610e7a10ee /src/basic/fd-util.c
parent576cf244a491a76bae9f6ece57f60a9e3b4ad53f (diff)
downloadsystemd-b3cade0c2792298d6cce0a0b2c8c4974ed981b00.tar.gz
copy: support getting progress feedback from the various copy functions
This adds two optional functions that may be passed to the various copy functions. One is invoked whenever we start copying a new file object, the other while we copy file payload in each loop iteration. When the caller passes one or both they can get notifications about copy progress, for example to log where things are.
Diffstat (limited to 'src/basic/fd-util.c')
-rw-r--r--src/basic/fd-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c
index 5775a13e3e..97dc40357c 100644
--- a/src/basic/fd-util.c
+++ b/src/basic/fd-util.c
@@ -648,7 +648,7 @@ int fd_duplicate_data_fd(int fd) {
if ((size_t) isz >= DATA_FD_MEMORY_LIMIT) {
- r = copy_bytes_full(fd, pipefds[1], DATA_FD_MEMORY_LIMIT, 0, &remains, &remains_size);
+ r = copy_bytes_full(fd, pipefds[1], DATA_FD_MEMORY_LIMIT, 0, &remains, &remains_size, NULL, NULL);
if (r < 0 && r != -EAGAIN)
return r; /* If we get EAGAIN it could be because of the source or because of
* the destination fd, we can't know, as sendfile() and friends won't