diff options
| author | mycroft <mycroft@NetBSD.org> | 2000-12-11 05:28:59 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 2000-12-11 05:28:59 +0000 |
| commit | f495cd9dc643b90d222f9f2d0c1edcfc88b864fc (patch) | |
| tree | 52389d71cab8de4cd9a317e9ba214db7d875ec08 /sys/compat/linux | |
| parent | 105cf3806113d6cb97a836a8c06076a5a5ac6e44 (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')
| -rw-r--r-- | sys/compat/linux/arch/i386/linux_errno.h | 4 | ||||
| -rw-r--r-- | sys/compat/linux/arch/i386/linux_machdep.h | 9 | ||||
| -rw-r--r-- | sys/compat/linux/common/linux_exec.c | 21 |
3 files changed, 16 insertions, 18 deletions
diff --git a/sys/compat/linux/arch/i386/linux_errno.h b/sys/compat/linux/arch/i386/linux_errno.h index b3934135387..e26fff929ef 100644 --- a/sys/compat/linux/arch/i386/linux_errno.h +++ b/sys/compat/linux/arch/i386/linux_errno.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_errno.h,v 1.3 1998/10/04 00:02:25 fvdl Exp $ */ +/* $NetBSD: linux_errno.h,v 1.4 2000/12/11 05:29:01 mycroft Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -128,4 +128,6 @@ #define LINUX_EREMOTEIO 121 #define LINUX_EDQUOT 122 +extern int native_to_linux_errno[]; + #endif /* !_I386_LINUX_ERRNO_H */ diff --git a/sys/compat/linux/arch/i386/linux_machdep.h b/sys/compat/linux/arch/i386/linux_machdep.h index f598bc4df60..7c28bb47ede 100644 --- a/sys/compat/linux/arch/i386/linux_machdep.h +++ b/sys/compat/linux/arch/i386/linux_machdep.h @@ -1,7 +1,7 @@ -/* $NetBSD: linux_machdep.h,v 1.15 2000/12/10 14:09:59 fvdl Exp $ */ +/* $NetBSD: linux_machdep.h,v 1.16 2000/12/11 05:29:01 mycroft Exp $ */ /*- - * Copyright (c) 1995 The NetBSD Foundation, Inc. + * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -127,9 +127,6 @@ __END_DECLS #define LINUX_VT_WAITACTIVE 0x5607 #define LINUX_VT_DISALLOCATE 0x5608 -/* - * Does the port have separated linux_syscall() ? - */ -#define LINUX_MACHDEP_HAS_SEPARATED_SYSCALL +void linux_syscall_intern __P((struct proc *)); #endif /* _I386_LINUX_MACHDEP_H */ 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 |
