cvs commit: src/sys/dev/ips ips.c ips.h ips_commands.c ips_pci.c

John Baldwin jhb at FreeBSD.org
Thu Jun 26 10:57:27 PDT 2003


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 at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


More information about the cvs-src mailing list