diff options
author | Shehjar Tikoo <shehjart@zresearch.com> | 2009-04-20 12:35:32 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-21 12:50:06 +0530 |
commit | 6f91c9dc86be9c10467ccb5bc3edde2c5d767b9f (patch) | |
tree | fedcf6a96e964c5e1bcb0fe3d58d7011b5225ad3 /libglusterfsclient/src/libglusterfsclient.c | |
parent | bcc9a67fc22147f54a27a81ee35f4c081a0e6b73 (diff) |
libglusterfsclient: Add VMP-based mkfifo
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 393367e4595..b907ea477e6 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -5075,7 +5075,7 @@ out: } int -glusterfs_mkfifo (glusterfs_handle_t handle, const char *path, mode_t mode) +glusterfs_glh_mkfifo (glusterfs_handle_t handle, const char *path, mode_t mode) { libglusterfs_client_ctx_t *ctx = handle; @@ -5123,6 +5123,27 @@ out: return op_ret; } +int +glusterfs_mkfifo (const char *path, mode_t mode) +{ + 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_mkfifo (entry->handle, vpath, mode); +out: + return op_ret; +} + int32_t libgf_client_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno) |