gpfs: Rename wrapper for gpfs_get_winattrs_path
authorChristof Schmitt <cs@samba.org>
Wed, 10 Dec 2014 22:27:05 +0000 (15:27 -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 dbcfa323203a2106d7289a05320f259c4b880596..d0296039dbb2f7efcf90e61c1fee36d39263794a 100644 (file)
@@ -34,7 +34,8 @@ static int (*gpfs_get_realfilename_path_fn)(char *pathname, char *filenamep,
                                            int *len);
 static int (*gpfs_set_winattrs_path_fn)(char *pathname, int flags,
                                        struct gpfs_winattr *attrs);
-static int (*gpfs_get_winattrs_path_fn)(char *pathname, struct gpfs_winattr *attrs);
+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_ftruncate_fn)(int fd, gpfs_off64_t length);
@@ -138,6 +139,16 @@ int gpfswrap_set_winattrs_path(char *pathname, int flags,
        return gpfs_set_winattrs_path_fn(pathname, flags, attrs);
 }
 
+int gpfswrap_get_winattrs_path(char *pathname, struct gpfs_winattr *attrs)
+{
+       if (gpfs_get_winattrs_path_fn == NULL) {
+               errno = ENOSYS;
+               return -1;
+       }
+
+       return gpfs_get_winattrs_path_fn(pathname, attrs);
+}
+
 bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
                        uint32 share_access)
 {
@@ -213,16 +224,6 @@ int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length)
        return gpfs_ftruncate_fn(fd, length);
 }
 
-int get_gpfs_winattrs(char *pathname,struct gpfs_winattr *attrs)
-{
-       if (gpfs_get_winattrs_path_fn == NULL) {
-                errno = ENOSYS;
-                return -1;
-        }
-        DEBUG(10, ("gpfs_get_winattrs_path:open call %s\n",pathname));
-        return gpfs_get_winattrs_path_fn(pathname, attrs);
-}
-
 int smbd_fget_gpfs_winattrs(int fd, struct gpfs_winattr *attrs)
 {
        if (gpfs_get_winattrs_fn == NULL) {
index c2a3e14d44d2902603737ef035c843934f94540b..34a2d044b0c2164359cd569ef51465d0ba0f9db5 100644 (file)
@@ -1466,7 +1466,7 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle,  const char *pat
                 return SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size);
         }
 
-        ret = get_gpfs_winattrs(discard_const_p(char, path), &attrs);
+       ret = gpfswrap_get_winattrs_path(discard_const_p(char, path), &attrs);
         if ( ret == -1){
                int dbg_lvl;
 
@@ -1584,7 +1584,7 @@ static int vfs_gpfs_stat(struct vfs_handle_struct *handle,
                errno = map_errno_from_nt_status(status);
                return -1;
        }
-       ret = get_gpfs_winattrs(discard_const_p(char, fname), &attrs);
+       ret = gpfswrap_get_winattrs_path(discard_const_p(char, fname), &attrs);
        TALLOC_FREE(fname);
        if (ret == 0) {
                smb_fname->st.st_ex_calculated_birthtime = false;
@@ -1660,7 +1660,7 @@ static int vfs_gpfs_lstat(struct vfs_handle_struct *handle,
                errno = map_errno_from_nt_status(status);
                return -1;
        }
-       ret = get_gpfs_winattrs(discard_const_p(char, path), &attrs);
+       ret = gpfswrap_get_winattrs_path(discard_const_p(char, path), &attrs);
        TALLOC_FREE(path);
        if (ret == 0) {
                smb_fname->st.st_ex_calculated_birthtime = false;
@@ -1818,7 +1818,7 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
                return -1;
        }
 
-       ret = get_gpfs_winattrs(path, &attrs);
+       ret = gpfswrap_get_winattrs_path(path, &attrs);
        if (ret == -1) {
                TALLOC_FREE(path);
                return false;
index 56374216c6e3d89247e45315d760e151db223a9c..afe2da4e76ef11e458827e0b8073132f42751af3 100644 (file)
@@ -35,11 +35,11 @@ int gpfswrap_putacl(char *pathname, int flags, void *acl);
 int gpfswrap_get_realfilename_path(char *pathname, char *filenamep, int *len);
 int gpfswrap_set_winattrs_path(char *pathname, int flags,
                               struct gpfs_winattr *attrs);
+int gpfswrap_get_winattrs_path(char *pathname, struct gpfs_winattr *attrs);
 bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
                        uint32 share_access);
 int set_gpfs_lease(int fd, int leasetype);
 int smbd_fget_gpfs_winattrs(int fd, struct gpfs_winattr *attrs);
-int get_gpfs_winattrs(char * pathname,struct gpfs_winattr *attrs);
 int smbd_gpfs_prealloc(int fd, gpfs_off64_t start, gpfs_off64_t bytes);
 int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length);
 int get_gpfs_quota(const char *pathname, int type, int id,