summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2002-06-08 23:17:23 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2002-06-08 23:17:23 +0000
commit7ad8826854afffe7a9d6b537bbdd6da19a3c8149 (patch)
tree3d805f9bacdd800bb3d697d8e39192f7874391db /sys/kern
parent901a277224c59da450fe2e92709bfff3ad6299a1 (diff)
Add read-only KERN_NFILES (number of open files).
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sysctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 9016830809a..cb8eb0613ee 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.66 2002/06/08 22:24:47 art Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.67 2002/06/08 23:17:22 angelos Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -276,6 +276,8 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return (sysctl_int(oldp, oldlenp, newp, newlen, &maxproc));
case KERN_MAXFILES:
return (sysctl_int(oldp, oldlenp, newp, newlen, &maxfiles));
+ case KERN_NFILES:
+ return (sysctl_rdint(oldp, oldlenp, newp, nfiles));
case KERN_ARGMAX:
return (sysctl_rdint(oldp, oldlenp, newp, ARG_MAX));
case KERN_NSELCOLL: