Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Add pipe2 syscall now needed for popen(3).
details: https://anonhg.NetBSD.org/src/rev/bf8f44b768c3
branches: trunk
changeset: 766973:bf8f44b768c3
user: njoly <njoly%NetBSD.org@localhost>
date: Tue Jul 05 14:21:46 2011 +0000
description:
Add pipe2 syscall now needed for popen(3).
diffstat:
sys/compat/netbsd32/netbsd32_netbsd.c | 23 +++++++++++++++++++++--
sys/compat/netbsd32/syscalls.master | 3 ++-
2 files changed, 23 insertions(+), 3 deletions(-)
diffs (58 lines):
diff -r b8980897bd55 -r bf8f44b768c3 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Tue Jul 05 14:15:56 2011 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Tue Jul 05 14:21:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.171 2011/06/05 08:42:59 dsl Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.172 2011/07/05 14:21:46 njoly Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.171 2011/06/05 08:42:59 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.172 2011/07/05 14:21:46 njoly Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -2568,6 +2568,25 @@
return sys__sched_getaffinity(l, &ua, retval);
}
+int
+netbsd32_pipe2(struct lwp *l, const struct netbsd32_pipe2_args *uap,
+ register_t *retval)
+{
+ /* {
+ syscallarg(netbsd32_intp) fildes;
+ syscallarg(int) flags;
+ } */
+ int fd[2], error;
+
+ error = pipe1(l, retval, SCARG(uap, flags));
+ if (error)
+ return error;
+
+ fd[0] = retval[0];
+ fd[1] = retval[1];
+ return copyout(fd, SCARG_P32(uap, fildes), sizeof(fd));
+}
+
/*
* MI indirect system call support.
* Only used if the MD netbsd32_syscall.c doesn't intercept the calls.
diff -r b8980897bd55 -r bf8f44b768c3 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master Tue Jul 05 14:15:56 2011 +0000
+++ b/sys/compat/netbsd32/syscalls.master Tue Jul 05 14:21:46 2011 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.85 2011/03/06 17:08:35 bouyer Exp $
+ $NetBSD: syscalls.master,v 1.86 2011/07/05 14:21:47 njoly Exp $
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -971,3 +971,4 @@
netbsd32_size_t fh_size, netbsd32_statp_t sb); }
452 STD { int|netbsd32|50|quotactl(const netbsd32_charp path, \
netbsd32_voidp pref); }
+453 STD { int|netbsd32||pipe2(netbsd32_intp fildes, int flags); }
Home |
Main Index |
Thread Index |
Old Index