diff options
author | Kaleb S KEITHLEY <kkeithle@redhat.com> | 2015-12-07 10:22:05 -0500 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-12-22 09:11:30 -0800 |
commit | 76f1680a2de05420934e131f934f3895fbe50db8 (patch) | |
tree | 54d7234fa2bef0f9adb43a15ef65db112b0b1ca4 /libglusterfs/src | |
parent | 439de31320315872d988720991e9baaead8712db (diff) |
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 <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/12895
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/syscall.c | 29 | ||||
-rw-r--r-- | libglusterfs/src/syscall.h | 15 |
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__ */ |