Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2008 15:51:39 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        arch@freebsd.org, Julian Elischer <julian@elischer.org>
Subject:   Re: RFC: sysctl additional functions/macros
Message-ID:  <20080104154326.H20228@delplex.bde.org>
In-Reply-To: <20080104022910.GF76698@elvis.mu.org>
References:  <477D931D.4000303@elischer.org> <20080104021905.GE76698@elvis.mu.org> <477D999E.5080704@elischer.org> <20080104022910.GF76698@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 3 Jan 2008, Alfred Perlstein wrote:

> * Julian Elischer <julian@elischer.org> [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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080104154326.H20228>