Subject: Re: effective configuration from config(8) after "no foo"
To: Rhialto <rhialto@falu.nl>
From: Quentin Garnier <cube@cubidou.net>
List: current-users
Date: 12/20/2007 02:36:14
--Mh8CTEa8Ax54aLHp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 20, 2007 at 02:06:40AM +0100, Rhialto wrote:
> I'm converting my old kernel configuration file from "copy GENERIC and
> comment out lots of stuff" to "include generic and insert lots of "no"
> statements".
>=20
> However, in some cases this leaves me in doubt whether I have
> sufficiently killed support for something, say EISA. Or if I applied
> overkill and could leave out some statements.
>=20
> For instance, does "no eisa" remove the PCI-EISA bridge "pceb"? It is
> difficult to check by looking at the file alone.

=46rom config(5) [granted, I don't remember if that's in 4.0 or not]:

     no instance [at attachment]
     Removes the previously configured instances of a device that exactly
     match the given specification.  If two instances differ only by their
     locators, both are removed.  If no attachment is specified, all matchi=
ng
     instances are removed.

So "no eisa" only ``removes'' lines that start with "eisa[*0-9]".
Afterwards config(1) will indeed ignore everything that attach to eisa,
but it does that after an analysis;  the immediate effect is as if you
didn't have any instance of the eisa driver in the first place.

> Or, "no mca" alone gives "GENERIC:864: `ed* at edc?' is orphaned (nothing
> matching `edc?' found)" even though "ed* at edc?" is the only definition
> of ed, and edc is apparently removed by "no mca" but ed* isn't.

That's...  unexpected.

Merely configuring this:

include "arch/i386/conf/GENERIC"
no mca

works, so I'm wondering what your configuration file exactly looks like.

> Is it possible to get a sort of "effective config" displayed as it is
> at the end of all additions and subtractions?

I have a patch somewhere that outputs an equivalent config file from the
input one, with no inclusion whatsoever, and no ifdef stuff.  Kinda like
cc -E, if you will.  The idea comes from pooka@, but the patch didn't
seem to get attention, so I didn't commit it.

I'm pretty sure I still have it, so I can do it :)

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

--Mh8CTEa8Ax54aLHp
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iQEVAwUBR2nHDtgoQloHrPnoAQJRbQf9FFbNGJ2EywsDEbbQae52pLAqKMTL1Uxw
mEs/k6Itp0u6cjsmajDI7PMoB5xBpjMg+5WgBlxj2Ekt3/asjR01dEA6R9Gkyaik
9Bv/fLo+2+p7qsr+xrdVczWj8sHaxgLJDmfij9l68W+2z+2z2dJOVeO4tI8+iSaL
o1YYesEDrMC2cuScjqEvhn0EB/gzBYUjRsvjY3jJ/YenSJlB3SFXmbcRvJMaT92b
9JJG84t9ewr/oFX0ZU8mC4d2xR4k1D5EwE7xa4ba+pcJr1rN1m5STpoFT/PpLfD+
PUka3rFi0BSvDJJKpiLrvaBYn+yRLXeSlI1ZlQ4pTJJLzjGvfz177A==
=zJ9n
-----END PGP SIGNATURE-----

--Mh8CTEa8Ax54aLHp--