Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Nov 1995 12:00:40 -0500
From:      "Garrett A. Wollman" <wollman@lcs.mit.edu>
To:        Bruce Evans <bde@zeta.org.au>
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
Message-ID:  <9511071700.AA16232@halloran-eldar.lcs.mit.edu>
In-Reply-To: <199511071648.DAA10078@godzilla.zeta.org.au>
References:  <199511071648.DAA10078@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 8 Nov 1995 03:48:02 +1100, Bruce Evans <bde@zeta.org.au> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9511071700.AA16232>