summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/syscall.c29
-rw-r--r--libglusterfs/src/syscall.h15
2 files changed, 43 insertions, 1 deletions
diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c
index dc257f6cfcc..eb0c1cf983a 100644
--- a/libglusterfs/src/syscall.c
+++ b/libglusterfs/src/syscall.c
@@ -15,6 +15,7 @@
#include <utime.h>
#include <sys/time.h>
#include <fcntl.h>
+#include <unistd.h>
int
sys_lstat (const char *path, struct stat *buf)
@@ -268,6 +269,34 @@ sys_write (int fd, const void *buf, size_t count)
}
+ssize_t
+sys_preadv (int fd, const struct iovec *iov, int iovcnt, off_t offset)
+{
+ return preadv (fd, iov, iovcnt, offset);
+}
+
+
+ssize_t
+sys_pwritev (int fd, const struct iovec *iov, int iovcnt, off_t offset)
+{
+ return pwritev (fd, iov, iovcnt, offset);
+}
+
+
+ssize_t
+sys_pread (int fd, void *buf, size_t count, off_t offset)
+{
+ return pread (fd, buf, count, offset);
+}
+
+
+ssize_t
+sys_pwrite (int fd, const void *buf, size_t count, off_t offset)
+{
+ return pwrite (fd, buf, count, offset);
+}
+
+
off_t
sys_lseek (int fd, off_t offset, int whence)
{
diff --git a/libglusterfs/src/syscall.h b/libglusterfs/src/syscall.h
index 037f6c64acb..10b70927415 100644
--- a/libglusterfs/src/syscall.h
+++ b/libglusterfs/src/syscall.h
@@ -192,6 +192,19 @@ sys_access (const char *pathname, int mode);
int
sys_ftruncate (int fd, off_t length);
-int sys_fallocate(int fd, int mode, off_t offset, off_t len);
+int
+sys_fallocate(int fd, int mode, off_t offset, off_t len);
+
+ssize_t
+sys_preadv (int fd, const struct iovec *iov, int iovcnt, off_t offset);
+
+ssize_t
+sys_pwritev (int fd, const struct iovec *iov, int iovcnt, off_t offset);
+
+ssize_t
+sys_pread(int fd, void *buf, size_t count, off_t offset);
+
+ssize_t
+sys_pwrite(int fd, const void *buf, size_t count, off_t offset);
#endif /* __SYSCALL_H__ */