1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

copy: add brief comment to copy_bytes() explaining its return values

This commit is contained in:
Lennart Poettering 2018-03-09 22:44:47 +01:00
parent 812724c14b
commit 78ba8cf770

View File

@ -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. */
/* Try btrfs reflinks first. */
if ((copy_flags & COPY_REFLINK) &&
max_bytes == (uint64_t) -1 &&