Subject: Re: how to add arbitrary #defines into kernel driver code cleanly?
To: George Michaelson <ggm@apnic.net>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-help
Date: 03/10/2003 16:07:50
>> 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
>
>right. thanks!
>
>but if .../conf/files.i386 had
>
> #include files.local
>
>in it, then there would be a way to do this that didn't get stomped on by CVS.
you can also put
defparam opt_scsi.h SCSI_DELAY
into your kernel config file, though since scsiconf.c doesn't include
opt_scsi.h itself, you'll have to tweak it anyway, and risk something
getting stomped on by cvs.
otoh, you could put
defparam opt_scsipi_debug.h SCSI_DELAY
in your config file, and since scsiconf.c includes that file, albeit
rather indirectly:
../../../../dev/scsipi/scsiconf.h
../../../../dev/scsipi/scsipiconf.h
../../../../dev/scsipi/scsipi_debug.h
opt_scsipi_debug.h
you'll get the effect you want, with no expected collateral damage
from cvs.
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
werdna@squooshy.com * "information is power -- share the wealth."