INCLUDE_CONFIG_FILE in GENERIC

M. Warner Losh imp at bsdimp.com
Thu Jan 14 17:30:49 UTC 2010


In message: <alpine.BSF.2.00.1001141652140.49545 at fledge.watson.org>
            Robert Watson <rwatson at FreeBSD.org> writes:
: 
: > In the interests of bringing this to a close:
: > # Store the plain version of the configuration file in the kernel
: > # itself.
: > # For information on extraction, and storing the comments also, see
: > config(8).
: 
: Am I right in thinking that even with this change, you still end up
: with a single giant config file whereas it may have been made up of
: several files in the original and assembled using the include
: directive?

No.

Without -C you get something that looks like:

options        CONFIG_AUTOGENERATED\n\
ident   GENERIC\n\
machine amd64\n\
cpu     HAMMER\n\
makeoptions     DEBUG=-g\n\
options AH_SUPPORT_AR5416\n\
options IEEE80211_SUPPORT_MESH\n\
options IEEE80211_AMPDU_AGE\n\
<etc>

which is the totally pre-processed config, with stuff sorted in a
weird order (I think backwards in the file).  This is the
fully-processed config, including include files, option/nooption
cancellation, etc.

With -C you get:

#\n\
# GENERIC -- Generic kernel configuration file for FreeBSD/amd64\n\
#\n\
# For more information on this file, please read the config(5) manual page,\n\
# and/or the handbook section on Kernel Configuration Files:\n\
#\n\
<etc>

eg, an verbatim copy of the config file used, but do not get any files
that were included such as DEFAULTS.

Personally, I'd rather see us have two different options here, as
suggested by others, so that it is clear and self-contained.  I'd vote
for INCLUDE_CONFIG for today's behavior without -C, and
INCLUDE_CONFIG_FILE for config -C.  -C then becomes a nop and the man
page becomes correct.  We can then put a single line:

options 	INCLUDE_CONFIG_FILE    	 # include this config file in kernel

and be done with it in head.

For MFC, having the extra comment lines isn't so horrible as an
explicitly granted exception to the rule of not doing that so others
won't be tempted to do it too.

: This means some caution (and a caveat of some sort) are
: still required.  I agree entirely that we should be including the
: comments by default.

I disagree, for the reasons above.

Warner


More information about the svn-src-all mailing list