Subject: Re: how to add arbitrary #defines into kernel driver code cleanly?
To: Andrew Brown <atatat@atatdot.net>
From: George Michaelson <ggm@apnic.net>
List: netbsd-help
Date: 03/11/2003 09:49:08
--=.fgyXmobggNL63I
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Mon, 10 Mar 2003 16:07:50 -0500 Andrew Brown <atatat@atatdot.net> wrote:

> 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.
 
This looks to be very specific to scsi. What I was hinting at was the possible
need for a *generic* mechanism to include local dependencies on params, so you
can take some #define in an arbitrary codepoint in the kernel, and if its not
already exposed in the config process, add it in. One place, to do it all.

Thats what I think a mod to files.i386 to #include files.local achieves, and
thats what I did. I now get a CVS "M" message on files.i386 and it looks to be
able to merge my local diff in fine.

cheers

	-George

--=.fgyXmobggNL63I
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (NetBSD)

iD8DBQE+bSR0EBtqCXNexlkRAhhLAKC6Dl9c7Z/1EPUNBplMCwmUy/835QCgpY+x
eAhYrDiAm8JXzHGrLGSN7Nc=
=UEbr
-----END PGP SIGNATURE-----

--=.fgyXmobggNL63I--