gpfs: Rename wrapper for gpfs_lib_init
authorChristof Schmitt <cs@samba.org>
Wed, 10 Dec 2014 22:34:59 +0000 (15:34 -0700)
committerChristof Schmitt <cs@samba.org>
Mon, 2 Mar 2015 21:31:08 +0000 (22:31 +0100)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/modules/gpfs.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_gpfs.h

index f67b38c5f0ffaf808dde67d5c7b90d81459e925f..b90d42292ed78145704758a13933d4e740606b23 100644 (file)
@@ -179,6 +179,16 @@ int gpfswrap_ftruncate(int fd, gpfs_off64_t length)
        return gpfs_ftruncate_fn(fd, length);
 }
 
+int gpfswrap_lib_init(int flags)
+{
+       if (gpfs_lib_init_fn == NULL) {
+               errno = ENOSYS;
+               return -1;
+       }
+
+       return gpfs_lib_init_fn(flags);
+}
+
 bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
                        uint32 share_access)
 {
@@ -323,17 +333,6 @@ int get_gpfs_fset_id(const char *pathname, int *fset_id)
        return err;
 }
 
-void smbd_gpfs_lib_init()
-{
-       if (gpfs_lib_init_fn) {
-               int rc = gpfs_lib_init_fn(0);
-               DEBUG(10, ("gpfs_lib_init() finished with rc %d "
-                          "and errno %d\n", rc, errno));
-       } else {
-               DEBUG(10, ("libgpfs lacks gpfs_lib_init\n"));
-       }
-}
-
 static void timespec_to_gpfs_time(struct timespec ts, gpfs_timestruc_t *gt,
                                  int idx, int *flags)
 {
index 03cded11bc523773baa0ad0125f6fea962af3d0e..883894d5a4a9f66c8c8b4da04e6d20e4b6265462 100644 (file)
@@ -1858,7 +1858,7 @@ static int vfs_gpfs_connect(struct vfs_handle_struct *handle,
        struct gpfs_config_data *config;
        int ret;
 
-       smbd_gpfs_lib_init();
+       gpfswrap_lib_init(0);
 
        config = talloc_zero(handle->conn, struct gpfs_config_data);
        if (!config) {
index 3e040227e03c4eda27da3124e7083d11695816a9..9d7ed542f3e24a28a96db84a6745ef11a2c81503 100644 (file)
@@ -39,6 +39,7 @@ 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);
+int gpfswrap_lib_init(int flags);
 bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
                        uint32 share_access);
 int set_gpfs_lease(int fd, int leasetype);
@@ -46,5 +47,3 @@ 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);
 int smbd_gpfs_set_times_path(char *path, struct smb_file_time *ft);
-
-void smbd_gpfs_lib_init(void);