mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
s3: VFS: default: Remove fallback if we don't have HAVE_PWRITE set. Samba doesn't work without pwrite.
Start of the changes to remove synchronous VFS write. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
c1bcf1e7fd
commit
90bd74640f
@ -664,24 +664,8 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
|
||||
}
|
||||
|
||||
#else /* HAVE_PWRITE */
|
||||
off_t curr;
|
||||
int lerrno;
|
||||
|
||||
curr = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
|
||||
if (curr == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (SMB_VFS_LSEEK(fsp, offset, SEEK_SET) == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
result = SMB_VFS_WRITE(fsp, data, n);
|
||||
lerrno = errno;
|
||||
|
||||
SMB_VFS_LSEEK(fsp, curr, SEEK_SET);
|
||||
errno = lerrno;
|
||||
|
||||
errno = ENOSYS;
|
||||
result = -1;
|
||||
#endif /* HAVE_PWRITE */
|
||||
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user