diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2011-09-19 22:49:38 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2011-09-19 22:49:38 +0000 |
commit | 18048b18d280eabba107c5dc4a73844d99731461 (patch) | |
tree | 15abd98db1e03ae1ed275f998136e886ba64841a /sys/compat/linux | |
parent | 16d4e8868ff78c6466c3bf1370aef5d30c8a14bb (diff) |
Add pipe2. Okay miod@
Diffstat (limited to 'sys/compat/linux')
-rw-r--r-- | sys/compat/linux/linux_ipc.c | 20 | ||||
-rw-r--r-- | sys/compat/linux/syscalls.master | 4 |
2 files changed, 21 insertions, 3 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); +} diff --git a/sys/compat/linux/syscalls.master b/sys/compat/linux/syscalls.master index b9ac90f9821..b36acf0085e 100644 --- a/sys/compat/linux/syscalls.master +++ b/sys/compat/linux/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.63 2011/09/19 14:33:14 pirofti Exp $ + $OpenBSD: syscalls.master,v 1.64 2011/09/19 22:49:37 pirofti Exp $ ; $NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -479,7 +479,7 @@ 328 UNIMPL eventfd2 329 UNIMPL epoll_create1 330 UNIMPL dup3 -331 UNIMPL pipe2 +331 STD { int linux_sys_pipe2(int *fdp, int flags); } 332 UNIMPL inotify_init1 333 UNIMPL preadv 334 UNIMPL pwritev |