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 08:40:18 PDT 2003
On 26-Jun-2003 Scott Long wrote:
> scottl 2003/06/25 17:03:59 PDT
>
> FreeBSD src repository
>
> Modified files:
> sys/dev/ips ips.c ips.h ips_commands.c ips_pci.c
> Log:
> - Zero the buffers used to hold configuration data from the card. Not doing
> so can leave stale data in the buffer and confuse the driver.
> - enable the ability to set the 'disable' hint for the driver to keep it
> from attaching. i.e. 'hw.ips.0.disable=1' will prevent the driver from
> attaching.
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:
int
resource_disabled(const char *name, int unit)
{
int error, value;
value = resource_int_value(name, unit, "disabled", &error);
if (error == 0)
return (value);
return (0);
}
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'.
--
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