]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/copy.c
copy: extend copy_bytes() a bit
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Mar 2018 15:41:42 +0000 (16:41 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Apr 2018 09:32:46 +0000 (11:32 +0200)
commit7a23c7fdfe82754bebecf82cdb7e1ecb44d6f23f
tree36a73e538367598717363a0049be559b89cae4ec
parent5de6e1167314f5412285e904ec39299abbd352b5
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