Commit Graph

93 Commits

Author SHA1 Message Date
perry
8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
lukem
82d7cb8306 Use a common function to generate the "MACHINE GENERATED" comment,
and ensure mkswap.c adds it too.
2007-12-12 00:03:33 +00:00
dsl
8222554340 Be more informative about duplicated device names. 2007-11-30 23:19:18 +00:00
cube
66a59dcc4f Don't defattr machinearch if it's NULL. Pointed out by
Juergen Hannken-Illjes.
2007-11-11 17:35:27 +00:00
cube
66796c65e4 Make the "machine" statement define attributes for machine', arch' and
all the `subarch' given as parameters.  This is useful in combination with
ifdef...
2007-11-10 00:15:43 +00:00
cube
656cdcc8fb Add support for "ifdef <attribute>" blocks. It goes like this:
ifdef <attr> / ifndef <attr>
elifdef <attr>
elifndef <attr>
else
endif

No indentation is possible for now, it will come later.
2007-11-09 23:41:08 +00:00
cube
baec5c01fc Don't pollute fsopttab with duplicate options for the sake of a test that
has probably been gone for a very long time.  Produces identical output.
2007-11-09 05:21:30 +00:00
cube
f51c36b80a - Make include/cinclude/package eat up to the next new-line character.
- Fix casts in getincludepath() and re-work it to ignore the unused end of
  the line.
2007-11-09 05:06:08 +00:00
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