summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-05 14:53:08 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-06 01:47:43 +0200
commit6aa12fcb30c8f7246fd0215b1d808191c0d87668 (patch)
tree92eb805ea2ed03b1e42f6ce55ca26a65a92761fb /source3/modules
parent48166468fe3ca515dae3431bbe674809489f743c (diff)
downloadsamba-6aa12fcb30c8f7246fd0215b1d808191c0d87668.tar.gz
samba-6aa12fcb30c8f7246fd0215b1d808191c0d87668.tar.bz2
samba-6aa12fcb30c8f7246fd0215b1d808191c0d87668.zip
build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/onefs.h4
-rw-r--r--source3/modules/onefs_streams.c4
-rw-r--r--source3/modules/onefs_system.c8
-rw-r--r--source3/modules/vfs_aio_fork.c2
-rw-r--r--source3/modules/vfs_cacheprime.c12
-rw-r--r--source3/modules/vfs_commit.c14
-rw-r--r--source3/modules/vfs_crossrename.c4
-rw-r--r--source3/modules/vfs_default.c30
-rw-r--r--source3/modules/vfs_full_audit.c22
-rw-r--r--source3/modules/vfs_gpfs.c6
-rw-r--r--source3/modules/vfs_gpfs_hsm_notify.c4
-rw-r--r--source3/modules/vfs_onefs.c4
-rw-r--r--source3/modules/vfs_prealloc.c10
-rw-r--r--source3/modules/vfs_readahead.c8
-rw-r--r--source3/modules/vfs_recycle.c20
-rw-r--r--source3/modules/vfs_smb_traffic_analyzer.c8
-rw-r--r--source3/modules/vfs_streams_depot.c4
-rw-r--r--source3/modules/vfs_streams_xattr.c14
-rw-r--r--source3/modules/vfs_time_audit.c24
-rw-r--r--source3/modules/vfs_tsmsm.c6
20 files changed, 104 insertions, 104 deletions
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index 1f72a9f207..b12a67e367 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -163,10 +163,10 @@ int onefs_sys_create_file(connection_struct *conn,
int *granted_oplock);
ssize_t onefs_sys_sendfile(connection_struct *conn, int tofd, int fromfd,
- const DATA_BLOB *header, SMB_OFF_T offset,
+ const DATA_BLOB *header, off_t offset,
size_t count);
-ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T offset,
+ssize_t onefs_sys_recvfile(int fromfd, int tofd, off_t offset,
size_t count);
void init_stat_ex_from_onefs_stat(struct stat_ex *dst, const struct stat *src);
diff --git a/source3/modules/onefs_streams.c b/source3/modules/onefs_streams.c
index c79619922c..0a1d98c809 100644
--- a/source3/modules/onefs_streams.c
+++ b/source3/modules/onefs_streams.c
@@ -547,8 +547,8 @@ struct streaminfo_state {
static bool add_one_stream(TALLOC_CTX *mem_ctx, unsigned int *num_streams,
struct stream_struct **streams,
- const char *name, SMB_OFF_T size,
- SMB_OFF_T alloc_size)
+ const char *name, off_t size,
+ off_t alloc_size)
{
struct stream_struct *tmp;
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index 05b033181e..07272cc86b 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -230,7 +230,7 @@ int onefs_sys_create_file(connection_struct *conn,
* FreeBSD based sendfile implementation that allows for atomic semantics.
*/
static ssize_t onefs_sys_do_sendfile(int tofd, int fromfd,
- const DATA_BLOB *header, SMB_OFF_T offset, size_t count, bool atomic)
+ const DATA_BLOB *header, off_t offset, size_t count, bool atomic)
{
size_t total=0;
struct sf_hdtr hdr;
@@ -258,7 +258,7 @@ static ssize_t onefs_sys_do_sendfile(int tofd, int fromfd,
total = count;
while (total + hdtrl.iov_len) {
- SMB_OFF_T nwritten;
+ off_t nwritten;
int ret;
/*
@@ -330,7 +330,7 @@ static ssize_t onefs_sys_do_sendfile(int tofd, int fromfd,
* Handles the subtleties of using sendfile with CIFS.
*/
ssize_t onefs_sys_sendfile(connection_struct *conn, int tofd, int fromfd,
- const DATA_BLOB *header, SMB_OFF_T offset,
+ const DATA_BLOB *header, off_t offset,
size_t count)
{
bool atomic = false;
@@ -536,7 +536,7 @@ static char *get_spill_buffer(size_t new_count)
* from the socket into the buffer, the spill buffer is then written with a
* standard pwrite.
*/
-ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T offset,
+ssize_t onefs_sys_recvfile(int fromfd, int tofd, off_t offset,
size_t count)
{
char *spill_buffer = NULL;
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index fa3db933a3..0d928cb522 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -78,7 +78,7 @@ fail:
struct rw_cmd {
size_t n;
- SMB_OFF_T offset;
+ off_t offset;
bool read_cmd;
};
diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c
index bd11797f6b..65e63e2b39 100644
--- a/source3/modules/vfs_cacheprime.c
+++ b/source3/modules/vfs_cacheprime.c
@@ -49,13 +49,13 @@ static void * g_readbuf = NULL;
static bool prime_cache(
struct vfs_handle_struct * handle,
files_struct * fsp,
- SMB_OFF_T offset,
+ off_t offset,
size_t count)
{
- SMB_OFF_T * last;
+ off_t * last;
ssize_t nread;
- last = (SMB_OFF_T *)VFS_ADD_FSP_EXTENSION(handle, fsp, SMB_OFF_T, NULL);
+ last = (off_t *)VFS_ADD_FSP_EXTENSION(handle, fsp, off_t, NULL);
if (!last) {
return False;
}
@@ -134,7 +134,7 @@ static ssize_t cprime_sendfile(
int tofd,
files_struct * fromfsp,
const DATA_BLOB * header,
- SMB_OFF_T offset,
+ off_t offset,
size_t count)
{
if (g_readbuf && offset == 0) {
@@ -151,7 +151,7 @@ static ssize_t cprime_read(
void * data,
size_t count)
{
- SMB_OFF_T offset;
+ off_t offset;
offset = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
if (offset >= 0 && g_readbuf) {
@@ -167,7 +167,7 @@ static ssize_t cprime_pread(
files_struct * fsp,
void * data,
size_t count,
- SMB_OFF_T offset)
+ off_t offset)
{
if (g_readbuf) {
prime_cache(handle, fsp, offset, count);
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index af1f98b20f..865250a5d8 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -68,11 +68,11 @@ enum eof_mode
struct commit_info
{
/* For chunk-based commits */
- SMB_OFF_T dbytes; /* Dirty (uncommitted) bytes */
- SMB_OFF_T dthresh; /* Dirty data threshold */
+ off_t dbytes; /* Dirty (uncommitted) bytes */
+ off_t dthresh; /* Dirty data threshold */
/* For commits on EOF */
enum eof_mode on_eof;
- SMB_OFF_T eof; /* Expected file size */
+ off_t eof; /* Expected file size */
};
static int commit_do(
@@ -121,7 +121,7 @@ static int commit_all(
static int commit(
struct vfs_handle_struct * handle,
files_struct * fsp,
- SMB_OFF_T offset,
+ off_t offset,
ssize_t last_write)
{
struct commit_info *c;
@@ -183,7 +183,7 @@ static int commit_open(
int flags,
mode_t mode)
{
- SMB_OFF_T dthresh;
+ off_t dthresh;
const char *eof_mode;
struct commit_info *c = NULL;
int fd;
@@ -261,7 +261,7 @@ static ssize_t commit_pwrite(
files_struct * fsp,
const void * data,
size_t count,
- SMB_OFF_T offset)
+ off_t offset)
{
ssize_t ret;
@@ -287,7 +287,7 @@ static int commit_close(
static int commit_ftruncate(
vfs_handle_struct * handle,
files_struct * fsp,
- SMB_OFF_T len)
+ off_t len)
{
int result;
diff --git a/source3/modules/vfs_crossrename.c b/source3/modules/vfs_crossrename.c
index a38ae45948..19a182c453 100644
--- a/source3/modules/vfs_crossrename.c
+++ b/source3/modules/vfs_crossrename.c
@@ -22,7 +22,7 @@
#include "smbprofile.h"
#define MODULE "crossrename"
-static SMB_OFF_T module_sizelimit;
+static off_t module_sizelimit;
static int crossrename_connect(
struct vfs_handle_struct * handle,
@@ -35,7 +35,7 @@ static int crossrename_connect(
return ret;
}
- module_sizelimit = (SMB_OFF_T) lp_parm_int(SNUM(handle->conn),
+ module_sizelimit = (off_t) lp_parm_int(SNUM(handle->conn),
MODULE, "sizelimit", 20);
/* convert from MiB to byte: */
module_sizelimit *= 1048576;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 9704f5edbb..cf2bdb05c5 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -534,7 +534,7 @@ static ssize_t vfswrap_read(vfs_handle_struct *handle, files_struct *fsp, void *
}
static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void *data,
- size_t n, SMB_OFF_T offset)
+ size_t n, off_t offset)
{
ssize_t result;
@@ -550,7 +550,7 @@ static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void
}
#else /* HAVE_PREAD */
- SMB_OFF_T curr;
+ off_t curr;
int lerrno;
curr = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
@@ -588,7 +588,7 @@ static ssize_t vfswrap_write(vfs_handle_struct *handle, files_struct *fsp, const
}
static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, const void *data,
- size_t n, SMB_OFF_T offset)
+ size_t n, off_t offset)
{
ssize_t result;
@@ -603,7 +603,7 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
}
#else /* HAVE_PWRITE */
- SMB_OFF_T curr;
+ off_t curr;
int lerrno;
curr = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
@@ -626,9 +626,9 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
return result;
}
-static SMB_OFF_T vfswrap_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T offset, int whence)
+static off_t vfswrap_lseek(vfs_handle_struct *handle, files_struct *fsp, off_t offset, int whence)
{
- SMB_OFF_T result = 0;
+ off_t result = 0;
START_PROFILE(syscall_lseek);
@@ -653,7 +653,7 @@ static SMB_OFF_T vfswrap_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB
}
static ssize_t vfswrap_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *hdr,
- SMB_OFF_T offset, size_t n)
+ off_t offset, size_t n)
{
ssize_t result;
@@ -666,7 +666,7 @@ static ssize_t vfswrap_sendfile(vfs_handle_struct *handle, int tofd, files_struc
static ssize_t vfswrap_recvfile(vfs_handle_struct *handle,
int fromfd,
files_struct *tofsp,
- SMB_OFF_T offset,
+ off_t offset,
size_t n)
{
ssize_t result;
@@ -1361,9 +1361,9 @@ static int vfswrap_ntimes(vfs_handle_struct *handle,
allocate is set.
**********************************************************************/
-static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T len)
+static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fsp, off_t len)
{
- SMB_OFF_T space_to_write;
+ off_t space_to_write;
uint64_t space_avail;
uint64_t bsize,dfree,dsize;
int ret;
@@ -1428,7 +1428,7 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
return 0;
}
-static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T len)
+static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, off_t len)
{
int result = -1;
SMB_STRUCT_STAT *pst;
@@ -1499,8 +1499,8 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_O
static int vfswrap_fallocate(vfs_handle_struct *handle,
files_struct *fsp,
enum vfs_fallocate_mode mode,
- SMB_OFF_T offset,
- SMB_OFF_T len)
+ off_t offset,
+ off_t len)
{
int result;
@@ -1517,7 +1517,7 @@ static int vfswrap_fallocate(vfs_handle_struct *handle,
return result;
}
-static bool vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+static bool vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int op, off_t offset, off_t count, int type)
{
bool result;
@@ -1536,7 +1536,7 @@ static int vfswrap_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
return 0;
}
-static bool vfswrap_getlock(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
+static bool vfswrap_getlock(vfs_handle_struct *handle, files_struct *fsp, off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid)
{
bool result;
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 4457860d2e..de4f7996bf 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -952,7 +952,7 @@ static ssize_t smb_full_audit_read(vfs_handle_struct *handle, files_struct *fsp,
}
static ssize_t smb_full_audit_pread(vfs_handle_struct *handle, files_struct *fsp,
- void *data, size_t n, SMB_OFF_T offset)
+ void *data, size_t n, off_t offset)
{
ssize_t result;
@@ -979,7 +979,7 @@ static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp
static ssize_t smb_full_audit_pwrite(vfs_handle_struct *handle, files_struct *fsp,
const void *data, size_t n,
- SMB_OFF_T offset)
+ off_t offset)
{
ssize_t result;
@@ -991,8 +991,8 @@ static ssize_t smb_full_audit_pwrite(vfs_handle_struct *handle, files_struct *fs
return result;
}
-static SMB_OFF_T smb_full_audit_lseek(vfs_handle_struct *handle, files_struct *fsp,
- SMB_OFF_T offset, int whence)
+static off_t smb_full_audit_lseek(vfs_handle_struct *handle, files_struct *fsp,
+ off_t offset, int whence)
{
ssize_t result;
@@ -1006,7 +1006,7 @@ static SMB_OFF_T smb_full_audit_lseek(vfs_handle_struct *handle, files_struct *f
static ssize_t smb_full_audit_sendfile(vfs_handle_struct *handle, int tofd,
files_struct *fromfsp,
- const DATA_BLOB *hdr, SMB_OFF_T offset,
+ const DATA_BLOB *hdr, off_t offset,
size_t n)
{
ssize_t result;
@@ -1021,7 +1021,7 @@ static ssize_t smb_full_audit_sendfile(vfs_handle_struct *handle, int tofd,
static ssize_t smb_full_audit_recvfile(vfs_handle_struct *handle, int fromfd,
files_struct *tofsp,
- SMB_OFF_T offset,
+ off_t offset,
size_t n)
{
ssize_t result;
@@ -1229,7 +1229,7 @@ static int smb_full_audit_ntimes(vfs_handle_struct *handle,
}
static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
- SMB_OFF_T len)
+ off_t len)
{
int result;
@@ -1243,8 +1243,8 @@ static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp
static int smb_full_audit_fallocate(vfs_handle_struct *handle, files_struct *fsp,
enum vfs_fallocate_mode mode,
- SMB_OFF_T offset,
- SMB_OFF_T len)
+ off_t offset,
+ off_t len)
{
int result;
@@ -1257,7 +1257,7 @@ static int smb_full_audit_fallocate(vfs_handle_struct *handle, files_struct *fsp
}
static bool smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp,
- int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
+ int op, off_t offset, off_t count, int type)
{
bool result;
@@ -1296,7 +1296,7 @@ static int smb_full_audit_linux_setlease(vfs_handle_struct *handle, files_struct
}
static bool smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp,
- SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid)
+ off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid)
{
bool result;
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index fce1b28c64..80f6d6e653 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1261,7 +1261,7 @@ static int vfs_gpfs_ntimes(struct vfs_handle_struct *handle,
static int vfs_gpfs_fallocate(struct vfs_handle_struct *handle,
struct files_struct *fsp, enum vfs_fallocate_mode mode,
- SMB_OFF_T offset, SMB_OFF_T len)
+ off_t offset, off_t len)
{
int ret;
struct gpfs_config_data *config;
@@ -1296,7 +1296,7 @@ static int vfs_gpfs_fallocate(struct vfs_handle_struct *handle,
}
static int vfs_gpfs_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
- SMB_OFF_T len)
+ off_t len)
{
int result;
struct gpfs_config_data *config;
@@ -1368,7 +1368,7 @@ static bool vfs_gpfs_aio_force(struct vfs_handle_struct *handle,
static ssize_t vfs_gpfs_sendfile(vfs_handle_struct *handle, int tofd,
files_struct *fsp, const DATA_BLOB *hdr,
- SMB_OFF_T offset, size_t n)
+ off_t offset, size_t n)
{
if ((fsp->fsp_name->st.vfs_private & GPFS_WINATTR_OFFLINE) != 0) {
errno = ENOSYS;
diff --git a/source3/modules/vfs_gpfs_hsm_notify.c b/source3/modules/vfs_gpfs_hsm_notify.c
index 7ff5355c95..d53363c460 100644
--- a/source3/modules/vfs_gpfs_hsm_notify.c
+++ b/source3/modules/vfs_gpfs_hsm_notify.c
@@ -34,7 +34,7 @@
#include "vfs_gpfs.h"
static ssize_t vfs_gpfs_hsm_notify_pread(vfs_handle_struct *handle, files_struct *fsp,
- void *data, size_t n, SMB_OFF_T offset)
+ void *data, size_t n, off_t offset)
{
ssize_t ret;
@@ -56,7 +56,7 @@ static ssize_t vfs_gpfs_hsm_notify_pread(vfs_handle_struct *handle, files_struct
static ssize_t vfs_gpfs_hsm_notify_pwrite(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- const void *data, size_t n, SMB_OFF_T offset)
+ const void *data, size_t n, off_t offset)
{
ssize_t ret;
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index 5866eb49c8..619e3874a3 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -64,7 +64,7 @@ static int onefs_open(vfs_handle_struct *handle,
static ssize_t onefs_sendfile(vfs_handle_struct *handle, int tofd,
files_struct *fromfsp, const DATA_BLOB *header,
- SMB_OFF_T offset, size_t count)
+ off_t offset, size_t count)
{
ssize_t result;
@@ -76,7 +76,7 @@ static ssize_t onefs_sendfile(vfs_handle_struct *handle, int tofd,
}
static ssize_t onefs_recvfile(vfs_handle_struct *handle, int fromfd,
- files_struct *tofsp, SMB_OFF_T offset,
+ files_struct *tofsp, off_t offset,
size_t count)
{
ssize_t result;
diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c
index 15be7d121b..f67cefbe2f 100644
--- a/source3/modules/vfs_prealloc.c
+++ b/source3/modules/vfs_prealloc.c
@@ -56,7 +56,7 @@
#define MODULE "prealloc"
static int module_debug;
-static int preallocate_space(int fd, SMB_OFF_T size)
+static int preallocate_space(int fd, off_t size)
{
int err;
#ifndef HAVE_GPFS
@@ -170,9 +170,9 @@ static int prealloc_open(vfs_handle_struct* handle,
* truncate calls specially.
*/
if ((flags & O_CREAT) || (flags & O_TRUNC)) {
- SMB_OFF_T * psize;
+ off_t * psize;
- psize = VFS_ADD_FSP_EXTENSION(handle, fsp, SMB_OFF_T, NULL);
+ psize = VFS_ADD_FSP_EXTENSION(handle, fsp, off_t, NULL);
if (psize == NULL || *psize == -1) {
return fd;
}
@@ -201,9 +201,9 @@ normal_open:
static int prealloc_ftruncate(vfs_handle_struct * handle,
files_struct * fsp,
- SMB_OFF_T offset)
+ off_t offset)
{
- SMB_OFF_T *psize;
+ off_t *psize;
int ret = SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
/* Maintain the allocated space even in the face of truncates. */
diff --git a/source3/modules/vfs_readahead.c b/source3/modules/vfs_readahead.c
index b48d95faa9..8cb85c7561 100644
--- a/source3/modules/vfs_readahead.c
+++ b/source3/modules/vfs_readahead.c
@@ -24,8 +24,8 @@ ssize_t readahead(int fd, off_t offset, size_t count);
#endif
struct readahead_data {
- SMB_OFF_T off_bound;
- SMB_OFF_T len;
+ off_t off_bound;
+ off_t len;
bool didmsg;
};
@@ -43,7 +43,7 @@ static ssize_t readahead_sendfile(struct vfs_handle_struct *handle,
int tofd,
files_struct *fromfsp,
const DATA_BLOB *header,
- SMB_OFF_T offset,
+ off_t offset,
size_t count)
{
struct readahead_data *rhd = (struct readahead_data *)handle->data;
@@ -86,7 +86,7 @@ static ssize_t readahead_pread(vfs_handle_struct *handle,
files_struct *fsp,
void *data,
size_t count,
- SMB_OFF_T offset)
+ off_t offset)
{
struct readahead_data *rhd = (struct readahead_data *)handle->data;
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index 80332523ed..37d930f793 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -126,9 +126,9 @@ static const char **recycle_noversions(vfs_handle_struct *handle)
return tmp_lp;
}
-static SMB_OFF_T recycle_maxsize(vfs_handle_struct *handle)
+static off_t recycle_maxsize(vfs_handle_struct *handle)
{
- SMB_OFF_T maxsize;
+ off_t maxsize;
maxsize = conv_str_size(lp_parm_const_string(SNUM(handle->conn),
"recycle", "maxsize", NULL));
@@ -138,9 +138,9 @@ static SMB_OFF_T recycle_maxsize(vfs_handle_struct *handle)
return maxsize;
}
-static SMB_OFF_T recycle_minsize(vfs_handle_struct *handle)
+static off_t recycle_minsize(vfs_handle_struct *handle)
{
- SMB_OFF_T minsize;
+ off_t minsize;
minsize = conv_str_size(lp_parm_const_string(SNUM(handle->conn),
"recycle", "minsize", NULL));
@@ -225,23 +225,23 @@ static bool recycle_file_exist(vfs_handle_struct *handle,
* @param fname file name
* @return size in bytes
**/
-static SMB_OFF_T recycle_get_file_size(vfs_handle_struct *handle,
+static off_t recycle_get_file_size(vfs_handle_struct *handle,
const struct smb_filename *smb_fname)
{
struct smb_filename *smb_fname_tmp = NULL;
NTSTATUS status;
- SMB_OFF_T size;
+ off_t size;
status = copy_smb_filename(talloc_tos(), smb_fname, &smb_fname_tmp);
if (!NT_STATUS_IS_OK(status)) {
- size = (SMB_OFF_T)0;
+ size = (off_t)0;
goto out;
}
if (SMB_VFS_STAT(handle->conn, smb_fname_tmp) != 0) {
DEBUG(0,("recycle: stat for %s returned %s\n",
smb_fname_str_dbg(smb_fname_tmp), strerror(errno)));
- size = (SMB_OFF_T)0;
+ size = (off_t)0;
goto out;
}
@@ -442,8 +442,8 @@ static int recycle_unlink(vfs_handle_struct *handle,
const char *base;
char *repository = NULL;
int i = 1;
- SMB_OFF_T maxsize, minsize;
- SMB_OFF_T file_size; /* space_avail; */
+ off_t maxsize, minsize;
+ off_t file_size; /* space_avail; */
bool exist;
NTSTATUS status;
int rc = -1;
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index 025fbbda90..c728e7d5e9 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -769,7 +769,7 @@ static ssize_t smb_traffic_analyzer_sendfile(vfs_handle_struct *handle,
int tofd,
files_struct *fromfsp,
const DATA_BLOB *hdr,
- SMB_OFF_T offset,
+ off_t offset,
size_t n)
{
struct rw_data s_data;
@@ -787,7 +787,7 @@ static ssize_t smb_traffic_analyzer_sendfile(vfs_handle_struct *handle,
static ssize_t smb_traffic_analyzer_recvfile(vfs_handle_struct *handle,
int fromfd,
files_struct *tofsp,
- SMB_OFF_T offset,
+ off_t offset,
size_t n)
{
struct rw_data s_data;
@@ -820,7 +820,7 @@ static ssize_t smb_traffic_analyzer_read(vfs_handle_struct *handle, \
static ssize_t smb_traffic_analyzer_pread(vfs_handle_struct *handle, \
- files_struct *fsp, void *data, size_t n, SMB_OFF_T offset)
+ files_struct *fsp, void *data, size_t n, off_t offset)
{
struct rw_data s_data;
@@ -853,7 +853,7 @@ static ssize_t smb_traffic_analyzer_write(vfs_handle_struct *handle, \
}
static ssize_t smb_traffic_analyzer_pwrite(vfs_handle_struct *handle, \
- files_struct *fsp, const void *data, size_t n, SMB_OFF_T offset)
+ files_struct *fsp, const void *data, size_t n, off_t offset)
{
struct rw_data s_data;
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index 172a0c634d..f984f75e9f 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -748,8 +748,8 @@ done:
static bool add_one_stream(TALLOC_CTX *mem_ctx, unsigned int *num_streams,
struct stream_struct **streams,
- const char *name, SMB_OFF_T size,
- SMB_OFF_T alloc_size)
+ const char *name, off_t size,
+ off_t alloc_size)
{
struct stream_struct *tmp;
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 2ac0491f28..291531e59a 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -726,8 +726,8 @@ static NTSTATUS walk_xattr_streams(connection_struct *conn, files_struct *fsp,
static bool add_one_stream(TALLOC_CTX *mem_ctx, unsigned int *num_streams,
struct stream_struct **streams,
- const char *name, SMB_OFF_T size,
- SMB_OFF_T alloc_size)
+ const char *name, off_t size,
+ off_t alloc_size)
{
struct stream_struct *tmp;
@@ -843,7 +843,7 @@ static uint32_t streams_xattr_fs_capabilities(struct vfs_handle_struct *handle,
static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle,
files_struct *fsp, const void *data,
- size_t n, SMB_OFF_T offset)
+ size_t n, off_t offset)
{
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
@@ -906,7 +906,7 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle,
static ssize_t streams_xattr_pread(vfs_handle_struct *handle,
files_struct *fsp, void *data,
- size_t n, SMB_OFF_T offset)
+ size_t n, off_t offset)
{
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
@@ -950,7 +950,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle,
static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- SMB_OFF_T offset)
+ off_t offset)
{
int ret;
uint8 *tmp;
@@ -1018,8 +1018,8 @@ static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
static int streams_xattr_fallocate(struct vfs_handle_struct *handle,
struct files_struct *fsp,
enum vfs_fallocate_mode mode,
- SMB_OFF_T offset,
- SMB_OFF_T len)
+ off_t offset,
+ off_t len)
{
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index ac96893cc4..a5ca407673 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -501,7 +501,7 @@ static ssize_t smb_time_audit_read(vfs_handle_struct *handle,
static ssize_t smb_time_audit_pread(vfs_handle_struct *handle,
files_struct *fsp,
- void *data, size_t n, SMB_OFF_T offset)
+ void *data, size_t n, off_t offset)
{
ssize_t result;
struct timespec ts1,ts2;
@@ -542,7 +542,7 @@ static ssize_t smb_time_audit_write(vfs_handle_struct *handle,
static ssize_t smb_time_audit_pwrite(vfs_handle_struct *handle,
files_struct *fsp,
const void *data, size_t n,
- SMB_OFF_T offset)
+ off_t offset)
{
ssize_t result;
struct timespec ts1,ts2;
@@ -560,11 +560,11 @@ static ssize_t smb_time_audit_pwrite(vfs_handle_struct *handle,
return result;
}
-static SMB_OFF_T smb_time_audit_lseek(vfs_handle_struct *handle,
+static off_t smb_time_audit_lseek(vfs_handle_struct *handle,
files_struct *fsp,
- SMB_OFF_T offset, int whence)
+ off_t offset, int whence)
{
- SMB_OFF_T result;
+ off_t result;
struct timespec ts1,ts2;
double timediff;
@@ -582,7 +582,7 @@ static SMB_OFF_T smb_time_audit_lseek(vfs_handle_struct *handle,
static ssize_t smb_time_audit_sendfile(vfs_handle_struct *handle, int tofd,
files_struct *fromfsp,
- const DATA_BLOB *hdr, SMB_OFF_T offset,
+ const DATA_BLOB *hdr, off_t offset,
size_t n)
{
ssize_t result;
@@ -603,7 +603,7 @@ static ssize_t smb_time_audit_sendfile(vfs_handle_struct *handle, int tofd,
static ssize_t smb_time_audit_recvfile(vfs_handle_struct *handle, int fromfd,
files_struct *tofsp,
- SMB_OFF_T offset,
+ off_t offset,
size_t n)
{
ssize_t result;
@@ -909,7 +909,7 @@ static int smb_time_audit_ntimes(vfs_handle_struct *handle,
static int smb_time_audit_ftruncate(vfs_handle_struct *handle,
files_struct *fsp,
- SMB_OFF_T len)
+ off_t len)
{
int result;
struct timespec ts1,ts2;
@@ -930,8 +930,8 @@ static int smb_time_audit_ftruncate(vfs_handle_struct *handle,
static int smb_time_audit_fallocate(vfs_handle_struct *handle,
files_struct *fsp,
enum vfs_fallocate_mode mode,
- SMB_OFF_T offset,
- SMB_OFF_T len)
+ off_t offset,
+ off_t len)
{
int result;
struct timespec ts1,ts2;
@@ -950,7 +950,7 @@ static int smb_time_audit_fallocate(vfs_handle_struct *handle,
}
static bool smb_time_audit_lock(vfs_handle_struct *handle, files_struct *fsp,
- int op, SMB_OFF_T offset, SMB_OFF_T count,
+ int op, off_t offset, off_t count,
int type)
{
bool result;
@@ -1012,7 +1012,7 @@ static int smb_time_audit_linux_setlease(vfs_handle_struct *handle,
static bool smb_time_audit_getlock(vfs_handle_struct *handle,
files_struct *fsp,
- SMB_OFF_T *poffset, SMB_OFF_T *pcount,
+ off_t *poffset, off_t *pcount,
int *ptype, pid_t *ppid)
{
bool result;
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index d7cc050024..8b138d385c 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -298,7 +298,7 @@ static ssize_t tsmsm_aio_return(struct vfs_handle_struct *handle, struct files_s
}
static ssize_t tsmsm_sendfile(vfs_handle_struct *handle, int tofd, files_struct *fsp, const DATA_BLOB *hdr,
- SMB_OFF_T offset, size_t n)
+ off_t offset, size_t n)
{
bool file_offline = tsmsm_aio_force(handle, fsp);
@@ -314,7 +314,7 @@ static ssize_t tsmsm_sendfile(vfs_handle_struct *handle, int tofd, files_struct
/* We do overload pread to allow notification when file becomes online after offline status */
/* We don't intercept SMB_VFS_READ here because all file I/O now goes through SMB_VFS_PREAD instead */
static ssize_t tsmsm_pread(struct vfs_handle_struct *handle, struct files_struct *fsp,
- void *data, size_t n, SMB_OFF_T offset) {
+ void *data, size_t n, off_t offset) {
ssize_t result;
bool notify_online = tsmsm_aio_force(handle, fsp);
@@ -332,7 +332,7 @@ static ssize_t tsmsm_pread(struct vfs_handle_struct *handle, struct files_struct
}
static ssize_t tsmsm_pwrite(struct vfs_handle_struct *handle, struct files_struct *fsp,
- const void *data, size_t n, SMB_OFF_T offset) {
+ const void *data, size_t n, off_t offset) {
ssize_t result;
bool notify_online = tsmsm_aio_force(handle, fsp);