summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 4b8807be1eb..737487d1d72 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -59,17 +59,14 @@ struct dnscache6 {
/* works similar to mkdir(1) -p.
- * @start returns the point in path from which components were created
- * @start is -1 if the entire path existed before.
*/
int
-mkdir_p (char *path, mode_t mode, gf_boolean_t allow_symlinks, int *start)
+mkdir_p (char *path, mode_t mode, gf_boolean_t allow_symlinks)
{
int i = 0;
int ret = -1;
char dir[PATH_MAX] = {0,};
struct stat stbuf = {0,};
- int created = -1;
strcpy (dir, path);
i = (dir[0] == '/')? 1: 0;
@@ -85,9 +82,6 @@ mkdir_p (char *path, mode_t mode, gf_boolean_t allow_symlinks, int *start)
goto out;
}
- if (ret && errno == EEXIST)
- created = i;
-
if (ret && errno == EEXIST && !allow_symlinks) {
ret = lstat (dir, &stbuf);
if (ret)
@@ -113,8 +107,6 @@ mkdir_p (char *path, mode_t mode, gf_boolean_t allow_symlinks, int *start)
}
ret = 0;
- if (start)
- *start = created;
out:
return ret;