xref: /aosp_15_r20/external/ltp/include/lapi/splice.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker /*
3*49cdfc7eSAndroid Build Coastguard Worker  * Copyright (c) International Business Machines  Corp., 2007
4*49cdfc7eSAndroid Build Coastguard Worker  * Copyright (c) 2014 Fujitsu Ltd.
5*49cdfc7eSAndroid Build Coastguard Worker  */
6*49cdfc7eSAndroid Build Coastguard Worker 
7*49cdfc7eSAndroid Build Coastguard Worker #ifndef LAPI_SPLICE_H__
8*49cdfc7eSAndroid Build Coastguard Worker #define LAPI_SPLICE_H__
9*49cdfc7eSAndroid Build Coastguard Worker 
10*49cdfc7eSAndroid Build Coastguard Worker #include "config.h"
11*49cdfc7eSAndroid Build Coastguard Worker #include "lapi/syscalls.h"
12*49cdfc7eSAndroid Build Coastguard Worker 
13*49cdfc7eSAndroid Build Coastguard Worker #if !defined(HAVE_SPLICE)
splice(int fd_in,loff_t * off_in,int fd_out,loff_t * off_out,size_t len,unsigned int flags)14*49cdfc7eSAndroid Build Coastguard Worker static inline ssize_t splice(int fd_in, loff_t *off_in, int fd_out,
15*49cdfc7eSAndroid Build Coastguard Worker                              loff_t *off_out, size_t len, unsigned int flags)
16*49cdfc7eSAndroid Build Coastguard Worker {
17*49cdfc7eSAndroid Build Coastguard Worker 	return tst_syscall(__NR_splice, fd_in, off_in,
18*49cdfc7eSAndroid Build Coastguard Worker 		fd_out, off_out, len, flags);
19*49cdfc7eSAndroid Build Coastguard Worker }
20*49cdfc7eSAndroid Build Coastguard Worker #endif
21*49cdfc7eSAndroid Build Coastguard Worker 
22*49cdfc7eSAndroid Build Coastguard Worker #endif /* LAPI_SPLICE_H__ */
23