Subject: Re: how to add arbitrary #defines into kernel driver code cleanly?
To: George Michaelson <ggm@apnic.net>
From: David Ferlier <david@netbsd-fr.org>
List: netbsd-help
Date: 03/10/2003 05:51:40
On Mon, Mar 10, 2003 at 02:37:22PM +1000, George Michaelson wrote:
> 
> scsiconf.c has SCSI_DELAY=2 but on a #ifndef SCSI_DELAY. I'd like to #define
> it up a bit (my USB attached SCSI looks to need a bit more settling time)
> 
> I can see how to hack this in post config, but could somebody clue me into how
> you add an arbitrary #define value cleanly into a kernel build? it would seem
> to require a bit more than just adding options <X>=<val> in the config file.
> 
> (files.* in some directory? some other process?)

in /usr/src/sys/dev/scsipi/files.scsipi, add:

defparam opt_scsi.h SCSI_DELAY

then, in your config file, add

options SCSI_DELAY=2

or whatever you want ;)

David

> 
> cheers
> 	-George
> 
> -- 
> George Michaelson       |  APNIC
> Email: ggm@apnic.net    |  PO Box 2131 Milton QLD 4064
> Phone: +61 7 3367 0490  |  Australia
>   Fax: +61 7 3367 0482  |  http://www.apnic.net



-- 
	David Ferlier -- david@netbsd-fr.org

    http://happy-hacking.homeunix.org     (IPV4)  ||
    http://cobaye.segfault.quatriemek.com (IPV6)