diff options
author | Christof Schmitt <cs@samba.org> | 2014-12-10 15:33:23 -0700 |
---|---|---|
committer | Christof Schmitt <cs@samba.org> | 2015-03-02 22:31:08 +0100 |
commit | eefb916192d7e58c21bee35ef3420a4b3f0a3ae0 (patch) | |
tree | 9648158ce8b38b8e539ac6c1469fae4b9cd0254c /source3/modules | |
parent | 15c2b3a825b2f24629d1bc22d2bdcfec494cde13 (diff) | |
download | samba-eefb916192d7e58c21bee35ef3420a4b3f0a3ae0.tar.gz samba-eefb916192d7e58c21bee35ef3420a4b3f0a3ae0.tar.xz samba-eefb916192d7e58c21bee35ef3420a4b3f0a3ae0.zip |
gpfs: Rename wrapper for gpfs_ftruncate
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/gpfs.c | 20 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.h | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index eb200ff25f..f67b38c5f0 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -169,6 +169,16 @@ int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes) return gpfs_prealloc_fn(fd, start, bytes); } +int gpfswrap_ftruncate(int fd, gpfs_off64_t length) +{ + if (gpfs_ftruncate_fn == NULL) { + errno = ENOSYS; + return -1; + } + + return gpfs_ftruncate_fn(fd, length); +} + bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access) { @@ -234,16 +244,6 @@ int set_gpfs_lease(int fd, int leasetype) return gpfswrap_set_lease(fd, gpfs_type); } -int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length) -{ - if (gpfs_ftruncate_fn == NULL) { - errno = ENOSYS; - return -1; - } - - return gpfs_ftruncate_fn(fd, length); -} - int get_gpfs_quota(const char *pathname, int type, int id, struct gpfs_quotaInfo *qi) { diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 8860803906..03cded11bc 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1787,7 +1787,7 @@ static int vfs_gpfs_ftruncate(vfs_handle_struct *handle, files_struct *fsp, return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, len); } - result = smbd_gpfs_ftruncate(fsp->fh->fd, len); + result = gpfswrap_ftruncate(fsp->fh->fd, len); if ((result == -1) && (errno == ENOSYS)) { return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, len); } diff --git a/source3/modules/vfs_gpfs.h b/source3/modules/vfs_gpfs.h index 83a4a612d9..3e040227e0 100644 --- a/source3/modules/vfs_gpfs.h +++ b/source3/modules/vfs_gpfs.h @@ -38,10 +38,10 @@ int gpfswrap_set_winattrs_path(char *pathname, int flags, int gpfswrap_get_winattrs_path(char *pathname, struct gpfs_winattr *attrs); int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs); int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes); +int gpfswrap_ftruncate(int fd, gpfs_off64_t length); bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access); int set_gpfs_lease(int fd, int leasetype); -int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length); int get_gpfs_quota(const char *pathname, int type, int id, struct gpfs_quotaInfo *qi); int get_gpfs_fset_id(const char *pathname, int *fset_id); |