History log of /freebsd-11-stable/usr.sbin/config/mkheaders.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 152811 25-Nov-2005 ru

Clean some code that became obfuscated over the years:
Don't keep duplicate files in the files list just to
mark the device as "known" later. XXX: Since the
device list isn't unique (there can be two "device foo"
directives, as this the case with LINT+DEFAULTS), we
have to traverse it all to mark all copies of the same
device as "used", but this is not worse than it was.


# 134542 30-Aug-2004 peter

Kill count device support from config. I've changed the last few
remaining consumers to have the count passed as an option. This is
i4b, pc98/wdc, and coda.

Bump configvers.h from 500013 to 600000.

Remove heuristics that tried to parse "device ed5" as 5 units of the ed
device. This broke things like the snd_emu10k1 device, which required
quotes to make it parse right. The no-longer-needed quotes have been
removed from NOTES, GENERIC etc. eg, I've removed the quotes from:
device snd_maestro
device "snd_maestro3"
device snd_mss

I believe everything will still compile and work after this.


# 133248 07-Aug-2004 imp

Per letter dated July 22, 1999, delete clause 3 from code directly
from Berkeley.


# 131369 30-Jun-2004 brooks

Static device counts will not be supported in 6.x so place the generated
macros (N<driver>) under BURN_BRIDGES.

Discussed with: peter, imp, scottl, ...


# 112042 09-Mar-2003 des

Print FYI messages on stderr. Previously, they were printed on stdout,
and due to buffering they would sometimes come out after the actual
error message when mkheaders() failed due to an unknown device, so you'd
get an error messages followed by 20 or 30 lines of harmless warnings.

There are lots of other warning messages in config(8) that are printed
on stdout, but these were the most egregious (at least with LINT).


# 110895 15-Feb-2003 ru

Convert to using <sys/queue.h> macros.


# 100472 21-Jul-2002 peter

Remove stray function prototype. I wrote and removed this function but
forgot the prototype.

Submitted by: dd


# 100463 21-Jul-2002 peter

Check for missing static unit 'count' declarations as well.


# 100461 21-Jul-2002 peter

Check that we are not supplying 'device foo N' to devices that do not take
a statuc unit count.


# 71882 31-Jan-2001 peter

Try and make it clearer that the static units thing is a FYI only.


# 71879 31-Jan-2001 peter

Unwind a bit more cruft - we only have one type of device now.


# 71878 31-Jan-2001 peter

Oops. An old version of a local change leaked in with the last commit.
Since it is here, clean it up a bit.


# 71866 31-Jan-2001 peter

Redo the stray header file cleanup code to not depend on timestamps
or access times or anything. Just bite the bullet and keep a list of
header files that we know about.


# 71363 22-Jan-2001 peter

Clean up some obsolete stuff. config -r has not been needed since around
FreeBSD 3.x or so when the 'make depend' picked up the opt_foo.h files.
Convert warnings into actual errors in the hope that buildkernel users
will pay more attention. :-(


# 69004 21-Nov-2000 imp

Fix buffer overflows in filenames. If you had a path > 80 characters
for your /usr/obj/path/to/my/files path to the kernel, then weird
things happened. make buildkernel would fail because config was
dumping core or generating bad file names (depending on the lenght of
the path).

While I was here, also use strlcpy, strlcat and snprintf (or asprintf)
as necessary. Minor format policing for the snprintf calls as well.


# 61640 13-Jun-2000 peter

Borrow phk's axe and apply the next stage of config(8)'s evolution.

Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel. You can reconfigure your
isa devices with the likes of this at loader(8) time:
set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8). See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8). There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file. If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you. You can also compile in the
hints directly with: hints "device.hints" as well.

There are a few things that I'm not too happy with yet. Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it. However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built. A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated. eg: 'device fe 4' will compile the fe driver with NFE set
to 4. You can then set hints for 4 units (0 - 3). Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this. This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others


# 61523 10-Jun-2000 peter

A checkpoint of a part of a work-in-progress. Some more cleanups for
config(8). This commit allows control of the creation of the
#include "foo.h" files. We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices. eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.


# 55605 08-Jan-2000 peter

Apply the axe to some more cruft in config(8). In particular:
- redo the "at" configuration system so that it just syntax checks
to make sure the device you're configuring something "at" appears to
exist. Nuke a bunch of complexity that was responsible for creating
"clones" of wildcard devices and some wierd stuff in a few places
including the scbus config tables etc.
- merge "controller" and "device" - there is no difference as far as
the kernel is concernend, it's just something there to make life
difficult for config file writers. "controller" is now an alias for
"device".
- emit full scsi config into the resource tables. We could trivially
change cam to use that rather than it's own "special" table for wiring
and static configuration. ATA could use this too for static wiring.
- try and emulate some of the quirks of the old system where it made
sense. Some were too strange though and I'd be very suprised if they
were features and not outright bugs. nexus handling is still strange.
One thing in particular is that some of the wierd entries in the
newbus devtables is now gone as it was a quirk side effect of the
wildcard/question-mark cloning above.

GENERIC and LINT still build etc.


# 54205 06-Dec-1999 peter

Fix another quirk in the unknown device detection, and also deal with
unknown 'controller' lines.


# 52098 10-Oct-1999 peter

Further cleanup. Also remove the following unused or defunct tokens:
and, bio, cam, master, minor, net, priority, sequential, size, slave, trace


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 47715 03-Jun-1999 peter

Check and warn about unknown devices in the config file along the same
lines as the pseudo-device checking. Previously 'device xyz0' would have
been silently accepted without comment.


# 45744 17-Apr-1999 peter

Get out the blow torch and hack away all the unused stuff. Note that
I zapped the MACHINE_MIPS stuff, it isn't likely to be useful apart from
recognition of the machine name. It would be reasonable to expect new
ports would look something like the alpha/i386 from a config perspective.


# 31001 06-Nov-1997 joerg

Fix some breakage from my last set of changes.

PR: bin/4892
Submitted by: Vasim Valejev <vasim@uddias.diaspro.com>


# 30796 28-Oct-1997 joerg

Allow for a keyword in the "files" file named "mandatory". The first
candidate for this is "npx0", more are likely to follow.

Check for pseudo-devices that are being configured, but don't appear
in any "files" file. The ``pseudo-device bpf 2'' already hit me too
often.


# 29451 15-Sep-1997 charnier

Use err(3), add usage(). -Wall clean.


# 20458 14-Dec-1996 joerg

Part #2 of the config cleanup. More aggressive, replaced an NIH
version of strdup() by a macro, killed many calls to strdup(), thus
potentially wasting less malloc'ed space (their args were never be
free()ed desptie despite of being malloc'ed). Probably still a huge
memory leak at all... Also killed two totally useless variables.

I've tested it as i could, but wouldn't be surprised if unexpected
problems showed up. So watch out this space!


# 16073 02-Jun-1996 phk

Backout yacc changes.


# 16023 30-May-1996 phk

yacc rule changes.


# 12772 11-Dec-1995 peter

Implement support for conf/options and i386/conf/options.i386
Note that this code is dormant unless the options files exist.
Also, parsing of quoted options in the config files is improved.

What this allows, is all the options in LINT to be specified to be
configured as #defines in a file rather than on the CC command line at
kernel build time. This means that 'make depend' will catch dependencies
on actual *options*, meaning that you can run 'config' and 'make depend'
in complete safety WITHOUT removing the compile directory each time.

Unfortunately, this requires a pass over the source to get the individual
files to #include the new .h files that would be generated by config.
This has a small compile time penalty (appears up to about 2% slower)
from a "fresh" build. Of course, you should not be needing to do complete
rebuilds very often once this was completed, so it would be an overall
win for most people.

Since this code is dormant and we've got a lot of other things happening
on the kernel tree at the moment (prototypes, devfs, static declarations
etc) I am not planning on doing any changes to activate this feature just
yet.


# 1554 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1553,
which included commits to RCS files with non-trunk default branches.


# 1553 26-May-1994 rgrimes

BSD 4.4 Lite usr.sbin Sources