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 getsockopt2().



details:   https://anonhg.NetBSD.org/src/rev/f8a1d68bdc1e
branches:  trunk
changeset: 365093:f8a1d68bdc1e
user:      rjs <rjs%NetBSD.org@localhost>
date:      Tue Jul 31 21:00:02 2018 +0000

description:
Add getsockopt2().

diffstat:

 sys/compat/netbsd32/netbsd32_netbsd.c |  24 ++++++++++++++++++++++--
 sys/compat/netbsd32/syscalls.master   |   5 +++--
 2 files changed, 25 insertions(+), 4 deletions(-)

diffs (64 lines):

diff -r a12e8d74d391 -r f8a1d68bdc1e sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Jul 31 20:54:18 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Jul 31 21:00:02 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.216 2018/05/06 13:40:51 kamil Exp $      */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.217 2018/07/31 21:00:02 rjs 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.216 2018/05/06 13:40:51 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.217 2018/07/31 21:00:02 rjs Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -1040,6 +1040,26 @@
 }
 
 int
+netbsd32_getsockopt2(struct lwp *l, const struct netbsd32_getsockopt2_args *uap, register_t *retval)
+{
+       /* {
+               syscallarg(int) s;
+               syscallarg(int) level;
+               syscallarg(int) name;
+               syscallarg(netbsd32_voidp) val;
+               syscallarg(netbsd32_intp) avalsize;
+       } */
+       struct sys_getsockopt2_args ua;
+
+       NETBSD32TO64_UAP(s);
+       NETBSD32TO64_UAP(level);
+       NETBSD32TO64_UAP(name);
+       NETBSD32TOP_UAP(val, void);
+       NETBSD32TOP_UAP(avalsize, socklen_t);
+       return (sys_getsockopt2(l, &ua, retval));
+}
+
+int
 netbsd32_rename(struct lwp *l, const struct netbsd32_rename_args *uap, register_t *retval)
 {
        /* {
diff -r a12e8d74d391 -r f8a1d68bdc1e sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master       Tue Jul 31 20:54:18 2018 +0000
+++ b/sys/compat/netbsd32/syscalls.master       Tue Jul 31 21:00:02 2018 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.122 2018/07/12 10:46:48 maxv Exp $
+       $NetBSD: syscalls.master,v 1.123 2018/07/31 21:00:02 rjs Exp $
 
 ;      from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;      @(#)syscalls.master     8.2 (Berkeley) 1/13/94
@@ -384,7 +384,8 @@
 191    STD             { netbsd32_long|netbsd32||pathconf(netbsd32_charp path, \
                            int name); }
 192    STD             { netbsd32_long|netbsd32||fpathconf(int fd, int name); }
-193    UNIMPL
+193    STD             { int|netbsd32||getsockopt2(int s, int level, int name, \
+                           netbsd32_voidp val, netbsd32_intp avalsize); }
 194    STD             { int|netbsd32||getrlimit(int which, \
                            netbsd32_rlimitp_t rlp); }
 195    STD             { int|netbsd32||setrlimit(int which, \



Home | Main Index | Thread Index | Old Index