gpfs: Rename wrapper for gpfs_ftruncate
[samba.git] / source3 / modules / gpfs.c
index d0296039dbb2f7efcf90e61c1fee36d39263794a..f67b38c5f0ffaf808dde67d5c7b90d81459e925f 100644 (file)
@@ -37,7 +37,7 @@ static int (*gpfs_set_winattrs_path_fn)(char *pathname, int flags,
 static int (*gpfs_get_winattrs_path_fn)(char *pathname,
                                        struct gpfs_winattr *attrs);
 static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs);
-static int (*gpfs_prealloc_fn)(int fd, gpfs_off64_t startOffset, gpfs_off64_t bytesToPrealloc);
+static int (*gpfs_prealloc_fn)(int fd, gpfs_off64_t start, gpfs_off64_t bytes);
 static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length);
 static int (*gpfs_lib_init_fn)(int flags);
 static int (*gpfs_set_times_path_fn)(char *pathname, int flags,
@@ -149,6 +149,36 @@ int gpfswrap_get_winattrs_path(char *pathname, struct gpfs_winattr *attrs)
        return gpfs_get_winattrs_path_fn(pathname, attrs);
 }
 
+int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs)
+{
+       if (gpfs_get_winattrs_fn == NULL) {
+               errno = ENOSYS;
+               return -1;
+       }
+
+       return gpfs_get_winattrs_fn(fd, attrs);
+}
+
+int gpfswrap_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes)
+{
+       if (gpfs_prealloc_fn == NULL) {
+               errno = ENOSYS;
+               return -1;
+       }
+
+       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)
 {
@@ -214,36 +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 smbd_fget_gpfs_winattrs(int fd, struct gpfs_winattr *attrs)
-{
-       if (gpfs_get_winattrs_fn == NULL) {
-                errno = ENOSYS;
-                return -1;
-        }
-        DEBUG(10, ("gpfs_get_winattrs:open call %d\n", fd));
-        return gpfs_get_winattrs_fn(fd, attrs);
-}
-
-int smbd_gpfs_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes)
-{
-       if (gpfs_prealloc_fn == NULL) {
-               errno = ENOSYS;
-               return -1;
-       }
-
-       return gpfs_prealloc_fn(fd, start, bytes);
-}
-
 int get_gpfs_quota(const char *pathname, int type, int id,
                   struct gpfs_quotaInfo *qi)
 {