summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-10 15:49:35 +0100
committerMichael Adam <obnox@samba.org>2008-01-10 15:49:35 +0100
commite9a3a62e7448bef72d9c17c90ff2b404082f067c (patch)
tree882a2c92c86ea112ece2611bd2b33d7b9662a4f2 /source3/modules
parent1d66f4d58b5fdd9c4e0c022cd2724e05d144510b (diff)
downloadsamba-e9a3a62e7448bef72d9c17c90ff2b404082f067c.tar.gz
samba-e9a3a62e7448bef72d9c17c90ff2b404082f067c.tar.bz2
samba-e9a3a62e7448bef72d9c17c90ff2b404082f067c.zip
Remove redundant parameter fd from SMB_VFS_WRITE().
Michael (This used to be commit c8ae7d095a2a6a7eac920a68ca7244e3a423e1b1)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_commit.c3
-rw-r--r--source3/modules/vfs_default.c12
-rw-r--r--source3/modules/vfs_full_audit.c6
3 files changed, 10 insertions, 11 deletions
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index fe7324122f..ac391cf007 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -229,12 +229,11 @@ static int commit_open(
static ssize_t commit_write(
vfs_handle_struct * handle,
files_struct * fsp,
- int fd,
void * data,
size_t count)
{
ssize_t ret;
- ret = SMB_VFS_NEXT_WRITE(handle, fsp, fd, data, count);
+ ret = SMB_VFS_NEXT_WRITE(handle, fsp, data, count);
if (ret > 0) {
if (commit(handle, fsp, fsp->fh->pos, ret) == -1) {
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 920c05c338..e57d24cb1a 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -262,12 +262,12 @@ static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void
return result;
}
-static ssize_t vfswrap_write(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n)
+static ssize_t vfswrap_write(vfs_handle_struct *handle, files_struct *fsp, const void *data, size_t n)
{
ssize_t result;
START_PROFILE_BYTES(syscall_write, n);
- result = sys_write(fd, data, n);
+ result = sys_write(fsp->fh->fd, data, n);
END_PROFILE(syscall_write);
return result;
}
@@ -284,7 +284,7 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
if (result == -1 && errno == ESPIPE) {
/* Maintain the fiction that pipes can be sought on. */
- result = SMB_VFS_WRITE(fsp, fsp->fh->fd, data, n);
+ result = SMB_VFS_WRITE(fsp, data, n);
}
#else /* HAVE_PWRITE */
@@ -300,7 +300,7 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
return -1;
}
- result = SMB_VFS_WRITE(fsp, fsp->fh->fd, data, n);
+ result = SMB_VFS_WRITE(fsp, data, n);
lerrno = errno;
SMB_VFS_LSEEK(fsp, curr, SEEK_SET);
@@ -712,7 +712,7 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
SMB_OFF_T retlen;
SMB_OFF_T current_len_to_write = MIN(sizeof(zero_space),space_to_write);
- retlen = SMB_VFS_WRITE(fsp,fsp->fh->fd,(char *)zero_space,current_len_to_write);
+ retlen = SMB_VFS_WRITE(fsp,(char *)zero_space,current_len_to_write);
if (retlen <= 0)
return -1;
@@ -787,7 +787,7 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_O
if (SMB_VFS_LSEEK(fsp, len-1, SEEK_SET) != len -1)
goto done;
- if (SMB_VFS_WRITE(fsp, fsp->fh->fd, &c, 1)!=1)
+ if (SMB_VFS_WRITE(fsp, &c, 1)!=1)
goto done;
/* Seek to where we were */
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 18ee5ba50f..00512678b1 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -117,7 +117,7 @@ static ssize_t smb_full_audit_read(vfs_handle_struct *handle, files_struct *fsp,
static ssize_t smb_full_audit_pread(vfs_handle_struct *handle, files_struct *fsp,
void *data, size_t n, SMB_OFF_T offset);
static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp,
- int fd, const void *data, size_t n);
+ const void *data, size_t n);
static ssize_t smb_full_audit_pwrite(vfs_handle_struct *handle, files_struct *fsp,
const void *data, size_t n,
SMB_OFF_T offset);
@@ -1111,11 +1111,11 @@ 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)
+ const void *data, size_t n)
{
ssize_t result;
- result = SMB_VFS_NEXT_WRITE(handle, fsp, fd, data, n);
+ result = SMB_VFS_NEXT_WRITE(handle, fsp, data, n);
do_log(SMB_VFS_OP_WRITE, (result >= 0), handle, "%s", fsp->fsp_name);