]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: default: Remove fallback if we don't have HAVE_PWRITE set. Samba doesn't...
authorJeremy Allison <jra@samba.org>
Wed, 2 May 2018 23:35:41 +0000 (16:35 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 4 May 2018 20:34:25 +0000 (22:34 +0200)
Start of the changes to remove synchronous VFS write.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_default.c

index 7c93d9a26b39c15493f9a8c3160f46b80e422325..63252ea865b1780d8f4d3a0ab993206fc6b0d3dd 100644 (file)
@@ -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;