summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-15 17:59:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-15 17:59:46 +0000
commit2a29d7700a247438440c4d033492a4dee76c40ff (patch)
tree5158a1f02565b3f098b38d2f75b6d69863ecef73 /sys/kern
parenta580ebf56a93a94895ee636e404c450044734a96 (diff)
No you cannot remove a sysctl mib once you add it. It becomes ABI. That
is how sysctl finds them, so it can *never* be renumbered again, and must stay
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sysctl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 3844f123316..313fb8402f0 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.174 2009/06/15 17:01:26 beck Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.175 2009/06/15 17:59:45 deraadt Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -554,6 +554,15 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
case KERN_CPTIME2:
return (sysctl_cptime2(name + 1, namelen -1, oldp, oldlenp,
newp, newlen));
+ case KERN_CACHEPCT: {
+ int opct = 0;
+
+ error = sysctl_int(oldp, oldlenp, newp, newlen,
+ &opct);
+ if (error)
+ return(error);
+ return(0);
+ }
default:
return (EOPNOTSUPP);
}