diff options
author | phk <phk@FreeBSD.org> | 1995-12-04 16:48:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-12-04 16:48:58 +0000 |
commit | 6b7609f9092e6573753d281b9aba2b72653ea42c (patch) | |
tree | b9250271aedd3aef5c0e964555606b5cc6e48d0e /sys/kern/kern_descrip.c | |
parent | 67e9cc4ace9f1884414dbd0309ecdef08c596c38 (diff) | |
download | FreeBSD-src-6b7609f9092e6573753d281b9aba2b72653ea42c.zip FreeBSD-src-6b7609f9092e6573753d281b9aba2b72653ea42c.tar.gz |
A major sweep over the sysctl stuff.
Move a lot of variables home to their own code (In good time before xmas :-)
Introduce the string descrition of format.
Add a couple more functions to poke into these marvels, while I try to
decide what the correct interface should look like.
Next is adding vars on the fly, and sysctl looking at them too.
Removed a tine bit of defunct and #ifdefed notused code in swapgeneric.
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 591d589..543704d 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 - * $Id: kern_descrip.c,v 1.16 1995/11/29 14:40:32 julian Exp $ + * $Id: kern_descrip.c,v 1.17 1995/12/02 18:58:46 bde Exp $ */ #include <sys/param.h> @@ -1022,8 +1022,17 @@ sysctl_kern_file SYSCTL_HANDLER_ARGS } return (0); } + +SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD, + 0, 0, sysctl_kern_file, "S,file", ""); + +SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, + CTLFLAG_RD, &maxfilesperproc, 0, ""); + +SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW, &maxfiles, 0, ""); + #ifdef JREMOD -struct cdevsw fildesc_cdevsw = +static struct cdevsw fildesc_cdevsw = { fdopen, noclose, noread, nowrite, /*22*/ noioc, nostop, nullreset, nodevtotty,/*fd(!=Fd)*/ noselect, nommap, nostrat }; @@ -1058,13 +1067,3 @@ SYSINIT(fildescdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR, fildesc_drvinit,NULL) #endif /* JREMOD */ - - -SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, 0, sysctl_kern_file, ""); - -SYSCTL_INT(_kern, KERN_MAXFILESPERPROC, maxfilesperproc, - CTLFLAG_RD, &maxfilesperproc, 0, ""); - -SYSCTL_INT(_kern, KERN_MAXFILES, maxfiles, CTLFLAG_RW, &maxfiles, 0, ""); - |