Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/compat/linux/common/linux_misc.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/compat/linux/common/linux_misc.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.201.10.1 retrieving revision 1.202 diff -u -p -r1.201.10.1 -r1.202 --- src/sys/compat/linux/common/linux_misc.c 2010/04/21 00:27:26 1.201.10.1 +++ src/sys/compat/linux/common/linux_misc.c 2008/11/12 12:36:10 1.202 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.201.10.1 2010/04/21 00:27:26 matt 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 -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.201.10.1 2010/04/21 00:27:26 matt 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 #include @@ -804,12 +800,8 @@ again: } /* if we squished out the whole block, try again */ - if (outp == (void *)SCARG(uap, dent)) { - if (cookiebuf) - free(cookiebuf, M_TEMP); - cookiebuf = NULL; + if (outp == (void *)SCARG(uap, dent)) goto again; - } fp->f_offset = off; /* update the vnode offset */ if (oldcall) @@ -1044,13 +1036,9 @@ linux_sys_ptrace(struct lwp *l, const st 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); @@ -1066,13 +1054,13 @@ linux_sys_ptrace(struct lwp *l, const st /* * 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) { @@ -1092,9 +1080,6 @@ linux_sys_ptrace(struct lwp *l, const st ptr++; return LINUX_SYS_PTRACE_ARCH(l, uap, retval); -#else - return ENOSYS; -#endif /* PTRACE || _LKM */ } int