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 dup3 syscall support.



details:   https://anonhg.NetBSD.org/src/rev/66e85cced366
branches:  trunk
changeset: 769111:66e85cced366
user:      njoly <njoly%NetBSD.org@localhost>
date:      Wed Aug 31 16:50:32 2011 +0000

description:
Add dup3 syscall support.

diffstat:

 sys/compat/netbsd32/netbsd32_netbsd.c |  22 ++++++++++++++++++++--
 sys/compat/netbsd32/syscalls.master   |   3 ++-
 2 files changed, 22 insertions(+), 3 deletions(-)

diffs (57 lines):

diff -r 2b426d4190c1 -r 66e85cced366 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Wed Aug 31 16:48:29 2011 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Wed Aug 31 16:50:32 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.172 2011/07/05 14:21:46 njoly Exp $      */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.173 2011/08/31 16:50:32 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.172 2011/07/05 14:21:46 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.173 2011/08/31 16:50:32 njoly Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -2587,6 +2587,24 @@
        return copyout(fd, SCARG_P32(uap, fildes), sizeof(fd));
 }
 
+int
+netbsd32_dup3(struct lwp *l, const struct netbsd32_dup3_args *uap,
+             register_t *retval)
+{
+       /* {
+               syscallarg(int) from;
+               syscallarg(int) to;
+               syscallarg(int) flags;
+       } */
+       struct sys_dup3_args ua;
+
+       NETBSD32TO64_UAP(from);
+       NETBSD32TO64_UAP(to);
+       NETBSD32TO64_UAP(flags);
+
+       return sys_dup3(l, &ua, retval);
+}
+
 /*
  * MI indirect system call support.
  * Only used if the MD netbsd32_syscall.c doesn't intercept the calls.
diff -r 2b426d4190c1 -r 66e85cced366 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master       Wed Aug 31 16:48:29 2011 +0000
+++ b/sys/compat/netbsd32/syscalls.master       Wed Aug 31 16:50:32 2011 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.86 2011/07/05 14:21:47 njoly Exp $
+       $NetBSD: syscalls.master,v 1.87 2011/08/31 16:50:32 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
@@ -972,3 +972,4 @@
 452    STD             { int|netbsd32|50|quotactl(const netbsd32_charp path, \
                            netbsd32_voidp pref); }
 453    STD             { int|netbsd32||pipe2(netbsd32_intp fildes, int flags); }
+454    STD             { int|netbsd32||dup3(int from, int to, int flags); }



Home | Main Index | Thread Index | Old Index