]> git.tuebingen.mpg.de Git - osl.git/commitdiff
Make some functions static.
authorAndre Noll <maan@systemlinux.org>
Mon, 26 May 2008 21:13:13 +0000 (23:13 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 26 May 2008 21:13:13 +0000 (23:13 +0200)
And remove the "para" prefix while we're at it.

fd.h
osl.c

diff --git a/fd.h b/fd.h
index 80f484a4427d8c5042af45e6ad6d4aef5be4f8ed..c3fec805d908ef49e13d6cb7269fba488eddf6d2 100644 (file)
--- a/fd.h
+++ b/fd.h
@@ -6,7 +6,6 @@
 
 /** \file fd.h exported symbols from fd.c */
 
-int write_all(int fd, const char *buf, size_t *len);
 int para_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);
diff --git a/osl.c b/osl.c
index 5786939088bf9ef0147694fca40be43f320d6b7e..ded1e5327cd8bb175d629cf89820eeccb06b01ab 100644 (file)
--- a/osl.c
+++ b/osl.c
@@ -104,7 +104,7 @@ __printf_2_3 void __log(int ll, const char* fmt,...)
  *
  * \sa lseek(2).
  */
-int para_lseek(int fd, off_t *offset, int whence)
+static int __lseek(int fd, off_t *offset, int whence)
 {
        *offset = lseek(fd, *offset, whence);
        int ret = -E_LSEEK;
@@ -128,7 +128,7 @@ int para_lseek(int fd, off_t *offset, int whence)
  *
  * \sa write(2).
  */
-ssize_t para_write(int fd, const void *buf, size_t size)
+static ssize_t __write(int fd, const void *buf, size_t size)
 {
        ssize_t ret;
 
@@ -155,12 +155,12 @@ ssize_t para_write(int fd, const void *buf, size_t size)
  *
  * \sa para_write().
  */
-ssize_t para_write_all(int fd, const void *buf, size_t size)
+static ssize_t write_all(int fd, const void *buf, size_t size)
 {
 //     DEBUG_LOG("writing %zu bytes\n", size);
        const char *b = buf;
        while (size) {
-               ssize_t ret = para_write(fd, b, size);
+               ssize_t ret = __write(fd, b, size);
 //             DEBUG_LOG("ret: %zd\n", ret);
                if (ret < 0)
                        return ret;
@@ -189,7 +189,7 @@ int para_write_file(const char *filename, const void *buf, size_t size)
        if (ret < 0)
                return ret;
        fd = ret;
-       ret = para_write_all(fd, buf, size);
+       ret = write_all(fd, buf, size);
        if (ret < 0)
                goto out;
        ret = 1;
@@ -209,16 +209,16 @@ static int append_file(const char *filename, char *header, size_t header_size,
                return ret;
        fd = ret;
        if (header && header_size) {
-               ret = para_write_all(fd, header, header_size);
+               ret = write_all(fd, header, header_size);
                if (ret < 0)
                        goto out;
        }
-       ret = para_write_all(fd, data, data_size);
+       ret = write_all(fd, data, data_size);
        if (ret < 0)
                goto out;
        if (new_pos) {
                off_t offset = 0;
-               ret = para_lseek(fd, &offset, SEEK_END);
+               ret = __lseek(fd, &offset, SEEK_END);
                if (ret < 0)
                        goto out;
 //             DEBUG_LOG("new file size: " FMT_OFF_T "\n", offset);