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 rasctl(2). Thanks to the regression...



details:   https://anonhg.NetBSD.org/src/rev/27c6a69b1e4a
branches:  trunk
changeset: 582926:27c6a69b1e4a
user:      cube <cube%NetBSD.org@localhost>
date:      Mon Jul 11 20:18:05 2005 +0000

description:
Add rasctl(2).  Thanks to the regression tests for that syscall, I was able
to discover the bugs in netbsd32_setitimer() and netbsd32_execve().

diffstat:

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

diffs (57 lines):

diff -r 834d9b2a9f7c -r 27c6a69b1e4a sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Mon Jul 11 20:15:26 2005 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Mon Jul 11 20:18:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.94 2005/07/10 14:32:16 cube Exp $        */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.95 2005/07/11 20:18:05 cube Exp $        */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.94 2005/07/10 14:32:16 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.95 2005/07/11 20:18:05 cube Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -2575,3 +2575,19 @@
        NETBSD32TO64_UAP(length);
        return (sys_fsync_range(l, &ua, retval));
 }
+
+int
+netbsd32_rasctl(struct lwp *l, void *v, register_t *retval)
+{
+       struct netbsd32_rasctl_args /* {
+               syscallarg(netbsd32_caddr_t) addr;
+               syscallarg(netbsd32_size_t) len;
+               syscallarg(int) op;
+       } */ *uap = v;
+       struct sys_rasctl_args ua;
+
+       NETBSD32TOX64_UAP(addr, caddr_t);
+       NETBSD32TOX_UAP(len, size_t);
+       NETBSD32TO64_UAP(op);
+       return sys_rasctl(l, &ua, retval);
+}
diff -r 834d9b2a9f7c -r 27c6a69b1e4a sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master       Mon Jul 11 20:15:26 2005 +0000
+++ b/sys/compat/netbsd32/syscalls.master       Mon Jul 11 20:18:05 2005 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.33 2005/07/10 14:32:16 cube Exp $
+       $NetBSD: syscalls.master,v 1.34 2005/07/11 20:18:05 cube Exp $
 
 ;      from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;      @(#)syscalls.master     8.2 (Berkeley) 1/13/94
@@ -540,7 +540,8 @@
                            netbsd32_voidp tramp, int vers); }
 341    UNIMPL
 342    UNIMPL
-343    UNIMPL
+343    STD             { int netbsd32_rasctl(netbsd32_caddr_t addr, netbsd32_size_t len, \
+                           int op); }
 344    UNIMPL
 345    UNIMPL
 346    UNIMPL



Home | Main Index | Thread Index | Old Index