Subject: Re: LINT'ing the kernel
To: None <tech-kern@netbsd.org>
From: Chapman Flack <nblists@anastigmatix.net>
List: tech-kern
Date: 04/24/2006 16:55:11
David Laight wrote:
> Have you looked at i386/conf/GENERIC.MP recently ?

Wups, I picked the wrong example, as GENERIC.MP has been defined
on top of "include GENERIC" since its very first commit (which
predated the 'no' syntax in config, and therefore was possible
only because GENERIC.MP only adds options to GENERIC, and doesn't
cancel any). But I see now that if I had looked at GENERIC.MPACPI
instead, I would have seen a good example of 'no' in actual use.
Sorry I overlooked that.

I've also since found answers to several of my documentation
questions in the (extensive) commit comments in src/usr.bin/config.
I am still wondering, though:

is there a concise way to "include GENERIC_LAPTOP" and then disable,
e.g., all NIC drivers except ex* at pci? and ex* at cardbus?, or all
IDE drivers except piixide* at pci?

So far I have a config working with
  no pciide
  no acardide
  no aceride
  ...
  no slide
  no viaide
but it's tedious and doesn't much improve in terms of line count
over cloning the included file.  It still seems like a better idea
than cloning, and fits the mental model of starting with a working
config and turning off the things you know you don't need. But I'd
love to learn that I'm missing an easier way to do it.

-Chap