From owner-freebsd-arch@FreeBSD.ORG Fri Jan 4 04:51:47 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1506716A419; Fri, 4 Jan 2008 04:51:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 8F73013C458; Fri, 4 Jan 2008 04:51:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m044pdgl027819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jan 2008 15:51:41 +1100 Date: Fri, 4 Jan 2008 15:51:39 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alfred Perlstein In-Reply-To: <20080104022910.GF76698@elvis.mu.org> Message-ID: <20080104154326.H20228@delplex.bde.org> References: <477D931D.4000303@elischer.org> <20080104021905.GE76698@elvis.mu.org> <477D999E.5080704@elischer.org> <20080104022910.GF76698@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org, Julian Elischer Subject: Re: RFC: sysctl additional functions/macros X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2008 04:51:47 -0000 On Thu, 3 Jan 2008, Alfred Perlstein wrote: > * Julian Elischer [080103 18:25] wrote: >> Alfred Perlstein wrote: >>> Yes, but EINVAL please. >> >> I wondered who would be the first to complain about that.. >> >> "Gee you Juniper people have no sense of humour" :-) :-) > > I just don't see any point in prefering one non-descriptive error > message over another, other than to confuse/annoy people. The correct errno (ERANGE) would be descriptive and wouldn't conflict with the documented meaning of EINVAL. Checking bounds is good in theory, but the only time I had a problem with a bound in sysctl was when it enforced an unnecessarily high lower bound for an interrupt moderation timeout. It took an edit to test all values that the hardware supports. Bruce