summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>2002-01-22 23:35:09 +0000
committerdg <dg@FreeBSD.org>2002-01-22 23:35:09 +0000
commitef8f790f5da71368968c92f38bc4800ab1353def (patch)
treed1d80900ffb54da816de9ee439e1c87d26091cb5 /lib/libc_r/uthread
parent388c7f4272f68ebbfc45db8da9ef09528d8d6b90 (diff)
downloadFreeBSD-src-ef8f790f5da71368968c92f38bc4800ab1353def.zip
FreeBSD-src-ef8f790f5da71368968c92f38bc4800ab1353def.tar.gz
Undo the work-around for the sendfile bug where nbytes needed the hdr/trl
size added to it in order for it to work properly when nbytes != 0. Reviewed by: alfred MFC after: 3 days
Diffstat (limited to 'lib/libc_r/uthread')
-rw-r--r--lib/libc_r/uthread/uthread_sendfile.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/libc_r/uthread/uthread_sendfile.c b/lib/libc_r/uthread/uthread_sendfile.c
index d22f4ef..9f8c1cf 100644
--- a/lib/libc_r/uthread/uthread_sendfile.c
+++ b/lib/libc_r/uthread/uthread_sendfile.c
@@ -101,17 +101,6 @@ _sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr,
blocking = ((_thread_fd_table[s]->flags & O_NONBLOCK) == 0);
/*
- * Emulate sendfile(2) weirdness, sendfile doesn't actually send
- * nbytes of the file, it really sends (nbytes - headers_size) of
- * the file. If (nbytes - headers_size) == 0 we just send trailers.
- */
- if (nbytes != 0) {
- nbytes -= nwritten;
- if (nbytes <= 0)
- goto ERROR_2;
- }
-
- /*
* Loop while no error occurs and until the expected number of bytes are
* written.
*/
OpenPOWER on IntegriCloud