RFC: sysctl additional functions/macros

Bruce Evans brde at optusnet.com.au
Thu Jan 3 20:51:47 PST 2008


On Thu, 3 Jan 2008, Alfred Perlstein wrote:

> * Julian Elischer <julian at 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


More information about the freebsd-arch mailing list