chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8593f3
)
copy: add brief comment to copy_bytes() explaining its return values
author
Lennart Poettering
<lennart@poettering.net>
Fri, 9 Mar 2018 21:44:47 +0000
(22:44 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000
(16:47 +0200)
src/basic/copy.c
patch
|
blob
|
history
diff --git
a/src/basic/copy.c
b/src/basic/copy.c
index ff53f8394d1f8fbdb434fe6aebb1af84565d234b..673272d654aaf7b261e26fb512281e80ecabe3bb 100644
(file)
--- a/
src/basic/copy.c
+++ b/
src/basic/copy.c
@@
-65,6
+65,10
@@
int copy_bytes(int fdf, int fdt, uint64_t max_bytes, CopyFlags copy_flags) {
assert(fdf >= 0);
assert(fdt >= 0);
+ /* 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 0 /// UNNEEDED by elogind
/* Try btrfs reflinks first. */
if ((copy_flags & COPY_REFLINK) &&