summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-07 09:23:04 +0100
committerMichael Adam <obnox@samba.org>2008-01-07 15:59:01 +0100
commita56b417809805f8872c1e3238cce5d006d6189e4 (patch)
tree48237bfcc63171112e5cc3ca56c3662ecb898690 /source3/modules
parentcab9aa525dbbf4ba65acb43763298bfb30d4fca4 (diff)
downloadsamba-a56b417809805f8872c1e3238cce5d006d6189e4.tar.gz
samba-a56b417809805f8872c1e3238cce5d006d6189e4.tar.bz2
samba-a56b417809805f8872c1e3238cce5d006d6189e4.zip
Remove redundant parameter fd from SMB_VFS_PWRITE().
Michael (This used to be commit 8c4901a19ae2fd3ee085f9499f33aa7db016d182)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_commit.c3
-rw-r--r--source3/modules/vfs_default.c14
-rw-r--r--source3/modules/vfs_full_audit.c6
3 files changed, 11 insertions, 12 deletions
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index d7d81924f1..e445c43181 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -248,14 +248,13 @@ static ssize_t commit_write(
static ssize_t commit_pwrite(
vfs_handle_struct * handle,
files_struct * fsp,
- int fd,
void * data,
size_t count,
SMB_OFF_T offset)
{
ssize_t ret;
- ret = SMB_VFS_NEXT_PWRITE(handle, fsp, fd, data, count, offset);
+ ret = SMB_VFS_NEXT_PWRITE(handle, fsp, data, count, offset);
if (ret > 0) {
if (commit(handle, fsp, offset, ret) == -1) {
return -1;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 4f9d90abde..b4ce9346e2 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -272,38 +272,38 @@ static ssize_t vfswrap_write(vfs_handle_struct *handle, files_struct *fsp, int f
return result;
}
-static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data,
+static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, const void *data,
size_t n, SMB_OFF_T offset)
{
ssize_t result;
#if defined(HAVE_PWRITE) || defined(HAVE_PRWITE64)
START_PROFILE_BYTES(syscall_pwrite, n);
- result = sys_pwrite(fd, data, n, offset);
+ result = sys_pwrite(fsp->fh->fd, data, n, offset);
END_PROFILE(syscall_pwrite);
if (result == -1 && errno == ESPIPE) {
/* Maintain the fiction that pipes can be sought on. */
- result = SMB_VFS_WRITE(fsp, fd, data, n);
+ result = SMB_VFS_WRITE(fsp, fsp->fh->fd, data, n);
}
#else /* HAVE_PWRITE */
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) {
return -1;
}
- if (SMB_VFS_LSEEK(fsp, fd, offset, SEEK_SET) == -1) {
+ if (SMB_VFS_LSEEK(fsp, fsp->fh->fd, offset, SEEK_SET) == -1) {
return -1;
}
- result = SMB_VFS_WRITE(fsp, fd, data, n);
+ result = SMB_VFS_WRITE(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_PWRITE */
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 7acca905a0..c0bc40cc67 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -119,7 +119,7 @@ static ssize_t smb_full_audit_pread(vfs_handle_struct *handle, files_struct *fsp
static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp,
int fd, const void *data, size_t n);
static ssize_t smb_full_audit_pwrite(vfs_handle_struct *handle, files_struct *fsp,
- int fd, const void *data, size_t n,
+ const void *data, size_t n,
SMB_OFF_T offset);
static SMB_OFF_T smb_full_audit_lseek(vfs_handle_struct *handle, files_struct *fsp,
int filedes, SMB_OFF_T offset, int whence);
@@ -1124,12 +1124,12 @@ static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp
}
static ssize_t smb_full_audit_pwrite(vfs_handle_struct *handle, files_struct *fsp,
- int fd, const void *data, size_t n,
+ const void *data, size_t n,
SMB_OFF_T offset)
{
ssize_t result;
- result = SMB_VFS_NEXT_PWRITE(handle, fsp, fd, data, n, offset);
+ result = SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, offset);
do_log(SMB_VFS_OP_PWRITE, (result >= 0), handle, "%s", fsp->fsp_name);