diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-04-10 09:18:58 -0400 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-04-10 09:18:58 -0400 |
commit | 529565dcb1581c9a1e3f6df1c1763ca3e0f0d512 (patch) | |
tree | e8069cc17f887ad86f8dee0d96640a2f19bf4112 /include/linux/syscalls.h | |
parent | 3a326a2ce88e71d00ac0d133e314a3342a7709f8 (diff) |
[PATCH] splice: add optional input and output offsets
add optional input and output offsets to sys_splice(), for seekable file
descriptors:
asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
int fd_out, loff_t __user *off_out,
size_t len, unsigned int flags);
semantics are straightforward: f_pos will be updated with the offset
provided by user-space, before the splice transfer is about to begin.
Providing a NULL offset pointer means the existing f_pos will be used
(and updated in situ). Providing an offset for a pipe results in
-ESPIPE. Providing an invalid offset pointer results in -EFAULT.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r-- | include/linux/syscalls.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 5717147596b6..4c292faa70c9 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -569,8 +569,11 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | |||
569 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | 569 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, |
570 | int flags, int mode); | 570 | int flags, int mode); |
571 | asmlinkage long sys_unshare(unsigned long unshare_flags); | 571 | asmlinkage long sys_unshare(unsigned long unshare_flags); |
572 | asmlinkage long sys_splice(int fdin, int fdout, size_t len, | 572 | |
573 | unsigned int flags); | 573 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, |
574 | int fd_out, loff_t __user *off_out, | ||
575 | size_t len, unsigned int flags); | ||
576 | |||
574 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | 577 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, |
575 | int flags); | 578 | int flags); |
576 | 579 | ||