return 1;
}
-/**
- * A wrapper for mkdir(2).
- *
- * \param path Name of the directory to create.
- * \param mode The permissions to use.
- *
- * \return Standard.
- */
-int para_mkdir(const char *path, mode_t mode)
-{
- if (!mkdir(path, mode))
- return 1;
- return -ERRNO_TO_ERROR(errno);
-}
-
/**
* Open a file and map it into memory.
*
int osl_open(const char *path, int flags, mode_t mode);
int para_opendir(const char *dirname, DIR **dir, int *cwd);
-int para_mkdir(const char *path, mode_t mode);
int para_fchdir(int fd);
int mmap_full_file(const char *filename, int open_mode, void **map,
size_t *size, int *fd_ptr);
int para_munmap(void *start, size_t length);
+
+/**
+ * A wrapper for mkdir(2).
+ *
+ * \param path Name of the directory to create.
+ * \param mode The permissions to use.
+ *
+ * \return Standard.
+ */
+static inline int osl_mkdir(const char *path, mode_t mode)
+{
+ if (!mkdir(path, mode))
+ return 1;
+ return -ERRNO_TO_ERROR(errno);
+}
+
if (cd->storage_type == OSL_NO_STORAGE)
continue;
if (!table_dir) {
- ret = para_mkdir(desc->dir, 0777);
+ ret = osl_mkdir(desc->dir, 0777);
if (ret < 0 && !is_errno(-ret, EEXIST))
goto out;
table_dir = make_message("%s/%s", desc->dir,
ret = -ERRNO_TO_ERROR(ENOMEM);
if (!table_dir)
goto out;
- ret = para_mkdir(table_dir, 0777);
+ ret = osl_mkdir(table_dir, 0777);
if (ret < 0)
goto out;
}
continue;
}
/* DISK STORAGE */
- ret = para_mkdir(filename, 0777);
+ ret = osl_mkdir(filename, 0777);
free(filename);
if (ret < 0)
goto out;
dirname = disk_storage_dirname(t, col_num, ds_name);
if (!dirname)
return -ERRNO_TO_ERROR(ENOMEM);
- ret = para_mkdir(dirname, 0777);
+ ret = osl_mkdir(dirname, 0777);
free(dirname);
if (ret < 0 && !is_errno(-ret, EEXIST))
return ret;