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 9b94484be39..da10c3b1bbf 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -4828,8 +4828,8 @@ out:  }  int -glusterfs_utimes (glusterfs_handle_t handle, const char *path, -                  const struct timeval times[2]) +glusterfs_glh_utimes (glusterfs_handle_t handle, const char *path, +                        const struct timeval times[2])  {          int32_t                         op_ret = -1;          loc_t                           loc = {0, }; @@ -4873,6 +4873,27 @@ out:  }  int +glusterfs_utimes (const char *path, const struct timeval times[2]) +{ +        struct vmp_entry        *entry = NULL; +        char                    *vpath = NULL; +        int                     op_ret = -1; + +        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_utimes (entry->handle, vpath, times); +out: +        return op_ret; +} + +int  glusterfs_utime (glusterfs_handle_t handle, const char *path,                   const struct utimbuf *buf)  {  | 
