summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs-wrap.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-05-14 10:59:01 +0000
committerAlexander Bokovoy <ab@samba.org>2003-05-14 10:59:01 +0000
commitbc2a3748e9caa8f60f7c2387e7eecd7fb3fae899 (patch)
treea687d4517c20de0efbb94721f8301628f3a529a6 /source3/smbd/vfs-wrap.c
parentdf641bc7caceab142372a279a2844df187c86597 (diff)
downloadsamba-bc2a3748e9caa8f60f7c2387e7eecd7fb3fae899.tar.gz
samba-bc2a3748e9caa8f60f7c2387e7eecd7fb3fae899.tar.bz2
samba-bc2a3748e9caa8f60f7c2387e7eecd7fb3fae899.zip
Prefix VFS API macros with SMB_ for consistency and to avoid problems with VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
(This used to be commit c2689ed118b490e49497a76ed6a2251262018769)
Diffstat (limited to 'source3/smbd/vfs-wrap.c')
-rw-r--r--source3/smbd/vfs-wrap.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c
index 9f0995d398..64e29bbe43 100644
--- a/source3/smbd/vfs-wrap.c
+++ b/source3/smbd/vfs-wrap.c
@@ -93,7 +93,7 @@ int vfswrap_mkdir(vfs_handle_struct *handle, connection_struct *conn, const char
* mess up any inherited ACL bits that were set. JRA.
*/
int saved_errno = errno; /* We may get ENOSYS */
- if ((VFS_CHMOD_ACL(conn, path, mode) == -1) && (errno == ENOSYS))
+ if ((SMB_VFS_CHMOD_ACL(conn, path, mode) == -1) && (errno == ENOSYS))
errno = saved_errno;
}
@@ -281,7 +281,7 @@ int vfswrap_chmod(vfs_handle_struct *handle, connection_struct *conn, const char
{
int saved_errno = errno; /* We might get ENOSYS */
- if ((result = VFS_CHMOD_ACL(conn, path, mode)) == 0) {
+ if ((result = SMB_VFS_CHMOD_ACL(conn, path, mode)) == 0) {
END_PROFILE(syscall_chmod);
return result;
}
@@ -308,7 +308,7 @@ int vfswrap_fchmod(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t
{
int saved_errno = errno; /* We might get ENOSYS */
- if ((result = VFS_FCHMOD_ACL(fsp, fd, mode)) == 0) {
+ if ((result = SMB_VFS_FCHMOD_ACL(fsp, fd, mode)) == 0) {
END_PROFILE(syscall_chmod);
return result;
}
@@ -391,14 +391,14 @@ int vfswrap_utime(vfs_handle_struct *handle, connection_struct *conn, const char
static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T len)
{
SMB_STRUCT_STAT st;
- SMB_OFF_T currpos = VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
+ SMB_OFF_T currpos = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
unsigned char zero_space[4096];
SMB_OFF_T space_to_write;
if (currpos == -1)
return -1;
- if (VFS_FSTAT(fsp, fd, &st) == -1)
+ if (SMB_VFS_FSTAT(fsp, fd, &st) == -1)
return -1;
space_to_write = len - st.st_size;
@@ -416,7 +416,7 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
return sys_ftruncate(fd, len);
/* Write out the real space on disk. */
- if (VFS_LSEEK(fsp, fd, st.st_size, SEEK_SET) != st.st_size)
+ if (SMB_VFS_LSEEK(fsp, fd, st.st_size, SEEK_SET) != st.st_size)
return -1;
space_to_write = len - st.st_size;
@@ -426,7 +426,7 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
SMB_OFF_T retlen;
SMB_OFF_T current_len_to_write = MIN(sizeof(zero_space),space_to_write);
- retlen = VFS_WRITE(fsp,fsp->fd,(char *)zero_space,current_len_to_write);
+ retlen = SMB_VFS_WRITE(fsp,fsp->fd,(char *)zero_space,current_len_to_write);
if (retlen <= 0)
return -1;
@@ -434,7 +434,7 @@ static int strict_allocate_ftruncate(vfs_handle_struct *handle, files_struct *fs
}
/* Seek to where we were */
- if (VFS_LSEEK(fsp, fd, currpos, SEEK_SET) != currpos)
+ if (SMB_VFS_LSEEK(fsp, fd, currpos, SEEK_SET) != currpos)
return -1;
return 0;
@@ -468,7 +468,7 @@ int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_
/* According to W. R. Stevens advanced UNIX prog. Pure 4.3 BSD cannot
extend a file with ftruncate. Provide alternate implementation
for this */
- currpos = VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
+ currpos = SMB_VFS_LSEEK(fsp, fd, 0, SEEK_CUR);
if (currpos == -1) {
goto done;
}
@@ -477,7 +477,7 @@ int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_
size in which case the ftruncate above should have
succeeded or shorter, in which case seek to len - 1 and
write 1 byte of zero */
- if (VFS_FSTAT(fsp, fd, &st) == -1) {
+ if (SMB_VFS_FSTAT(fsp, fd, &st) == -1) {
goto done;
}
@@ -498,14 +498,14 @@ int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_
goto done;
}
- if (VFS_LSEEK(fsp, fd, len-1, SEEK_SET) != len -1)
+ if (SMB_VFS_LSEEK(fsp, fd, len-1, SEEK_SET) != len -1)
goto done;
- if (VFS_WRITE(fsp, fd, &c, 1)!=1)
+ if (SMB_VFS_WRITE(fsp, fd, &c, 1)!=1)
goto done;
/* Seek to where we were */
- if (VFS_LSEEK(fsp, fd, currpos, SEEK_SET) != currpos)
+ if (SMB_VFS_LSEEK(fsp, fd, currpos, SEEK_SET) != currpos)
goto done;
result = 0;