summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 2d940ca16..3ce02e7e9 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -3658,9 +3658,7 @@ out:
int32_t
-glusterfs_mkdir (glusterfs_handle_t handle,
- const char *path,
- mode_t mode)
+glusterfs_glh_mkdir (glusterfs_handle_t handle, const char *path, mode_t mode)
{
libglusterfs_client_ctx_t *ctx = handle;
loc_t loc = {0, };
@@ -3712,6 +3710,27 @@ out:
return op_ret;
}
+int32_t
+glusterfs_mkdir (const char *path, mode_t mode)
+{
+ 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_mkdir (entry->handle, vpath, mode);
+out:
+ return op_ret;
+}
+
static int32_t
libgf_client_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)