From owner-freebsd-commit Tue Nov 7 09:01:28 1995 Return-Path: owner-commit Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA25387 for freebsd-commit-outgoing; Tue, 7 Nov 1995 09:01:28 -0800 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA25375 for cvs-all-outgoing; Tue, 7 Nov 1995 09:01:23 -0800 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA25364 for cvs-sys-outgoing; Tue, 7 Nov 1995 09:01:20 -0800 Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id JAA25356 ; Tue, 7 Nov 1995 09:01:07 -0800 Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA16232; Tue, 7 Nov 1995 12:00:40 -0500 Date: Tue, 7 Nov 1995 12:00:40 -0500 From: "Garrett A. Wollman" Message-Id: <9511071700.AA16232@halloran-eldar.lcs.mit.edu> To: Bruce Evans Cc: peter@jhome.dialix.com, phk@freefall.freebsd.org, CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/kern kern_sysctl.c In-Reply-To: <199511071648.DAA10078@godzilla.zeta.org.au> References: <199511071648.DAA10078@godzilla.zeta.org.au> Sender: owner-commit@FreeBSD.org Precedence: bulk < said: > I think linker sets are the wrong approach. There's no way a linker > set in the kernel can update the manpage or specially handle a new > struct in sysctl(8). Generally speaking, sysctl(8) should not be handling structures at all. Anything that sysctl(8) has any business handling should be either an integer or a string. > I'd like either a static or dynamic central > catalog. I would like neither. > The static version would involve a text file that you edit > and run utilities on to produce man pages, kernel and user code. I don't think this is workable, and I'm not at all convinced that it would be a good thing. I think Poul-Henning has taken (to a first approximation) the correct approach. > The > dynamic version would involve a text file that you edit and run to > produce only kernel code, and more general handling of structs in > sysctl(8), and a more general man page that doesn't mention any > particular variable. And this seems spectacularly useless. > The sysctl interface uses a fixed binding of names to numbers. I > think there should be a separate binding step. E.g., > /* Interface: return a `name' suitable for passing to sysctl(8). */ > int sysctl_bind(const char *varname, u_int max_namelen, int *name, > u_int *namelen); > Even better, redesign sysctl() to support accessing an arbitrary subset > of the database: > [suggested deleted] This looks very much to me like using a sledgehammer to pound in a 3d finish nail. -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant