]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r342362-r342363: config(8) duplicate option handling
authorkevans <kevans@FreeBSD.org>
Sun, 6 Jan 2019 02:13:16 +0000 (02:13 +0000)
committerkevans <kevans@FreeBSD.org>
Sun, 6 Jan 2019 02:13:16 +0000 (02:13 +0000)
commit939d63f00d924e3594e6194dc87fff7ccedfe050
tree27bbdad435b00a5f1c7c1bf469315239a2dc7456
parent01a15b9743ddaa5b52209b948d07f45473e40b5c
MFC r342362-r342363: config(8) duplicate option handling

r342362:
config(8): Allow duplicate options to be specified

config(8)'s option handling has been written to allow duplicate options; if
the value changes, then the latest value is used and an informative message
is printed to stderr like so:

/usr/src/sys/amd64/conf/TEST: option "VERBOSE_SYSINIT" redefined from 0 to 1

Currently, this is only a possibility for cpu types, MAXUSERS, and
MACHINE_ARCH. Anything else duplicated in a config file will use the first
value set and error about duplicated options on subsequent appearances,
which is arguably unfriendly since one could specify:

include GENERIC
nooptions VERBOSE_SYSINIT
options VERBOSE_SYSINIT

to redefine the value later anyways.

Reported by: mmacy

r342363:
config(8): Remove all instances of an option when opting out

Quick follow-up to r342362: options can appear multiple times now, so
clean up all of them as needed. For non-OPTIONS options, this has no effect
since they're already de-duplicated.
25 files changed:
Makefile.inc1
ObsoleteFiles.inc
contrib/mdocml/lib.in
lib/Makefile
lib/libbe/Makefile [new file with mode: 0644]
lib/libbe/be.c [new file with mode: 0644]
lib/libbe/be.h [new file with mode: 0644]
lib/libbe/be_access.c [new file with mode: 0644]
lib/libbe/be_error.c [new file with mode: 0644]
lib/libbe/be_impl.h [new file with mode: 0644]
lib/libbe/be_info.c [new file with mode: 0644]
lib/libbe/libbe.3 [new file with mode: 0644]
sbin/Makefile
sbin/bectl/Makefile [new file with mode: 0644]
sbin/bectl/bectl.8 [new file with mode: 0644]
sbin/bectl/bectl.c [new file with mode: 0644]
sbin/bectl/bectl.h [new file with mode: 0644]
sbin/bectl/bectl_jail.c [new file with mode: 0644]
sbin/bectl/bectl_list.c [new file with mode: 0644]
share/mk/bsd.libnames.mk
share/mk/src.libnames.mk
sys/amd64/conf/GENERIC
sys/amd64/conf/MINIMAL
tools/build/mk/OptionalObsoleteFiles.inc
usr.sbin/config/config.y