Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 2010 10:21:42 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        rwatson@freebsd.org
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, dougb@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: INCLUDE_CONFIG_FILE in GENERIC
Message-ID:  <20100114.102142.328914705071816274.imp@bsdimp.com>
In-Reply-To: <alpine.BSF.2.00.1001141652140.49545@fledge.watson.org>
References:  <20100112.174326.337739863389869251.imp@bsdimp.com> <4B4E1586.7090102@FreeBSD.org> <alpine.BSF.2.00.1001141652140.49545@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <alpine.BSF.2.00.1001141652140.49545@fledge.watson.org>
            Robert Watson <rwatson@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100114.102142.328914705071816274.imp>