vfs: remove unused function vfs_pread_data()
authorMichael Adam <obnox@samba.org>
Fri, 13 Jun 2014 09:39:41 +0000 (11:39 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 13 Jun 2014 15:29:10 +0000 (17:29 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/proto.h
source3/smbd/vfs.c

index 3c6accfb71ef521c5817452b7bd075cc56026714..1e17f5b741a1ffe4d09c6e6c3df7d444bfd19668 100644 (file)
@@ -1129,8 +1129,6 @@ 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_pread_data(files_struct *fsp, char *buf,
-                size_t byte_count, off_t offset);
 ssize_t vfs_write_data(struct smb_request *req,
                        files_struct *fsp,
                        const char *buffer,
index 897bf1f338e37f2ca1dec7ceb49c83853415fa6a..d5390ed0ca3e850f3e9423ce366c566464e18143 100644 (file)
@@ -393,28 +393,6 @@ ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count)
        return (ssize_t)total;
 }
 
-ssize_t vfs_pread_data(files_struct *fsp, char *buf,
-                size_t byte_count, off_t offset)
-{
-       size_t total=0;
-
-       while (total < byte_count)
-       {
-               ssize_t ret = SMB_VFS_PREAD(fsp, buf + total,
-                                       byte_count - total, offset + 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.
 ****************************************************************************/