diff options
| author | Shehjar Tikoo <shehjart@zresearch.com> | 2009-04-07 05:40:12 -0700 | 
|---|---|---|
| committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-08 15:06:00 +0530 | 
| commit | 353f30ad17c9ace576df47abedf71054d8eb434e (patch) | |
| tree | 8869cebf6cfd0441e752f2083bce95dc096d858d /libglusterfsclient/src/libglusterfsclient.c | |
| parent | 957ae7ba2ba7b8276dab963b7af7dbf16eeb5888 (diff) | |
libglusterfsclient: Return EEXIST on lookup success in glusterfs_mkdir
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
| -rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 9602492a625..6dcda493201 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;  	}  | 
