diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-23 20:03:00 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-23 20:03:00 +0000 |
commit | b08ec6df09214ccf2f3cf10e86b77f5482b9246c (patch) | |
tree | 32aefebb8a6e15904b5fc5879d7d7300a34d40a0 | |
parent | 39e263c714e0a0315bb931c11405d0987cefce5f (diff) |
remove native emulations from emulsw. you can't change them and probably
aren't interested, so keep them out of the sysctl. ok deraadt
-rw-r--r-- | sys/kern/exec_conf.c | 9 | ||||
-rw-r--r-- | sys/kern/kern_sysctl.c | 16 |
2 files changed, 7 insertions, 18 deletions
diff --git a/sys/kern/exec_conf.c b/sys/kern/exec_conf.c index 6a2a5fc850e..285f1cb524b 100644 --- a/sys/kern/exec_conf.c +++ b/sys/kern/exec_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_conf.c,v 1.14 2003/08/23 19:21:15 deraadt Exp $ */ +/* $OpenBSD: exec_conf.c,v 1.15 2003/08/23 20:02:59 tedu Exp $ */ /* $NetBSD: exec_conf.c,v 1.16 1995/12/09 05:34:47 cgd Exp $ */ /* @@ -127,13 +127,6 @@ extern struct emul emul_native, emul_elf32, emul_elf64, emul_aout, emul_ibcs2, emul_linux_elf, emul_linux_aout, emul_elf64_netbsd, emul_osf1, emul_sunos, emul_svr4, emul_ultrix; struct emul *emulsw[] = { - &emul_native, -#ifdef _KERN_DO_ELF - &emul_elf32, -#endif -#ifdef _KERN_DO_ELF64 - &emul_elf64, -#endif #if defined (_KERN_DO_AOUT) && defined (COMPAT_AOUT) &emul_aout, #endif diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index d7fe3cfec4e..4a4a6a3128a 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.88 2003/08/23 19:21:15 deraadt Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.89 2003/08/23 20:02:59 tedu Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -1545,15 +1545,11 @@ sysctl_emul(int *name, u_int namelen, void *oldp, size_t *oldlenp, case KERN_EMUL_NAME: return (sysctl_rdstring(oldp, oldlenp, newp, e->e_name)); case KERN_EMUL_ENABLED: - if (e->e_flags & EMUL_NATIVE) - return (sysctl_rdint(oldp, oldlenp, newp, 1)); - else { - enabled = (e->e_flags & EMUL_ENABLED); - error = sysctl_int(oldp, oldlenp, newp, newlen, - &enabled); - e->e_flags = (enabled & EMUL_ENABLED); - return (error); - } + enabled = (e->e_flags & EMUL_ENABLED); + error = sysctl_int(oldp, oldlenp, newp, newlen, + &enabled); + e->e_flags = (enabled & EMUL_ENABLED); + return (error); default: return (EINVAL); } |