Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jun 2003 12:47:13 -0400 (EDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        current@FreeBSD.org
Subject:   tweaks to sysctl integer value parsing (report any problems)
Message-ID:  <Pine.NEB.3.96L.1030615124120.98988B-100000@fledge.watson.org>

next in thread | raw e-mail | index | archive | help

Last night, I committed some tweaks to how sysctl integer value parsing
occurs.  The motivation for these changes was the outcome of finding the
following in my sysctl.conf:

   kern.maxfiles="4000"

Which, to my great sadness, occurred on a box without DDB or remote power. 
For the uninitiated, until my recent commit, the "4000" would converted to
0, resulting in severely degraded operation (your kernel now exists solely
to report that it is out of files after a reboot).  Now, sysctl will
reject poorly formatted values that will be converted to integers, as well
as empty strings in the integer conversion.  This means that the following
will now generate an error: 

   kern.maxfiles=		# previously: 0
   kern.maxfiles=5"		# previously: 5

I'm not convinced my changes are 100% ideal, so I'm going to be on the
lookout for posts saying "my sysctl.conf no longer works!", and perhaps we
can refine the approach a bit.  On the other hand, I now have only one
working foot after my recent foot-shooting exercise, so I'm fairly
convinced that some change, even if not this precise change, is necessary
:-).

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030615124120.98988B-100000>