]> git.tuebingen.mpg.de Git - osl.git/blobdiff - fd.c
Make para_mkdir() static inline and rename it to osl_mkdir().
[osl.git] / fd.c
diff --git a/fd.c b/fd.c
index b0089d3051c0676d4171bcc80c6ed15338e73f2e..95976d6817fba4e6571f4a2ac3eab3673af18353 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -13,6 +13,7 @@
 #include <sys/select.h>
 
 #include "log.h"
+#include "osl.h"
 #include "error.h"
 
 /**
@@ -143,21 +144,6 @@ int para_fchdir(int fd)
        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.
  *
@@ -197,14 +183,14 @@ int mmap_full_file(const char *path, int open_mode, void **map,
                goto out;
        }
        *size = file_status.st_size;
-       ret = -E_EMPTY;
+       ret = -E_OSL_EMPTY;
        DEBUG_LOG("%s: size %zu\n", path, *size);
        if (!*size)
                goto out;
        *map = mmap(NULL, *size, mmap_prot, mmap_flags, fd, 0);
        if (*map == MAP_FAILED) {
                *map = NULL;
-               ret = -E_MMAP;
+               ret = -E_OSL_MMAP;
                goto out;
        }
        ret = 1;