RFC: Adding a hw.features[2] sysctl

Igor Mozolevsky igor at hybrid-lab.co.uk
Sun Jan 13 18:49:06 PST 2008

On 14/01/2008, Peter Wemm <peter at wemm.org> wrote:
> On Jan 13, 2008 5:21 PM, Igor Mozolevsky <igor at hybrid-lab.co.uk> wrote:
> > On 13/01/2008, Peter Jeremy <peterjeremy at optushome.com.au> wrote:
> >
> > > IMHO, no.  Virtually all similar FreeBSD information is exported via
> > > sysctl and this sort of information fits neatly into the existing
> > > MIB tree as either dev.cpu.N.features or hw.cpu.features
> >
> > /dev/sndstat?
> That is a special case.  It was an externally defined API that we
> needed to be compatible with. OSS ran on everything from Linux to SVR4
> to FreeBSD at the time.

It's the question of where you really want to do the parsing - would
you rather the programmer had a simple API that they could query and
deal with a boolean result, or would you rather have everyone who
wanted to use the feature write their own parser for whatever (loosely
formatted value; who known when we'll have features3, features4 and so
on) sysctl returned? :-/


More information about the freebsd-current mailing list