From owner-freebsd-current@FreeBSD.ORG Sun Jun 15 09:48:53 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13CCB37B401 for ; Sun, 15 Jun 2003 09:48:53 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DDDE43F3F for ; Sun, 15 Jun 2003 09:48:52 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h5FGlDYA099107 for ; Sun, 15 Jun 2003 12:47:13 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h5FGlDUJ099104 for ; Sun, 15 Jun 2003 12:47:13 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 15 Jun 2003 12:47:13 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: current@FreeBSD.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: tweaks to sysctl integer value parsing (report any problems) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2003 16:48:53 -0000 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