summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-20 12:35:17 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-21 12:50:02 +0530
commitbcc9a67fc22147f54a27a81ee35f4c081a0e6b73 (patch)
tree05ce2b98ab25ceae8cd0fc48e0d591cbd066e044 /libglusterfsclient/src/libglusterfsclient.c
parenta7205e78bfb962d9e5ff11db2a0b394e6db03256 (diff)
libglusterfsclient: Add VMP-based mknod
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 2ab95d1f5..393367e45 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5006,8 +5006,8 @@ out:
}
int
-glusterfs_mknod(glusterfs_handle_t handle, const char *path, mode_t mode,
- dev_t dev)
+glusterfs_glh_mknod(glusterfs_handle_t handle, const char *path, mode_t mode,
+ dev_t dev)
{
libglusterfs_client_ctx_t *ctx = handle;
loc_t loc = {0, };
@@ -5054,6 +5054,27 @@ out:
}
int
+glusterfs_mknod(const char *pathname, mode_t mode, dev_t dev)
+{
+ struct vmp_entry *entry = NULL;
+ char *vpath = NULL;
+ int op_ret = -1;
+
+ GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, pathname, out);
+
+ entry = libgf_vmp_search_entry ((char *)pathname);
+ if (!entry) {
+ errno = ENODEV;
+ goto out;
+ }
+
+ vpath = libgf_vmp_virtual_path (entry, pathname);
+ op_ret = glusterfs_glh_mknod (entry->handle, vpath, mode, dev);
+out:
+ return op_ret;
+}
+
+int
glusterfs_mkfifo (glusterfs_handle_t handle, const char *path, mode_t mode)
{