summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 49456fbce..707a4f72d 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5284,8 +5284,8 @@ out:
}
int
-glusterfs_symlink (glusterfs_handle_t handle, const char *oldpath,
- const char *newpath)
+glusterfs_glh_symlink (glusterfs_handle_t handle, const char *oldpath,
+ const char *newpath)
{
int32_t op_ret = -1;
libglusterfs_client_ctx_t *ctx = handle;
@@ -5355,6 +5355,29 @@ out:
return op_ret;
}
+int
+glusterfs_symlink (const char *oldpath, const char *newpath)
+{
+ struct vmp_entry *entry = NULL;
+ char *vpath = NULL;
+ int op_ret = -1;
+
+ GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, oldpath, out);
+ GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, newpath, out);
+
+ entry = libgf_vmp_search_entry ((char *)newpath);
+ if (!entry) {
+ errno = ENODEV;
+ goto out;
+ }
+
+ vpath = libgf_vmp_virtual_path (entry, newpath);
+ op_ret = glusterfs_glh_symlink (entry->handle, oldpath, vpath);
+out:
+ return op_ret;
+}
+
+
int32_t
libgf_client_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,