summaryrefslogtreecommitdiffstats
path: root/src/shared/copy.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/shared/copy.c
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/copy.c')
-rw-r--r--src/shared/copy.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/shared/copy.c b/src/shared/copy.c
index 2b87cba..8389774 100644
--- a/src/shared/copy.c
+++ b/src/shared/copy.c
@@ -170,13 +170,14 @@ int copy_bytes_full(
assert(fdt >= 0);
assert(!FLAGS_SET(copy_flags, COPY_LOCK_BSD));
- /* Tries to copy bytes from the file descriptor 'fdf' to 'fdt' in the smartest possible way. Copies a maximum
- * of 'max_bytes', which may be specified as UINT64_MAX, in which no maximum is applied. Returns negative on
- * error, zero if EOF is hit before the bytes limit is hit and positive otherwise. If the copy fails for some
- * reason but we read but didn't yet write some data an ret_remains/ret_remains_size is not NULL, then it will
- * be initialized with an allocated buffer containing this "remaining" data. Note that these two parameters are
- * initialized with a valid buffer only on failure and only if there's actually data already read. Otherwise
- * these parameters if non-NULL are set to NULL. */
+ /* Tries to copy bytes from the file descriptor 'fdf' to 'fdt' in the smartest possible way. Copies a
+ * maximum of 'max_bytes', which may be specified as UINT64_MAX, in which no maximum is applied.
+ * Returns negative on error, zero if EOF is hit before the bytes limit is hit and positive
+ * otherwise. If the copy fails for some reason but we read but didn't yet write some data and
+ * ret_remains/ret_remains_size is not NULL, then it will be initialized with an allocated buffer
+ * containing this "remaining" data. Note that these two parameters are initialized with a valid
+ * buffer only on failure and only if there's actually data already read. Otherwise these parameters
+ * if non-NULL are set to NULL. */
if (ret_remains)
*ret_remains = NULL;