summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkheaders.c
Commit message (Collapse)AuthorAgeFilesLines
* Clean some code that became obfuscated over the years:ru2005-11-251-13/+0
| | | | | | | | | 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.
* Kill count device support from config. I've changed the last fewpeter2004-08-301-156/+0
| | | | | | | | | | | | | | | | | 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.
* Per letter dated July 22, 1999, delete clause 3 from code directlyimp2004-08-071-4/+0
| | | | from Berkeley.
* Static device counts will not be supported in 6.x so place the generatedbrooks2004-06-301-0/+2
| | | | | | macros (N<driver>) under BURN_BRIDGES. Discussed with: peter, imp, scottl, ...
* Print FYI messages on stderr. Previously, they were printed on stdout,des2003-03-091-1/+3
| | | | | | | | | 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).
* Convert to using <sys/queue.h> macros.ru2003-02-151-15/+15
|
* Remove stray function prototype. I wrote and removed this function butpeter2002-07-211-1/+0
| | | | | | forgot the prototype. Submitted by: dd
* Check for missing static unit 'count' declarations as well.peter2002-07-211-7/+13
|
* Check that we are not supplying 'device foo N' to devices that do not takepeter2002-07-211-2/+27
| | | | a statuc unit count.
* Try and make it clearer that the static units thing is a FYI only.peter2001-01-311-1/+1
|
* Unwind a bit more cruft - we only have one type of device now.peter2001-01-311-7/+4
|
* Oops. An old version of a local change leaked in with the last commit.peter2001-01-311-22/+9
| | | | Since it is here, clean it up a bit.
* Redo the stray header file cleanup code to not depend on timestampspeter2001-01-311-1/+8
| | | | | or access times or anything. Just bite the bullet and keep a list of header files that we know about.
* Clean up some obsolete stuff. config -r has not been needed since aroundpeter2001-01-221-1/+1
| | | | | | 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. :-(
* Fix buffer overflows in filenames. If you had a path > 80 charactersimp2000-11-211-3/+3
| | | | | | | | | | 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.
* Borrow phk's axe and apply the next stage of config(8)'s evolution.peter2000-06-131-41/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* A checkpoint of a part of a work-in-progress. Some more cleanups forpeter2000-06-101-32/+22
| | | | | | | | 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.
* Apply the axe to some more cruft in config(8). In particular:peter2000-01-081-18/+11
| | | | | | | | | | | | | | | | | | | | | | | - 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.
* Fix another quirk in the unknown device detection, and also deal withpeter1999-12-061-4/+17
| | | | unknown 'controller' lines.
* Further cleanup. Also remove the following unused or defunct tokens:peter1999-10-101-3/+1
| | | | and, bio, cam, master, minor, net, priority, sequential, size, slave, trace
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Check and warn about unknown devices in the config file along the samepeter1999-06-031-2/+12
| | | | | lines as the pseudo-device checking. Previously 'device xyz0' would have been silently accepted without comment.
* Get out the blow torch and hack away all the unused stuff. Note thatpeter1999-04-171-8/+11
| | | | | | 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.
* Fix some breakage from my last set of changes.joerg1997-11-071-2/+2
| | | | | PR: bin/4892 Submitted by: Vasim Valejev <vasim@uddias.diaspro.com>
* Allow for a keyword in the "files" file named "mandatory". The firstjoerg1997-10-281-1/+11
| | | | | | | | 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.
* Use err(3), add usage(). -Wall clean.charnier1997-09-151-9/+16
|
* Part #2 of the config cleanup. More aggressive, replaced an NIHjoerg1996-12-141-1/+4
| | | | | | | | | | 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!
* Backout yacc changes.phk1996-06-021-1/+1
|
* yacc rule changes.phk1996-05-301-1/+1
|
* Implement support for conf/options and i386/conf/options.i386peter1995-12-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | 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.
* BSD 4.4 Lite usr.sbin Sourcesrgrimes1994-05-261-0/+207
OpenPOWER on IntegriCloud