chiark / gitweb /
copy: extend copy_bytes() a bit
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Mar 2018 15:41:42 +0000 (16:41 +0100)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit26e21636556e1950038226e2a5c58dbc46dced30
treea730a7b5624697b5db66124aed67b5501802ab79
parent0c28c8723ac7d39dbba1b9679fb0d4bc16d83ab0
copy: extend copy_bytes() a bit

Optionally, when we copy between fds with simple read/write, let's
return any remaining data we already read into the buffer if write
fails. This is useful to allow callers to use the read data otherwise,
perhaps implementing a different fallback for copying.
src/basic/copy.c
src/basic/copy.h