Diff options
authorHristo Venev <hristo@venev.name>
committerJason A. Donenfeld <Jason@zx2c4.com>
commit
parent
tree
download
cache: tolerate short writes in print_slot
sendfile() can return after a short read/write, so we may need to call it more than once. As suggested in the manual page, we fall back to read/write if sendfile fails with EINVAL or ENOSYS. On the read/write path, use write_in_full which deals with short writes. Signed-off-by: Hristo Venev <hristo@venev.name> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--cache.c45
1 file changed, 25 insertions, 20 deletions