summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_exec.c
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>2000-12-11 05:28:59 +0000
committermycroft <mycroft@NetBSD.org>2000-12-11 05:28:59 +0000
commitf495cd9dc643b90d222f9f2d0c1edcfc88b864fc (patch)
tree52389d71cab8de4cd9a317e9ba214db7d875ec08 /sys/compat/linux/common/linux_exec.c
parent105cf3806113d6cb97a836a8c06076a5a5ac6e44 (diff)
Introduce 2 new flags in types.h:
* __HAVE_SYSCALL_INTERN. If this is defined, e_syscall is replaced by e_syscall_intern, which is called at key places in the kernel. This can be used to set a MD syscall handler pointer. This obsoletes and replaces the *_HAS_SEPARATED_SYSCALL flags. * __HAVE_MINIMAL_EMUL. If this is defined, certain (deprecated) elements in struct emul are omitted.
Diffstat (limited to 'sys/compat/linux/common/linux_exec.c')
-rw-r--r--sys/compat/linux/common/linux_exec.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/compat/linux/common/linux_exec.c b/sys/compat/linux/common/linux_exec.c
index 2916801db8f..0d2d8f8b873 100644
--- a/sys/compat/linux/common/linux_exec.c
+++ b/sys/compat/linux/common/linux_exec.c
@@ -1,7 +1,7 @@
-/* $NetBSD: linux_exec.c,v 1.43 2000/12/09 12:38:24 jdolecek Exp $ */
+/* $NetBSD: linux_exec.c,v 1.44 2000/12/11 05:29:01 mycroft Exp $ */
/*-
- * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
+ * Copyright (c) 1994, 1995, 1998, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -69,8 +69,9 @@
extern struct sysent linux_sysent[];
extern const char * const linux_syscallnames[];
extern char linux_sigcode[], linux_esigcode[];
-void linux_syscall __P((void));
+#ifndef __HAVE_SYSCALL_INTERN
void syscall __P((void));
+#endif
static void linux_e_proc_exec __P((struct proc *, struct exec_package *));
static void linux_e_proc_fork __P((struct proc *, struct proc *));
@@ -110,24 +111,22 @@ linux_sys_execve(p, v, retval)
const struct emul emul_linux = {
"linux",
"/emul/linux",
+#ifndef __HAVE_MINIMAL_EMUL
+ 0,
native_to_linux_errno,
- linux_sendsig,
LINUX_SYS_syscall,
LINUX_SYS_MAXSYSCALL,
+#endif
linux_sysent,
linux_syscallnames,
+ linux_sendsig,
linux_sigcode,
linux_esigcode,
linux_e_proc_exec,
linux_e_proc_fork,
linux_e_proc_exit,
-#ifdef LINUX_MACHDEP_PASS_PPID_AND_EUID
- EMUL_GETPID_PASS_PPID|EMUL_GETID_PASS_EID,
-#else
- 0,
-#endif
-#ifdef LINUX_MACHDEP_HAS_SEPARATED_SYSCALL
- linux_syscall,
+#ifdef __HAVE_SYSCALL_INTERN
+ linux_syscall_intern,
#else
syscall,
#endif