note a leak that needs fixing eventually
[trinity.git] / syscalls / pread64.c
blob49efb408732f671dbc75458b5d1d9f05a113613c
1 /*
2 * SYSCALL_DEFINE(pread64)(unsigned int fd, char __user *buf, size_t count, loff_t pos)
3 */
4 #include "random.h"
5 #include "sanitise.h"
6 #include "shm.h"
8 static void sanitise_pread64(int childno)
11 retry_pos:
12 if ((int) shm->syscall[childno].a4 < 0) {
13 shm->syscall[childno].a4 = rand64();
14 goto retry_pos;
18 struct syscallentry syscall_pread64 = {
19 .name = "pread64",
20 .num_args = 4,
21 .sanitise = sanitise_pread64,
22 .arg1name = "fd",
23 .arg1type = ARG_FD,
24 .arg2name = "buf",
25 .arg2type = ARG_ADDRESS,
26 .arg3name = "count",
27 .arg3type = ARG_LEN,
28 .arg4name = "pos",
29 .flags = NEED_ALARM,