summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-07 05:40:12 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-08 15:06:00 +0530
commit353f30ad17c9ace576df47abedf71054d8eb434e (patch)
tree8869cebf6cfd0441e752f2083bce95dc096d858d
parent957ae7ba2ba7b8276dab963b7af7dbf16eeb5888 (diff)
libglusterfsclient: Return EEXIST on lookup success in glusterfs_mkdir
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 9602492a6..6dcda4932 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -3363,10 +3363,9 @@ glusterfs_mkdir (glusterfs_handle_t handle,
loc.path = strdup (path);
op_ret = libgf_client_path_lookup (&loc, ctx, 1);
- if (op_ret == -1) {
- gf_log ("libglusterfsclient",
- GF_LOG_ERROR,
- "path lookup failed for (%s)", path);
+ if (op_ret == 0) {
+ op_ret = -1;
+ errno = EEXIST;
goto out;
}