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 | fd772ca7b16cd86e0d50c7ed8d537c202976a6d2 (patch) | |
tree | 8d455b2c4e8fce4913773af0e7886e0a51519b39 /source/smbd/vfs-wrap.c | |
parent | f75d61b03a3377f3a791b56fc307dc7e56e4707a (diff) | |
download | samba-fd772ca7b16cd86e0d50c7ed8d537c202976a6d2.tar.gz samba-fd772ca7b16cd86e0d50c7ed8d537c202976a6d2.tar.xz samba-fd772ca7b16cd86e0d50c7ed8d537c202976a6d2.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.
Diffstat (limited to 'source/smbd/vfs-wrap.c')
-rw-r--r-- | source/smbd/vfs-wrap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index 6878a42b485..b44b778e09d 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/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; |