diff options
author | Michael Adam <obnox@samba.org> | 2008-01-07 00:14:19 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-01-07 00:14:19 +0100 |
commit | ca275e254985727c50b1b988c958a3743a7bc8ce (patch) | |
tree | 1c806c09e76402a576adaba05c9f623cb3767ba2 /source3/modules/vfs_default.c | |
parent | 05352cf2cb7f9710444d340f3f14ac6917fb0416 (diff) | |
download | samba-ca275e254985727c50b1b988c958a3743a7bc8ce.tar.gz samba-ca275e254985727c50b1b988c958a3743a7bc8ce.tar.bz2 samba-ca275e254985727c50b1b988c958a3743a7bc8ce.zip |
Remove unneeded parameter fd from SMB_VFS_PREAD().
Michael
(This used to be commit 73e28806ce87d829ea7c38ed3440020845bb13bf)
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r-- | source3/modules/vfs_default.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 3251c56061..4f9d90abde 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -218,19 +218,19 @@ static ssize_t vfswrap_read(vfs_handle_struct *handle, files_struct *fsp, int fd return result; } -static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, +static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void *data, size_t n, SMB_OFF_T offset) { ssize_t result; #if defined(HAVE_PREAD) || defined(HAVE_PREAD64) START_PROFILE_BYTES(syscall_pread, n); - result = sys_pread(fd, data, n, offset); + result = sys_pread(fsp->fh->fd, data, n, offset); END_PROFILE(syscall_pread); if (result == -1 && errno == ESPIPE) { /* Maintain the fiction that pipes can be seeked (sought?) on. */ - result = SMB_VFS_READ(fsp, fd, data, n); + result = SMB_VFS_READ(fsp, fsp->fh->fd, data, n); fsp->fh->pos = 0; } @@ -238,23 +238,23 @@ static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, int f SMB_OFF_T curr; int lerrno; - curr = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR); + curr = SMB_VFS_LSEEK(fsp, fsp->fh->fd, 0, SEEK_CUR); if (curr == -1 && errno == ESPIPE) { /* Maintain the fiction that pipes can be seeked (sought?) on. */ - result = SMB_VFS_READ(fsp, fd, data, n); + result = SMB_VFS_READ(fsp, fsp->fh->fd, data, n); fsp->fh->pos = 0; return result; } - if (SMB_VFS_LSEEK(fsp, fd, offset, SEEK_SET) == -1) { + if (SMB_VFS_LSEEK(fsp, fsp->fh->fd, offset, SEEK_SET) == -1) { return -1; } errno = 0; - result = SMB_VFS_READ(fsp, fd, data, n); + result = SMB_VFS_READ(fsp, fsp->fh->fd, data, n); lerrno = errno; - SMB_VFS_LSEEK(fsp, fd, curr, SEEK_SET); + SMB_VFS_LSEEK(fsp, fsp->fh->fd, curr, SEEK_SET); errno = lerrno; #endif /* HAVE_PREAD */ |