From 6b7609f9092e6573753d281b9aba2b72653ea42c Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 4 Dec 1995 16:48:58 +0000 Subject: 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. --- sys/kern/kern_descrip.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'sys/kern/kern_descrip.c') 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 @@ -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, ""); - -- cgit v1.1