From 76f1680a2de05420934e131f934f3895fbe50db8 Mon Sep 17 00:00:00 2001 From: Kaleb S KEITHLEY Date: Mon, 7 Dec 2015 10:22:05 -0500 Subject: core: add preadv, pwritev, pread, pwrite syscall wrappers add additional system calls plus pick up a couple missed unwrapped system calls that seem to have slipped into the master branch. Change-Id: If268ccd5e9a139ac3ffd38293c67cd2f62ea5b58 BUG: 1289258 Signed-off-by: Kaleb S KEITHLEY Reviewed-on: http://review.gluster.org/12895 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Niels de Vos --- libglusterfs/src/syscall.c | 29 +++++++++++++++++++++++++++++ libglusterfs/src/syscall.h | 15 ++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) (limited to 'libglusterfs') 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 #include #include +#include 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__ */ -- cgit