summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-16 23:54:58 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-17 13:43:26 +0530
commit01a48790c4a0c9805eb55bfe1c60860ee91f48a1 (patch)
treea0f62e9c496ceb0eb37054ff0997060b22bdb85b /libglusterfsclient
parenteb4d5f0074ab6430973188906a8083d26e24e790 (diff)
libglusterfsclient: Add closedir API
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index de9eed55f7f..ea4998f12c0 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -3593,6 +3593,28 @@ out:
return dirfd;
}
+int
+glusterfs_closedir (glusterfs_dir_t dirfd)
+{
+ int op_ret = -1;
+ libglusterfs_client_fd_ctx_t *fdctx = NULL;
+
+ GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, dirfd, out);
+ fdctx = libgf_get_fd_ctx (dirfd);
+
+ if (fdctx == NULL) {
+ errno = EBADF;
+ op_ret = -1;
+ goto out;
+ }
+
+ op_ret = libgf_client_flush (fdctx->ctx, (fd_t *)dirfd);
+ fd_unref ((fd_t *)dirfd);
+
+out:
+ return op_ret;
+}
+
static struct xlator_fops libgf_client_fops = {
};