diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2016-02-29 19:44:08 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2016-02-29 19:44:08 +0000 |
commit | c46e3e7edf0b10fb4028cab867793c98c9481aa5 (patch) | |
tree | 18f1038201efd1daaecfca2b6882e41cca8ef18f /sys/kern | |
parent | 0b75ff49b9e4cb3b8619ccddc8d34c22ee8258fa (diff) |
delete the kern.emul/KERN_EMUL sysctl bits since there are no
emulations left; ok millert@ deraadt@, jmc@ (man pages)
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sysctl.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index cda2922f9b8..a7a16b8c1ec 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.299 2015/12/05 20:54:34 kettenis Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.300 2016/02/29 19:44:07 naddy Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -129,7 +129,6 @@ int sysctl_proc_nobroadcastkill(int *, u_int, void *, size_t, void *, size_t *, int sysctl_proc_vmmap(int *, u_int, void *, size_t *, struct proc *); int sysctl_intrcnt(int *, u_int, void *, size_t *); int sysctl_sensors(int *, u_int, void *, size_t *, void *, size_t); -int sysctl_emul(int *, u_int, void *, size_t *, void *, size_t); int sysctl_cptime2(int *, u_int, void *, size_t *, void *, size_t); void fill_file(struct kinfo_file *, struct file *, struct filedesc *, int, @@ -298,7 +297,6 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, case KERN_SHMINFO: case KERN_INTRCNT: case KERN_WATCHDOG: - case KERN_EMUL: case KERN_EVCOUNT: case KERN_TIMECOUNTER: case KERN_CPTIME2: @@ -557,9 +555,6 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, case KERN_WATCHDOG: return (sysctl_wdog(name + 1, namelen - 1, oldp, oldlenp, newp, newlen)); - case KERN_EMUL: - return (sysctl_emul(name + 1, namelen - 1, oldp, oldlenp, - newp, newlen)); #endif case KERN_MAXCLUSTERS: error = sysctl_int(oldp, oldlenp, newp, newlen, &nmbclust); @@ -2332,41 +2327,6 @@ sysctl_sensors(int *name, u_int namelen, void *oldp, size_t *oldlenp, return (ret); } -int -sysctl_emul(int *name, u_int namelen, void *oldp, size_t *oldlenp, - void *newp, size_t newlen) -{ - int enabled, error; - struct emul *e; - - if (name[0] == KERN_EMUL_NUM) { - if (namelen != 1) - return (ENOTDIR); - return (sysctl_rdint(oldp, oldlenp, newp, nexecs)); - } - - if (namelen != 2) - return (ENOTDIR); - if (name[0] > nexecs || name[0] < 0) - return (EINVAL); - e = execsw[name[0] - 1].es_emul; - if (e == NULL) - return (EINVAL); - - switch (name[1]) { - case KERN_EMUL_NAME: - return (sysctl_rdstring(oldp, oldlenp, newp, e->e_name)); - case KERN_EMUL_ENABLED: - 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); - } -} - #endif /* SMALL_KERNEL */ int |