summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-20 12:35:32 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-21 12:50:06 +0530
commit6f91c9dc86be9c10467ccb5bc3edde2c5d767b9f (patch)
treefedcf6a96e964c5e1bcb0fe3d58d7011b5225ad3
parentbcc9a67fc22147f54a27a81ee35f4c081a0e6b73 (diff)
libglusterfsclient: Add VMP-based mkfifo
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c23
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.h7
2 files changed, 29 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)
diff --git a/libglusterfsclient/src/libglusterfsclient.h b/libglusterfsclient/src/libglusterfsclient.h
index 90cdc83e206..b9afe4824fc 100755
--- a/libglusterfsclient/src/libglusterfsclient.h
+++ b/libglusterfsclient/src/libglusterfsclient.h
@@ -318,6 +318,13 @@ glusterfs_glh_utime (glusterfs_handle_t handle, const char *path,
int
glusterfs_utime (const char *path, const struct utimbuf *buf);
+
+int
+glusterfs_glh_mkfifo (glusterfs_handle_t handle, const char *path,
+ mode_t mode);
+
+int
+glusterfs_mkfifo (const char *path, mode_t mode);
/* FIXME: review the need for these apis */
/* added for log related initialization in booster fork implementation */
void