svn commit: r215821 - head/sys/sys

Bruce Evans brde at
Fri Nov 26 04:26:37 UTC 2010

On Thu, 25 Nov 2010, Attilio Rao wrote:

> Log:
>  Add a missing CTL description from CVS revision 1.147.

This compounds the bugs in rev.1.147.  The description wasn't really
missing, since the whole table (CTL_KERN_NAMES) is historical garbage
that probably shouldn't exist and certainly shouldn't be added to.

> Modified: head/sys/sys/sysctl.h
> ==============================================================================
> --- head/sys/sys/sysctl.h	Thu Nov 25 15:42:33 2010	(r215820)
> +++ head/sys/sys/sysctl.h	Thu Nov 25 15:56:05 2010	(r215821)
> @@ -452,6 +452,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e
> 	{ "logsigexit", CTLTYPE_INT }, \
> 	{ "iov_max", CTLTYPE_INT }, \
> 	{ "hostuuid", CTLTYPE_STRING }, \
> +	{ "arc4rand", CTLTYPE_OPAQUE }, \
> }
> /*

The error in rev.1.147 was adding the corresponding sysctl number
KERN_ARND 12 years after hard-allocation of sysctl numbers were
deprecated and 10 years after they became obsolete.  OID_AUTO should
have been used in the sysctl declaration, and sysctl.h shouldn't have
been touched.  Fortunately, KERN_ARND is still not documented in either
sysctl.8 or sysctl.3, so it is properly unusable.  The sysctl by name
"arc4rand" is also undocumented in these man pages.

Documentation of the numbers and names in the above man pages seems
to stop at logsigexit in sysctl.8 and before that in sysctl.3 (sysctl.8
is easier to use for this comparison but harder to use normally since
its strings are mostly unsorted in the same historical order as the
numbers).  The previous mistakes "hostuid" and "iov_max" visible in
the above list are also still not documented in either of these man pages.

Some historical dates:
1995: OID_AUTO
1997: sysctlbyname() (before this, OID_AUTO sysctls were only easy to use
       via sysctl(8)
2010: "arc4rand".


More information about the svn-src-head mailing list