From 353f30ad17c9ace576df47abedf71054d8eb434e Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 7 Apr 2009 05:40:12 -0700 Subject: libglusterfsclient: Return EEXIST on lookup success in glusterfs_mkdir Signed-off-by: Anand V. Avati --- libglusterfsclient/src/libglusterfsclient.c | 7 +++---- 1 file 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; } -- cgit