diff --git a/sys/include/sys/sysproto_posix.h b/sys/include/sys/sysproto_posix.h index 5497c4a..5b9856e 100644 --- a/sys/include/sys/sysproto_posix.h +++ b/sys/include/sys/sysproto_posix.h @@ -754,6 +754,18 @@ int sys_readlink(struct thread *, struct sys_readlink_args *); +struct sys_pipe2_args { + char fildes_l_[PADL_(int *)]; + int * fildes; + char fildes_r_[PADR_(int *)]; + char flags_l_[PADL_(int)]; + int flags; + char flags_r_[PADR_(int)]; +}; + +int sys_pipe2(struct thread *, struct sys_pipe2_args *); + + //Func Defs int sys_invalid(struct thread *, void *); diff --git a/sys/kernel/syscalls_posix.c b/sys/kernel/syscalls_posix.c index 2ec995a..7fc9253 100644 --- a/sys/kernel/syscalls_posix.c +++ b/sys/kernel/syscalls_posix.c @@ -2744,8 +2744,8 @@ { 0, "pipe2", - sys_invalid, - SYSCALL_NOTIMP }, /* 542 - Invalid */ + sys_pipe2, + SYSCALL_VALID }, /* 542 - Invalid */ { 0, "aio_mlock", diff --git a/sys/kernel/vfs_calls.c b/sys/kernel/vfs_calls.c index 3e5759d..cbc479d 100644 --- a/sys/kernel/vfs_calls.c +++ b/sys/kernel/vfs_calls.c @@ -300,3 +300,9 @@ thr->td_retval[0] = 2; return (-1); } + +int sys_pipe2(struct thread *thr, struct sys_pipe2_args *args) { + kprintf("P2: %i\n", args->flags) + + return (0); +}