diff options
| author | 2011-09-19 22:49:37 +0000 | |
|---|---|---|
| committer | 2011-09-19 22:49:37 +0000 | |
| commit | bda7cb370325bc2b01d7b8c781bbedbf8ec0ad02 (patch) | |
| tree | 231c6756ccfcd20e78b340241edb8dc0a5bd928e /sys/compat/linux/linux_ipc.c | |
| parent | Add a test suite to route ip fragments through a box running pf. (diff) | |
| download | wireguard-openbsd-bda7cb370325bc2b01d7b8c781bbedbf8ec0ad02.tar.xz wireguard-openbsd-bda7cb370325bc2b01d7b8c781bbedbf8ec0ad02.zip | |
Add pipe2. Okay miod@
Diffstat (limited to 'sys/compat/linux/linux_ipc.c')
| -rw-r--r-- | sys/compat/linux/linux_ipc.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 4183249af6a..57d8bf22472 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_ipc.c,v 1.11 2009/09/05 10:28:43 miod Exp $ */ +/* $OpenBSD: linux_ipc.c,v 1.12 2011/09/19 22:49:37 pirofti Exp $ */ /* $NetBSD: linux_ipc.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */ /* @@ -719,3 +719,21 @@ linux_shmctl(p, v, retval) } } #endif /* SYSVSHM */ + +int +linux_sys_pipe2(struct proc *p, void *v, register_t *retval) +{ + struct linux_sys_pipe2_args *uap = v; + struct sys_pipe_args pargs; + + /* + * We don't really support pipe2, but glibc falls back to pipe + * we return signal that. + * / + if (SCARG(uap, flags) != 0) + return ENOSYS; + + /* If no flag is set then the this is a plain pipe call. */ + SCARG(&pargs, fdp) = SCARG(uap, fdp); + return sys_pipe(p, &pargs, retval); +} |
