diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-10 21:03:30 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-26 18:09:01 +0100 |
commit | b3cade0c2792298d6cce0a0b2c8c4974ed981b00 (patch) | |
tree | 5598dc65714c86d1cc93685258c885610e7a10ee /src/basic/fd-util.c | |
parent | 576cf244a491a76bae9f6ece57f60a9e3b4ad53f (diff) | |
download | systemd-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.c | 2 |
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 |