2 * SYSCALL_DEFINE4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags)
8 # define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
9 # define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
10 (but we may still block on the fd
11 we splice from/to). */
12 # define SPLICE_F_MORE 4 /* Expect more data. */
13 # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
15 static void sanitise_tee(int childno
)
17 if ((rand() % 10) > 0) {
18 shm
->syscall
[childno
].a1
= shm
->pipe_fds
[rand() % MAX_PIPE_FDS
];
19 shm
->syscall
[childno
].a2
= shm
->pipe_fds
[rand() % MAX_PIPE_FDS
];
23 struct syscallentry syscall_tee
= {
36 .values
= { SPLICE_F_MOVE
, SPLICE_F_NONBLOCK
, SPLICE_F_MORE
, SPLICE_F_GIFT
},
38 .sanitise
= sanitise_tee
,