summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfsclient/src')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c25
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.h5
2 files changed, 27 insertions, 3 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index f8fa1492e..160df1cb3 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5480,8 +5480,8 @@ out:
}
char *
-glusterfs_realpath (glusterfs_handle_t handle, const char *path,
- char *resolved_path)
+glusterfs_glh_realpath (glusterfs_handle_t handle, const char *path,
+ char *resolved_path)
{
char *buf = NULL, *extra_buf = NULL;
char *rpath = NULL;
@@ -5664,6 +5664,27 @@ err:
return NULL;
}
+char *
+glusterfs_realpath (const char *path, char *resolved_path)
+{
+ struct vmp_entry *entry = NULL;
+ char *vpath = NULL;
+ char *res = 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);
+ res = glusterfs_glh_realpath (entry->handle, vpath, resolved_path);
+out:
+ return res;
+}
+
static struct xlator_fops libgf_client_fops = {
};
diff --git a/libglusterfsclient/src/libglusterfsclient.h b/libglusterfsclient/src/libglusterfsclient.h
index e4187d82a..93476a6a2 100755
--- a/libglusterfsclient/src/libglusterfsclient.h
+++ b/libglusterfsclient/src/libglusterfsclient.h
@@ -259,9 +259,12 @@ int
glusterfs_mknod(const char *pathname, mode_t mode, dev_t dev);
char *
-glusterfs_realpath (glusterfs_handle_t handle, const char *path,
+glusterfs_glh_realpath (glusterfs_handle_t handle, const char *path,
char *resolved_path);
+char *
+glusterfs_realpath (const char *path, char *resolved_path);
+
int
glusterfs_mount (char *vmp, glusterfs_init_params_t *ipars);