1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3: VFS: Remove vfs_write_data(). No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2018-05-02 16:44:23 -07:00 committed by Ralph Boehme
parent 394ac908c1
commit 25bad32993
3 changed files with 0 additions and 52 deletions

View File

@ -313,7 +313,6 @@ const char *get_short_archi(const char *long_archi)
/****************************************************************************
Read data from fsp on the vfs.
(note: EINTR re-read differs from vfs_write_data)
****************************************************************************/
static ssize_t printing_pread_data(files_struct *fsp,

View File

@ -1228,10 +1228,6 @@ void sys_utmp_yield(const char *username, const char *hostname,
bool vfs_init_custom(connection_struct *conn, const char *vfs_object);
bool smbd_vfs_init(connection_struct *conn);
NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname);
ssize_t vfs_write_data(struct smb_request *req,
files_struct *fsp,
const char *buffer,
size_t N);
ssize_t vfs_pwrite_data(struct smb_request *req,
files_struct *fsp,
const char *buffer,

View File

@ -398,53 +398,6 @@ NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname)
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
/****************************************************************************
Write data to a fd on the vfs.
****************************************************************************/
ssize_t vfs_write_data(struct smb_request *req,
files_struct *fsp,
const char *buffer,
size_t N)
{
size_t total=0;
ssize_t ret;
if (req && req->unread_bytes) {
int sockfd = req->xconn->transport.sock;
int old_flags;
SMB_ASSERT(req->unread_bytes == N);
/* VFS_RECVFILE must drain the socket
* before returning. */
req->unread_bytes = 0;
/* Ensure the socket is blocking. */
old_flags = fcntl(sockfd, F_GETFL, 0);
if (set_blocking(sockfd, true) == -1) {
return (ssize_t)-1;
}
ret = SMB_VFS_RECVFILE(sockfd,
fsp,
(off_t)-1,
N);
if (fcntl(sockfd, F_SETFL, old_flags) == -1) {
return (ssize_t)-1;
}
return ret;
}
while (total < N) {
ret = SMB_VFS_WRITE(fsp, buffer + total, N - total);
if (ret == -1)
return -1;
if (ret == 0)
return total;
total += ret;
}
return (ssize_t)total;
}
ssize_t vfs_pwrite_data(struct smb_request *req,
files_struct *fsp,
const char *buffer,