Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2003 13:57:33 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
Cc:        cvs-all@FreeBSD.org
Subject:    RE: cvs commit: src/sys/dev/ips ips.c ips.h ips_commands.c ips_pci.c
Message-ID:  <XFMail.20030626135733.jhb@FreeBSD.org>
In-Reply-To: <20030626100854.P74937@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 26-Jun-2003 Nate Lawson wrote:
> On Thu, 26 Jun 2003, John Baldwin wrote:
>> Should be "hint.ips.0.disabled".  Perhaps we need to add a resource_disabled()
>> function to abstract this so people stop getting it wrong.  Something like:
> 
> With you so far...

Ok.

>> You could then expand this function to check 'disable' as well if
>> desired and allow for 'true' and 'false', 'on' and 'off' in addition
>> to '0' and '1'.
> 
> ...And then you lost me.  :)  I think that binary flags should only have
> one way to set/clear them.  Adding options only increases confusion (i.e.
> what about TRUE or yes/no)?  The int approach seems ok.

For an example, look at XF86Config which allows binary options to use all
of the strings I mentioned above.  This was just an optional feature anyway.
I should have added "if you wanted" or some such to the end of my last
sentence.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



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