error out in a bit more friendly way when the user is trying to use
config(1) on a too old or too recent source tree.
To achieve that, introduce the "version NUMBER" statement which can be use
about anywhere in the config files. Also, use two defines, CONFIG_VERSION
(which is the actual version of binary), and CONFIG_MINVERSION, which is
the minimum version the binary supports.
Allowing a range of versions serves several purposes: first it allows me
to introduce the versioning without requiring it to be used right away in
the kernel tree, which means it will be possible to introduce new features
of config(1) rather progressively in the future. E.g., using 'no pci' in
a config file could only require the new version in that config file, so
that the rest remains compatible.
In the end, an actual bump of the main config system (i.e., in conf/files)
will only be required when e.g., ioconf.c semantics change.
(Mostly-)silently accepted on tech-kern. Error messages turned into
correct and meaningful English thanks to Tracy and Perry.
o Rework do_kill_orphans() to use that information and mark explicitely
orphaned devices (i.e., the ones whose missing ancestor has been
negated)
o Make a distinction between erroneous orphans and explicit orphans.
Error out on the former, ignore the later (but print a warning when -v
is used)
Yes, now config(1) will actually stop if you comment out a parent. That
should help people still hoping adjustkernel is relevant these days :)
no device at <attachment>
<attachment> can take two forms: either numbered/wildcarded, in which
case only exactly matching instances will be removed, or plain (with
no number or wildcard), in which case all matching instances will be
removed.
When <attachment> is a plain interface attribute, all instances using
that attribute (either directly or through an explicit device) will be
removed.
E.g.:
auich* at pci? dev ? function ?
audio0 at audiobus?
audio1 at auich?
audio* at auich0
no device at auich0 -> removes audio*
no device at auich? -> removes audio1
no device at auich -> removes audio1 _and_ audio*
no device at audiobus? -> removes audio0
no device at audiobus -> removes audio0, audio1 and audio*
no <device>
As in the previous case, <device> can either be numbered/starred, in
which case all exactly matching instances are removed, or plain, in
which case all instances of the device are removed.
E.g.: (continuing previous example)
no audio* -> removes 'audio* at auich0'
no audio -> removes all audio instances