Subject: Re: Using unused sysctl's
To: Simon Burge <simonb@wasabisystems.com>
From: Luke Mewburn <lukem@wasabisystems.com>
List: tech-kern
Date: 05/09/2001 14:14:57
On Wed, May 09, 2001 at 02:10:28PM +1000, Simon Burge wrote:
> Folks,
> 
> Currently there's two sysctl's undef hw. that are unused (and never
> have been - they were in the initial import):
> 
> 	{ "disknames", CTLTYPE_STRING }	/* strings: disk drive names */
> 	{ "diskstats", CTLTYPE_STRUCT }	/* struct: diskstats[] */
> 
> FreeBSD doesn't appear to use these either (and I'm assuming that
> OpenBSD doesn't either).  I don't have access to any BSDI boxes to
> check there.  I'd like to use these to return info about disk usage
> (that will be used by iostat amongst other things).
> 
> >From the looks of things, "disknames" was intended to return a NUL
> seperated list of attached disks.  I'd like to change this so that it
> returns a space seperated list instead - I suspect the most common use
> of this sysctl would be as
> 
> 	disklist=`sysctl hw.disknames`
> 
> in shell scripts, and having the list returned NUL seperated doesn't
> win anything...
> 
> Anyone against this?

Sounds great!