Re: Is sendfile all that sexy?

From: David S. Miller (davem@redhat.com)
Date: Fri Jan 26 2001 - 06:46:38 EST


Anton Blanchard writes:
> diff -u -u -r1.257 reply.c
> --- source/smbd/reply.c 2001/01/24 19:34:53 1.257
> +++ source/smbd/reply.c 2001/01/26 05:38:53
> @@ -2383,6 +2391,51 @@
 ...
> + while(nread) {
> + int nwritten;
> + nwritten = sendfile(smbd_server_fd(), fsp->fd, &tmpoffset, nread);
> + if (nwritten == -1)
> + DEBUG(0,("reply_read_and_X: sendfile ERROR!\n"));
> +
> + if (!nwritten)
> + break;
> +
> + nread -= nwritten;
> + }
> +
> + return -1;

Anton, why are you always returning -1 (which means error for the
smb_message[] array functions) when using sendfile?

Aren't you supposed to return the number of bytes output or
something like this?

I'm probably missing something subtle here, so just let me
know what I missed.

Thanks.

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jan 31 2001 - 21:00:24 EST