Make static.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed May 2 22:20:23 CEST 2018 on sn-devel-144
return archi_table[i].short_archi;
}
+/****************************************************************************
+ Read data from fsp on the vfs.
+ (note: EINTR re-read differs from vfs_write_data)
+****************************************************************************/
+
+static ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count)
+{
+ size_t total=0;
+
+ while (total < byte_count) {
+ ssize_t ret = SMB_VFS_READ(fsp, buf + total,
+ byte_count - total);
+
+ if (ret == 0) {
+ return total;
+ }
+ if (ret == -1) {
+ if (errno == EINTR) {
+ continue;
+ } else {
+ return -1;
+ }
+ }
+ total += ret;
+ }
+ return (ssize_t)total;
+}
+
/****************************************************************************
Version information in Microsoft files is held in a VS_VERSION_INFO structure.
There are two case to be covered here: PE (Portable Executable) and NE (New
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_read_data(files_struct *fsp, char *buf, size_t byte_count);
ssize_t vfs_write_data(struct smb_request *req,
files_struct *fsp,
const char *buffer,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
-/****************************************************************************
- Read data from fsp on the vfs. (note: EINTR re-read differs from vfs_write_data)
-****************************************************************************/
-
-ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count)
-{
- size_t total=0;
-
- while (total < byte_count)
- {
- ssize_t ret = SMB_VFS_READ(fsp, buf + total,
- byte_count - total);
-
- if (ret == 0) return total;
- if (ret == -1) {
- if (errno == EINTR)
- continue;
- else
- return -1;
- }
- total += ret;
- }
- return (ssize_t)total;
-}
-
/****************************************************************************
Write data to a fd on the vfs.
****************************************************************************/