]> wimlib.net Git - wimlib/commitdiff
file_io.c: get rid of raw_pread() and raw_pwrite()
authorEric Biggers <ebiggers3@gmail.com>
Wed, 10 Jun 2015 00:35:04 +0000 (19:35 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 23 Jun 2015 02:17:26 +0000 (21:17 -0500)
include/wimlib/file_io.h
src/file_io.c
src/mount_image.c

index 34c9d40b2bdd268e0bc63d0056613eada6d5ace7..61ae78b9e270aee622376346a68e0eff7ad18af0 100644 (file)
@@ -26,12 +26,6 @@ full_write(struct filedes *fd, const void *buf, size_t n);
 extern int
 full_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset);
 
 extern int
 full_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset);
 
-extern ssize_t
-raw_pread(struct filedes *fd, void *buf, size_t nbyte, off_t offset);
-
-extern ssize_t
-raw_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset);
-
 #ifndef __WIN32__
 #  define O_BINARY 0
 #endif
 #ifndef __WIN32__
 #  define O_BINARY 0
 #endif
index f641aa28d1947569e304536cf475cd145a81a862..26584b9aa6f34f22c4250e1e21ba7fea97b31e2a 100644 (file)
@@ -185,18 +185,6 @@ full_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset)
        return 0;
 }
 
        return 0;
 }
 
-ssize_t
-raw_pread(struct filedes *fd, void *buf, size_t count, off_t offset)
-{
-       return pread(fd->fd, buf, count, offset);
-}
-
-ssize_t
-raw_pwrite(struct filedes *fd, const void *buf, size_t count, off_t offset)
-{
-       return pwrite(fd->fd, buf, count, offset);
-}
-
 off_t filedes_seek(struct filedes *fd, off_t offset)
 {
        if (fd->is_pipe) {
 off_t filedes_seek(struct filedes *fd, off_t offset)
 {
        if (fd->is_pipe) {
index e2f0ffbccac4e4f7498809adaf658fac3a71a631..aaad08c3ca2b7a5a16a354fdf22a47150d5773bb 100644 (file)
@@ -1678,7 +1678,7 @@ wimfs_read(const char *path, char *buf, size_t size,
                        ret = size;
                break;
        case BLOB_IN_STAGING_FILE:
                        ret = size;
                break;
        case BLOB_IN_STAGING_FILE:
-               ret = raw_pread(&fd->f_staging_fd, buf, size, offset);
+               ret = pread(fd->f_staging_fd.fd, buf, size, offset);
                if (ret < 0)
                        ret = -errno;
                break;
                if (ret < 0)
                        ret = -errno;
                break;
@@ -2034,7 +2034,7 @@ wimfs_write(const char *path, const char *buf, size_t size,
        struct wimfs_fd *fd = WIMFS_FD(fi);
        ssize_t ret;
 
        struct wimfs_fd *fd = WIMFS_FD(fi);
        ssize_t ret;
 
-       ret = raw_pwrite(&fd->f_staging_fd, buf, size, offset);
+       ret = pwrite(fd->f_staging_fd.fd, buf, size, offset);
        if (ret < 0)
                return -errno;
 
        if (ret < 0)
                return -errno;