]> git.tuebingen.mpg.de Git - osl.git/commitdiff
Rename para_open() to osl_open().
authorAndre Noll <maan@systemlinux.org>
Thu, 29 May 2008 20:28:46 +0000 (22:28 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 29 May 2008 20:28:46 +0000 (22:28 +0200)
fd.c
fd.h
osl.c

diff --git a/fd.c b/fd.c
index c7c4f0f203a3ea2b39657b2345fe2049d9bc414a..b0089d3051c0676d4171bcc80c6ed15338e73f2e 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -54,7 +54,7 @@ int write_all(int fd, const char *buf, size_t *len)
  *
  * \sa open(2).
  */
-int para_open(const char *path, int flags, mode_t mode)
+int osl_open(const char *path, int flags, mode_t mode)
 {
        int ret = open(path, flags, mode);
 
@@ -108,7 +108,7 @@ int para_opendir(const char *dirname, DIR **dir, int *cwd)
        int ret;
 
        if (cwd) {
-               ret = para_open(".", O_RDONLY, 0);
+               ret = osl_open(".", O_RDONLY, 0);
                if (ret < 0)
                        return ret;
                *cwd = ret;
@@ -173,7 +173,7 @@ int para_mkdir(const char *path, mode_t mode)
  *
  * \return Standard.
  *
- * \sa para_open(), mmap(2).
+ * \sa osl_open(), mmap(2).
  */
 int mmap_full_file(const char *path, int open_mode, void **map,
                size_t *size, int *fd_ptr)
@@ -188,7 +188,7 @@ int mmap_full_file(const char *path, int open_mode, void **map,
                mmap_prot = PROT_READ | PROT_WRITE;
                mmap_flags = MAP_SHARED;
        }
-       ret = para_open(path, open_mode, 0);
+       ret = osl_open(path, open_mode, 0);
        if (ret < 0)
                return ret;
        fd = ret;
diff --git a/fd.h b/fd.h
index c3fec805d908ef49e13d6cb7269fba488eddf6d2..a01f920e9acb9c46baa1007d4f74da31f4d60778 100644 (file)
--- a/fd.h
+++ b/fd.h
@@ -6,7 +6,7 @@
 
 /** \file fd.h exported symbols from fd.c */
 
-int para_open(const char *path, int flags, mode_t mode);
+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);
diff --git a/osl.c b/osl.c
index 1d5db11ef4c65b32bca5f546596b5d1668262d5c..6369ceb5093d9ee5566e015d64a68049f6faa09a 100644 (file)
--- a/osl.c
+++ b/osl.c
@@ -176,16 +176,13 @@ static ssize_t write_all(int fd, const void *buf, size_t size)
  * \param buf The buffer to write to the file.
  * \param size The size of \a buf.
  *
- * \return Positive on success, negative on errors. Possible errors include:
- * any errors from para_open() or para_write().
- *
- * \sa para_open(), para_write().
+ * \return Standard.
  */
 static int write_file(const char *filename, const void *buf, size_t size)
 {
        int ret, fd;
 
-       ret = para_open(filename, O_WRONLY | O_CREAT | O_EXCL, 0644);
+       ret = osl_open(filename, O_WRONLY | O_CREAT | O_EXCL, 0644);
        if (ret < 0)
                return ret;
        fd = ret;
@@ -204,7 +201,7 @@ static int append_file(const char *filename, char *header, size_t header_size,
        int ret, fd;
 
 //     DEBUG_LOG("appending %zu  + %zu bytes\n", header_size, data_size);
-       ret = para_open(filename, O_WRONLY | O_CREAT | O_APPEND, 0644);
+       ret = osl_open(filename, O_WRONLY | O_CREAT | O_APPEND, 0644);
        if (ret < 0)
                return ret;
        fd = ret;
@@ -696,7 +693,7 @@ int osl_create_table(const struct osl_table_description *desc)
                        goto out;
                INFO_LOG("filename: %s\n", filename);
                if (cd->storage_type == OSL_MAPPED_STORAGE) {
-                       ret = para_open(filename, O_RDWR | O_CREAT | O_EXCL,
+                       ret = osl_open(filename, O_RDWR | O_CREAT | O_EXCL,
                                0644);
                        free(filename);
                        if (ret < 0)