summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_misc.c
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2008-11-12 12:35:50 +0000
committerad <ad@NetBSD.org>2008-11-12 12:35:50 +0000
commit0efea177e37295fed654875d875160c47500d6bd (patch)
tree9d0589344a5d07b9a511a2e81ebbd701744d03b5 /sys/compat/linux/common/linux_misc.c
parent0f81d3e0a26c2833cd085c472a4a77c325486b75 (diff)
Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
Diffstat (limited to 'sys/compat/linux/common/linux_misc.c')
-rw-r--r--sys/compat/linux/common/linux_misc.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c
index 7712e6697fa..3c2b96b0341 100644
--- a/sys/compat/linux/common/linux_misc.c
+++ b/sys/compat/linux/common/linux_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.201 2008/06/24 11:18:15 ad Exp $ */
+/* $NetBSD: linux_misc.c,v 1.202 2008/11/12 12:36:10 ad Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,11 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.201 2008/06/24 11:18:15 ad Exp $");
-
-#if defined(_KERNEL_OPT)
-#include "opt_ptrace.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.202 2008/11/12 12:36:10 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1040,13 +1036,9 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe
syscallarg(T) addr;
syscallarg(T) data;
} */
-#if defined(PTRACE) || defined(_LKM)
const int *ptr;
int request;
int error;
-#ifdef _LKM
-#define sys_ptrace (*sysent[SYS_ptrace].sy_call)
-#endif
ptr = linux_ptrace_request_map;
request = SCARG(uap, request);
@@ -1062,13 +1054,13 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe
/*
* Linux ptrace(PTRACE_CONT, pid, 0, 0) means actually
* to continue where the process left off previously.
- * The same thing is achieved by addr == (void *) 1
+ * The same thing is achieved by addr == (void *) 1
* on NetBSD, so rewrite 'addr' appropriately.
*/
if (request == LINUX_PTRACE_CONT && SCARG(uap, addr)==0)
SCARG(&pta, addr) = (void *) 1;
- error = sys_ptrace(l, &pta, retval);
+ error = sysent[SYS_ptrace].sy_call(l, &pta, retval);
if (error)
return error;
switch (request) {
@@ -1088,9 +1080,6 @@ linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, registe
ptr++;
return LINUX_SYS_PTRACE_ARCH(l, uap, retval);
-#else
- return ENOSYS;
-#endif /* PTRACE || _LKM */
}
int