s3: VFS: Default. Move vfs_read_data() out of source3/smbd/vfs.c to the printing...
authorJeremy Allison <jra@samba.org>
Mon, 30 Apr 2018 17:15:49 +0000 (10:15 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 2 May 2018 20:20:23 +0000 (22:20 +0200)
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

source3/printing/nt_printing.c
source3/smbd/proto.h
source3/smbd/vfs.c

index 54357b787f3e738e398e2ef9abb86dd479fa7a57..bf54fd4e6b3d661ce36fd00b48d78c119f1dfddd 100644 (file)
@@ -311,6 +311,34 @@ const char *get_short_archi(const char *long_archi)
        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
index 4417595df3a9a7fe1f1ba34f00d35773a57a862d..81350469c28e1ce771fa5ee6b47d48b8779aa3f2 100644 (file)
@@ -1228,7 +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_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,
index f659c8f2783cb42f3851413297f289a624803a96..47abf45496bbac79683e95f600a8c3396eaaf031 100644 (file)
@@ -398,31 +398,6 @@ NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname)
        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.
 ****************************************************************************/