HomeFreeBSD

MFC r342362-r342363: config(8) duplicate option handling

Description

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.

Details

Provenance
kevansAuthored on
Parents
rS342808: Revert r342807, mistakenly including libbe(3)/bectl(8) MFC
Branches
Unknown
Tags
Unknown