Commit Graph

85 Commits

Author SHA1 Message Date
cube 7a185660d8 Some more licence clean up. 2007-09-10 10:54:20 +00:00
cube 14a82de83a Improve the structure of the man page to make it more usual, with the hope
that people might actually read it some day.  Yeah, I know, dream on, dream
on.

Thanks schmonz@ for a quick english check.
2007-09-09 00:35:14 +00:00
veego 9ec62257da Using ${NETBSDSRCDIR} requires <bsd.own.mk> 2007-05-13 20:22:45 +00:00
dsl e934daaae7 Enable the code that adds global constants to every kernel object file
that uses each configuration parameter.
This will stop kernel objects build with different options (that come from
config files) being linked together or loaded as a LKM.
Currently some options that have an effect on the kernel DDI/KI are passed
directly as parameters to cc.
An aim (for anyone adequately bored) would be to reduce the number of these
constants that appear in each .o file.  .o files with the same constants
should be sharable between kernels (even between XEN and i386).
2007-05-12 10:15:31 +00:00
dsl c1079eace9 Use '.equ' instead of '.set' when defining global constants.
On alpha '.set' has a non-standard purpose.
2007-05-10 21:01:14 +00:00
cube bfc250f292 Add some sanity checking in order to avoid some segfaults. There might be
other ways of producing a segfault, but keep in mind those happens when the
negation applies to an erroneous instance.
2007-04-06 19:21:09 +00:00
christos c7295a4c51 - rename {x,}error -> cfg{x,}error and {x,}warn -> cfg{x,}warn so that we
can use err(3) and warn(3) to display errors instead of using inconsistent
  fprintf's.
- remove emalloc/estrdup etc. We have them in libutil.
2007-01-13 23:47:36 +00:00
cube 718ffd7615 Handle defopt lists properly, as ':=' syntax introduce an additional
element...  For that, introduce nvcat(nv1, nv2).
2007-01-12 21:49:51 +00:00
cube 072ab00089 Change the name of the resulting kernel binary, because "lint" confuses
our Makefiles.  While there, add a couple comments to explain how all
attachments are found.
2007-01-10 15:17:43 +00:00
cube 904262675b Add new syntaxic sugar to provide a value in lint (i.e., config -L)
configurations for defparams.  It will be used _only_ by config -L.

This will greatly help automating tests with lint configurations,
hopefully.
2007-01-09 13:03:47 +00:00
wiz 81c929da0c Bump date for previous (year was wrong). 2007-01-09 06:58:46 +00:00
cube 6ebb2291dc Print pseudo-devices in their own section and print all of them (d'oh). 2007-01-08 18:08:24 +00:00
cube aa3d024933 One %s is enough to print one string. 2007-01-08 17:50:43 +00:00
cube 59c945452a Introduce a new option to config(1): -L. What it does is takes a regular
configuration file (although it is meant to be used mostly with
std.${ARCH}), and prints out a configuration file that includes it and
select every single option and parameter, and define an instance for every
single possible attachment.  IOW, selects everything, into a would-be
"LINT" config.

The resulting config really isn't meant to be runnable, but should be
somewhat buildable on most archs.  It still needs adjustments because some
options are peculiar (e.g., ACPI_DSDT_FILE wants an existing file as its
value), so it's not yet possible to do "config -L; config; build" in an
automated way.
2007-01-08 16:08:08 +00:00
wiz b8808a8b5c Improve formatting, fix typo, bump date for previous. 2007-01-08 07:18:25 +00:00
cube f55d783c32 - Document "source /path" and "build /path".
- Move documentation for "package", because as I learned tonight, it's not
  allowed before setmachine.  You get to discover scary new stuff about
  config(1) each time you look at it.
2007-01-07 23:22:04 +00:00
cube db31f3b5e0 Mention that newlines mid-statement are allowed, and clarify how
needs-count and needs-flag work, notably for simple attributes.
2007-01-06 21:58:54 +00:00
cube c93963e680 Make deffilesystem check all defined options, not just defopttab (which
ought to be empty nowadays).
2007-01-06 18:54:32 +00:00
alc 0c17aa264d Fix a typo in ht_free() which caused the last list of the hashtable to be ignored.
It caused config(1) to crash on the following assert() if the list was used.

This bug shows up after the recent change in files.c which fixed a memory leak.

pointed out by dogcow@
reviewed by cube@
2006-12-27 17:50:27 +00:00
alc 2f403ebe4f CID-4275: don't leak `fixdevmtab' 2006-12-26 00:07:18 +00:00
christos 1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
christos bbfbbde1e9 eliminate the only alloca use and simplify the code. 2006-11-09 20:42:45 +00:00
uwe 4e4935bba0 Include <sys/cdefs.h> and use __used on config[] instead of the ifdef dance.
Prevents gcc4 from g/c'ing embedded config from VAX kernels.
2006-10-29 23:00:44 +00:00
dsl 342d35797b Instead of trying to check the return value of every fprintf() and fputs()
call - which makes the code completely impossibly to follow, call fflush()
and ferror() just prior to calling fclose().
This has the advantage of actually detecting the any write errors, since
the output is block bufferred and will typically not happen during fprintf()
but only during the fclose() - where it is difficult to report.
I also singlilarly refuse to add (void) casts to every printf call in the
system - since it almost never makes any sense to look at the return value
(unless you want to know how many bytes were actually writtem).
2006-10-04 20:34:48 +00:00
christos c0156a4952 Coverity CID 175: Avoid memory leak; add new function to destroy a hash table. 2006-09-27 19:05:46 +00:00
christos f11da4b014 make this compile again. 2006-09-04 18:42:14 +00:00
wiz 2ba7db1893 Fix typo. 2006-09-04 18:32:54 +00:00
cube 1e2d115e84 Bump version after last feature addition (default value for defparam). 2006-09-04 07:32:50 +00:00
dsl 6467d53e48 Add support for specifying a default value on a 'defparam' line.
If a default is specified then the option is always defined in the
corresponding .h file.
Particularly useful for parameters where the default action isn't the
same a defining the value zero, given that the current use of #if defined(opt)
is open to problems wehere the relevant .h file isn't actually included, so
requiring an option to always have a value makes sense.
Also included (but commented out) is code that adds a global symbol to
the object file to stop objects compiled with different values for the
same option being linked together - I'm not quite happy with it yet!
2006-09-04 06:45:14 +00:00
dsl 17ff309c84 There isn't really any point in the 'union' for nv_str and nv_ptr, all it
does is cause confusion when I try to add default values for defparam.
Also if malloc()/free() aren't efficient enough for us, we ought to fix
them rather than having local free list - so kill the local free lists.
2006-09-03 07:45:40 +00:00
he d425dd3b69 Remove unused local variable. 2006-08-30 15:03:56 +00:00
cube 08ba9c9303 Bump version after deffs change. 2006-08-30 13:48:11 +00:00
matt 4a82747a8f Allow deffs to take dependencies like defflag and defopt 2006-08-30 10:12:25 +00:00
christos 55ee861f25 protect libutil with HOSTPROG 2006-08-29 16:54:03 +00:00
christos e07b7e508b build complete initializations. 2006-08-28 01:45:41 +00:00
christos d0fb89015b Now that this is part of tools, we don't need the extra build glue. 2006-08-26 18:17:13 +00:00
drochner fe5f2a85b5 Make sure that only specisications for _interface_ attributes are
emitted, the rest is useless at runtime.
saves some bloat in ioconf.c
2006-08-09 18:03:23 +00:00
cube 71af9028c9 Check that the device is not a pseudo-device in deldev(), too (as in
deldevi()).

PR#34111 by jmmv@.
2006-08-07 12:03:32 +00:00
cube 15f9f25144 s/setmachine/machine. Overlook pointed out by Havard Eidnes. 2006-07-05 10:11:02 +00:00
cube 93e398b3e3 Reference config(5). Noted by perry@.
XXX options(4), config(9) and probably some others still have to be changed
XXX a bit.  A chaque jour suffit sa peine.
2006-06-04 20:07:52 +00:00
cube 3bde459b8f Set a more realistic date than the day I started writing it. 2006-06-04 20:06:14 +00:00
cube ecfd193d31 Install config.5 and config.samples.5. 2006-06-04 19:42:18 +00:00
cube 8a5d15c785 Everything you've always wanted to know about config(1) without daring
asking (with reason).

You've entered the config(1) dungeon--More--
An option hits you.  You die.
2006-06-04 19:41:26 +00:00
cube 1baa475170 Bump version after fix to obsolete syntax. 2006-06-04 13:52:27 +00:00
cube 87ab9060e2 D'uh. Forgot the file name argument in the "obsolete" statements. 2006-06-04 13:07:24 +00:00
cube ac24e16176 Introduce two new statements:
obsolete defflag <option> [, <option> [, ...]]
    obsolete defparam <option> [, <option> [, ...]]

The two statements actually do the same thing (there could be only one),
but it makes things less cryptic that way.  The optional ": deps" part of
a 'defflag' or 'defparam' still has to be dropped when it gets obsoleted.

When the user has 'options OBSOLETE_OPTION' in his configuration file, it
is ignored (that is, opt_*.h files are generated as if it wasn't there),
and the user gets a warning about it.

Bump version to 20060525.

When someone first uses that syntax in the tree, a "version 20060525"
statement should be added before its occurrence, preferably at the top
of sys/conf/files.

Suggested by Matt Thomas a few months ago.
2006-05-25 22:28:38 +00:00
christos fc19b961ac s/vax/__vax__/ 2006-05-25 22:06:53 +00:00
christos f81561404f deal with the vax gcc that does not understand __attribute__ used. 2006-05-24 23:16:50 +00:00
christos 9a02ff9b42 gcc-4.0 needs attribute used. Variables with attribute unused get removed. 2006-05-14 23:47:34 +00:00
cube c002406624 Fix a broken conditional that confused coverity. It cannot happen, anyway.
CID 178.
2006-03-29 09:16:36 +00:00