diff options
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 0914cbaa4a3..eca466fffdc 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -3962,8 +3962,8 @@ out: } int -glusterfs_chown (glusterfs_handle_t handle, const char *path, uid_t owner, - gid_t group) +glusterfs_glh_chown (glusterfs_handle_t handle, const char *path, uid_t owner, + gid_t group) { int op_ret = -1; libglusterfs_client_ctx_t *ctx = handle; @@ -3994,6 +3994,27 @@ out: return op_ret; } +int +glusterfs_chown (const char *path, uid_t owner, gid_t group) +{ + struct vmp_entry *entry = NULL; + int op_ret = -1; + char *vpath = NULL; + + GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, path, out); + + entry = libgf_vmp_search_entry ((char *)path); + if (!entry) { + errno = ENODEV; + goto out; + } + + vpath = libgf_vmp_virtual_path (entry, path); + op_ret = glusterfs_glh_chown (entry->handle, vpath, owner, group); +out: + return op_ret; +} + glusterfs_dir_t glusterfs_opendir (glusterfs_handle_t handle, const char *path) { |