summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-18 01:47:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-18 01:47:43 +0000
commitf827bee971d6e9ca07046fa312c9e9b83002fe5d (patch)
tree7684d495ac67a3a10e626e7cccc5135a7cd835f8 /sys
parent0504b4c5c9a0ec87ae0e95933d9aec2da112258e (diff)
#ifndef APERTURE; machdep.allowaperture=0
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/machdep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index dbae8873a20..02c07f6faf8 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.78 1998/02/17 23:49:29 matthieu Exp $ */
+/* $OpenBSD: machdep.c,v 1.79 1998/02/18 01:47:42 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -1879,14 +1879,16 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return (ENOTDIR); /* overloaded */
dev = chrtoblk((dev_t)name[1]);
return sysctl_rdstruct(oldp, oldlenp, newp, &dev, sizeof(dev));
-#ifdef APERTURE
case CPU_ALLOWAPERTURE:
+#ifdef APERTURE
if (securelevel > 0)
return (sysctl_rdint(oldp, oldlenp, newp,
- allowaperture));
+ allowaperture));
else
return (sysctl_int(oldp, oldlenp, newp, newlen,
- &allowaperture));
+ &allowaperture));
+#else
+ return (sysctl_rdint(oldp, oldlenp, newp, 0);
#endif
default:
return EOPNOTSUPP;