diff options
author | Jeremy Allison <jra@samba.org> | 2002-09-12 02:12:52 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-09-12 02:12:52 +0000 |
commit | 4f613ac61e9bc442715141188d915b537e15f4c6 (patch) | |
tree | 1988e7728bb0828831d953da13db6895c7cc9e13 /source3/smbd/vfs-wrap.c | |
parent | b060593287f6344a147da95e5179170335ad78d1 (diff) | |
download | samba-4f613ac61e9bc442715141188d915b537e15f4c6.tar.gz samba-4f613ac61e9bc442715141188d915b537e15f4c6.tar.bz2 samba-4f613ac61e9bc442715141188d915b537e15f4c6.zip |
First cut at portable sendfile code. Only used in readX at the moment
and doesn't actually call sendfile. Needs to be vectored through the
VFS and tested on all supported platforms (Solaris/HPUX/FreeBSD/Linux).
Linux doesn't actually work (2.4.19 kernel) at the moment because it
doesn't have a 64-bit clean sendfile.
Jeremy.
(This used to be commit fd772ca7b16cd86e0d50c7ed8d537c202976a6d2)
Diffstat (limited to 'source3/smbd/vfs-wrap.c')
-rw-r--r-- | source3/smbd/vfs-wrap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c index 6878a42b48..b44b778e09 100644 --- a/source3/smbd/vfs-wrap.c +++ b/source3/smbd/vfs-wrap.c @@ -192,6 +192,18 @@ SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int wh return result; } +#if 0 /* JRATEST */ +ssize_t vfswrap_sendfile(int outfd, struct files_struct *fsp, int infd, DATA_BLOB *hdr, SMB_OFF_T offset, size_t n) +{ + ssize_t result; + + START_PROFILE_BYTES(syscall_sendfile, n); + result = sys_sendfile(outfd, fsp, infd, hdr, offset, n); + END_PROFILE(syscall_sendfile); + return result; +} +#endif + int vfswrap_rename(connection_struct *conn, const char *old, const char *new) { int result; |