mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
[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>
This commit is contained in:
parent
3a326a2ce8
commit
529565dcb1
2 changed files with 46 additions and 15 deletions
|
@ -569,8 +569,11 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
|
|||
asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
|
||||
int flags, int mode);
|
||||
asmlinkage long sys_unshare(unsigned long unshare_flags);
|
||||
asmlinkage long sys_splice(int fdin, int fdout, size_t len,
|
||||
unsigned int flags);
|
||||
|
||||
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);
|
||||
|
||||
asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
|
||||
int flags);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue