diff options
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
| -rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 24 | 
1 files changed, 23 insertions, 1 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 643add84e1b..2d940ca1626 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -3480,11 +3480,33 @@ out:  }  int -glusterfs_lstat (glusterfs_handle_t handle, const char *path, struct stat *buf) +glusterfs_glh_lstat (glusterfs_handle_t handle, const char *path, struct stat *buf)  {          return __glusterfs_stat (handle, path, buf, LIBGF_DO_LSTAT);  } +int +glusterfs_lstat (const char *path, struct stat *buf) +{ +        struct vmp_entry        *entry = NULL; +        int                     op_ret = -1; +        char                    *vpath = NULL; + +        GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, path, out); +        GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, buf, 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_lstat (entry->handle, vpath, buf); +out: +        return op_ret; +} +  static int32_t  libgf_client_fstat_cbk (call_frame_t *frame,                          void *cookie,  | 
