Commit Graph

12954 Commits

Author SHA1 Message Date
wiz
3ca7a10cff Use false/true on boolean, not increment.
From Henning Petersen in PR 49194.
2014-09-11 08:22:03 +00:00
apb
73b33010e7 Add a test for backslash-newline at the very end of a command script. 2014-09-09 10:22:27 +00:00
apb
14a634bc53 Change @echo to echo in several places in escape.mk,
to make it easier to spot changes in what make sends to the shell.
Adjust escape.out to match.
2014-09-09 10:11:20 +00:00
dholland
012b391598 Restore -r1.234 of make.1, which was an unrelated fix from sjg pertaining
to the docs for the -w option.
2014-09-09 06:41:56 +00:00
dholland
718f11413b Revert the man page as well. (hi joerg)
Revert it to 20140823 (-r1.230), before the controversial commits,
which changed it a good deal.
2014-09-09 06:39:59 +00:00
dholland
3728c0fad2 Restore apb's 20140820 commit (-r1.228 of main.c):
It should not be an error to have VAR != command that prints no output

Joerg reverted a bit too enthusiastically.
2014-09-09 06:18:17 +00:00
joerg
d92bea4fa3 Revert all make changes except the unit tests to the state of three
weeks ago. Individual changes can be reapplied after review.
2014-09-07 20:55:34 +00:00
wiz
51b005985e Sort sections. Remove trailing whitespace. 2014-09-06 21:21:36 +00:00
dholland
5136cf6d6b Clarify the usage message. For PR 49177. 2014-09-06 18:58:35 +00:00
dholland
5aa87af538 On reflection change "outputname" to "headername" so it's clear it's not
the output of uuencode.
2014-09-06 18:58:05 +00:00
dholland
d1f9310d50 Clarify and generally improve. The expansion of files is not a bug,
it's a consequence of what uuencode does. Also note for a more hostile
internet environment that blindly uudecoding files without inspecting
the header is dangerous.

Pursuant to PR 49177.
2014-09-06 18:54:46 +00:00
dholland
fb7387f1d1 Fix wrong use of argument identifiers; pursuant to PR 49177. 2014-09-06 18:37:01 +00:00
wiz
875700f431 Reduce pirate slang. 2014-09-05 06:57:20 +00:00
christos
1639e1cf8d document commented out .INVISIBLE and .JOIN. 2014-09-04 19:07:47 +00:00
mrg
a1ff035944 port the -ut / -nut options from freebsd. -ut (default) enables tabs
in output, the -nut uses spaces.
2014-09-04 04:06:07 +00:00
matt
27620987b8 New files for OR1K support 2014-09-03 19:34:25 +00:00
wiz
c11d7d47ce New sentence, new line. 2014-08-31 07:23:53 +00:00
christos
94162e221a PR/49134: Kamil Rytarowski: Add -q flag. 2014-08-31 07:05:33 +00:00
sjg
82b1920e05 Replace use of $() with ${}
$() means something special to the shell, so ${} reduces confusion
and is used almost exclusively in the rest of the makefiles.

Discussed with: christos
2014-08-30 22:21:07 +00:00
sjg
294be283d0 *.rawout are out-of-date if ${TEST_MAKE} is newer. 2014-08-29 20:03:27 +00:00
sjg
75abee676e posix1.mk and suffixes.mk need to cleanup in order to achieve
repeatable results.
posix1.mk's lib.a target still looks dubious.
2014-08-29 15:55:44 +00:00
christos
aeacc22675 undo eating the trailing backslash now that the shell has been fixed. 2014-08-29 09:27:43 +00:00
sjg
a1caebb65d Enter/leave flag is -w not -dw 2014-08-28 19:55:00 +00:00
christos
98e4fd4ef7 don't leave trailing backlashes on commands, just like gmake does. What does
POSIX have to say?
2014-08-28 14:39:13 +00:00
joerg
9d3b3e9cc5 Fix ldd on LP64 platforms by splitting the symbol versioning stuff for
elf64 as well.
2014-08-28 12:23:29 +00:00
christos
f50c40cd6c Make .INVISIBLE nodes be ignored by suffix transformations. 2014-08-27 08:50:38 +00:00
joerg
aa44bc3b18 Bump CONFIG_VERSION. 2014-08-24 20:22:18 +00:00
apb
089825332f Let "make clean" delete the files and dirs created by some of the tests. 2014-08-24 17:17:24 +00:00
apb
71a54383f7 In either a variable assignmentor a command, backslash-backslash-newline
does not escape the newline.  This is compatible with gmake.
2014-08-24 16:47:12 +00:00
apb
b4e732f551 Our practice is that an even number of backslashes before a newline
in a variable assignment simply stores the backslashes as part of the
value, and treats the newline as though it was not escaped.  This
is compatible with GNU make.
2014-08-24 16:08:14 +00:00
apb
175bed92d9 Our practice, despite what POSIX might say, is that "\#"
in a variable assignment stores "#" as part of the value.
The "\" is not taken literally, and the "#" does not begin a comment.
2014-08-24 15:10:13 +00:00
apb
c80311840b Convert the variable printing tests to use .USE rules,
to ensure that the value printed always comes from the expected variable.
2014-08-24 14:38:38 +00:00
apb
ae2e300da1 Adjust tests to correct for the fact that end-of-line comments
in variable assignments should not be included in the value.

Also fix more typos.
2014-08-24 14:04:35 +00:00
apb
c761b26f2c Fix more typos in variable names. 2014-08-24 13:11:49 +00:00
apb
e989f440f6 Fix typos in variable names, and in a comment. 2014-08-24 13:07:25 +00:00
apb
b3edfc2816 Add tests for backslash escaping in make(1).
Many of these tests fail, and I have populated the escape.exp file with
the results that I expect, not with the results that make(1) actually
produces.

Also update the set lists for these tests.
2014-08-24 11:52:45 +00:00
christos
69f7fee3bd fix output based on new sources 2014-08-23 16:08:42 +00:00
christos
6076cfd13e Instead of adding the test in 48095 I added the tests in 48096. Add the
missing test now.
2014-08-23 15:21:35 +00:00
christos
defa6c58f6 PR/46096: Jarmo Jaakkola: fix many problems with dependencies (PR 49086)
Quite extensive rewrite of the Suff module.  Some ripple effects into
Parse and Targ modules too.

Dependency searches in general were made to honor explicit rules so
implicit and explicit sources are no longer applied on targets that
do not invoke a transformation rule.

Archive member dependency search was rewritten.  Explicit rules now
work properly and $(.TARGET) is set correctly.  POSIX semantics for
lib(member.o) and .s1.a rules are supported.

.SUFFIXES list maintenance was rewritten so that scanning of existing
rules works when suffixes are added and that clearing the suffix list
removes single suffix rules too.  Transformation rule nodes are now
mixed with regular nodes so they are available as regular targets too
if needed (especially after the known suffixes are cleared).

The .NULL target was documented in the manual page, especially to
warn against using it when a single suffix rule would work.
A deprecation warning was also added to the manual and make also
warns the user if it encounters .NULL.

Search for suffix rules no longer allows the explicit dependencies
to override the selected transformation rule.  A check is made in
the search that the transformation that would be tried does not
already exist in the chain.  This prevents getting stuck in an infinite
loop under specific circumstances.  Local variables are now set
before node's children are expanded so dynamic sources work in
multi-stage transformations.  Make_HandleUse() no longer expands
the added children for transformation nodes, preventing triple
expansion and allowing the Suff module to properly postpone their
expansion until proper values are set for the local variables.

Directory prefix is no longer removed from $(.PREFIX) if the target
is found via directory search.

The last rule defined is now used instead of the first one (POSIX
requirement) in case a rule is defined multiple times.  Everything
defined in the first instance is undone, but things added "globally"
are honored.  To implement this, each node tracks attribute bits
which have been set by special targets (global) instead of special
sources (local).  They also track dependencies that were added by
a rule with commands (local) instead of rule with no commands (global).

New attribute, OP_FROM_SYS_MK is introduced.  It is set on all targets
found in system makefiles so that they are not eligible to become
the main target.  We cannot just set OP_NOTMAIN because it is one of
the attributes inherited from transformation and .USE rules and would
make any eligible target that uses a built-in inference rule ineligible.

The $(.IMPSRC) local variable now works like in gmake: it is set to
the first prerequisite for explicit rules.  For implicit rules it
is still the implied source.

The manual page is improved regarding the fixed features.  Test cases
for the fixed problems are added.

Other improvements in the Suff module include:
  - better debug messages for transformation rule search (length of
    the chain is now visualized by indentation)
  - Suff structures are created, destroyed and moved around by a set
    of maintenance functions so their reference counts are easier
    to track (this also gets rid of a lot of code duplication)
  - some unreasonably long functions were split into smaller ones
  - many local variables had their names changed to describe their
    purpose instead of their type
2014-08-23 15:05:40 +00:00
wiz
ecd932c9a3 Bump date for previous. 2014-08-23 15:03:22 +00:00
christos
be99220c64 Convert test in PR/49085 2014-08-23 15:02:04 +00:00
christos
4da7383dde PR/49085: Jarmo Jaakkola: fix several parsing errors
Don't exit from var.c:Var_Parse() before possible modifiers are handled
on D and F modified versions of local variables.  Properly expand $(?D)
and $(?F) too.

Make line continuations in rule's commands POSIX compliant.

Fix the syntax error caused by lib(member) as the last target before
a dependency operator.

Document the line continuation change in the manual page.  Also talk
more about the POSIX style local variables and their modifiers.

Add tests covering the fixed problems into d_posix.mk.  The test is
a known failure at the moment because of PR 49086 and PR 49092.

[XXX: unconverted tests]
2014-08-23 14:50:24 +00:00
apb
ee8e02daed Add a .PATH, so you can be in any other directory and run
"make -f /path/to/this/Makefile sometest.out"
and have it create sometest.out in your current directory.
2014-08-21 22:00:30 +00:00
apb
c354f55834 Add varmisc.mk, for miscellaneous variable tests.
For now, the only test is copied from
src/tests/usr.bin/make/d_unmatchedvarparen.mk.  This was
the only test in src/tests/usr.bin/make that was not also in
src/usr.bin/make/unit-tests.

XXX: src/tests/usr.bin/mk should be changed to reach over to
src/usr.bin/make/unit-tests, instead of keeping out of date copies
of the tests.
2014-08-21 15:37:13 +00:00
apb
b9dad2e00f Give each group of tests its own output file.
* Rename each sub-makefile to *.mk;
* Add a *.exp file of expected output for each sub-makefile;
* Remove test.exp, which is replaced by all the other *.exp files.
* Use suffix rules to generate *.rawout and *.out files for
  each test case.
* Rewrite the test and accept targets to adapt to the new way.

The old (now removed) test.exp file is almost identical to the
concatenation (in the correct order) of all the new *.exp files.  There
are expected differences in makefile names embedded in the output, and
the new "exit status" lines.  Some old "*** Error code 1 (ignored)"
lines are also removed (replaced by new "exit status 1" lines).
2014-08-21 13:44:51 +00:00
apb
8189a8d901 Stricter sed expression for matching an optional PID in square brackets. 2014-08-21 13:31:52 +00:00
apb
ff90baf509 When sanitising test output, replace "${TEST_MAKE}" with "make".
This string may appear in error messages that end up in the output.
2014-08-21 12:42:03 +00:00
apb
9dba8e3973 Add tests for VAR != command. 2014-08-20 08:39:14 +00:00
apb
21c7c4bccf It should not be an error to have VAR != command that prints no output 2014-08-20 08:37:25 +00:00
pooka
65016d742c Might as well byteswap when we assign to local variables instead of when
we use said variables.
2014-08-18 14:40:17 +00:00
pooka
c0fd8e41a5 quasi-cosmetic nit to previous: limit variable scope 2014-08-18 14:35:29 +00:00
pooka
6dd8e526f0 Add compat for bus version 2.
Fixes tests, but, XXX, should add tests for bus version 3.
2014-08-18 14:33:23 +00:00
pooka
c31e06706c make name more descriptive: SWAPME -> FIXENDIAN
no functional change
2014-08-18 14:23:24 +00:00
pooka
756b0ff491 fix tyop in error message 2014-08-18 14:21:44 +00:00
pooka
3b9faec799 support endian-independent operation on all platforms 2014-08-18 14:21:18 +00:00
christos
5e59f268f4 mention that -x is the default. 2014-08-18 09:45:52 +00:00
christos
f3fb7b3c54 remove XXX, fix error message 2014-08-18 09:16:35 +00:00
christos
519e6f9271 make this behave like linux; make -x the default 2014-08-18 09:14:03 +00:00
joerg
6616828fd2 Restore explicit rule for swap*.o. 2014-08-18 08:07:02 +00:00
joerg
a26164117a Reorganize symbol table embedding. The existing option SYMTAB_SPACE is
replaced by the make option COPY_SYMTAB set to any value. The copy of
the symbol table is no longer put into a buffer in kern_ksyms.o, but a
small helper object. This object is build first with a dummy size, then
the kernel is linked to compute the real dimension of the symbol table
buffer. After that, the helper object is rebuild and the kernel linked
again.
2014-08-17 21:17:43 +00:00
wiz
ac40b25ccf Fix year of Hawaiian Admission Day. From Henning Petersen in PR 49123. 2014-08-17 10:01:14 +00:00
apb
3453b7f9d9 More detail about treating a local file as a man page,
and about how to request machine-specific man pages.
re
2014-08-14 15:44:47 +00:00
apb
ee28f0e59d For an argument to be interpreted as a local file name, bypassing the
search rules in man.conf or MANPATH, it must begin with "/", "./", or
"../".  Simply testing whether it contains "/" is wrong, because it
breaks usage like "man 8 vax/boot".

This reverts revision 1.57 dated 2013-10-06,
"Be more permissive in interpreting man pages as filenames".
2014-08-14 15:31:12 +00:00
christos
eefaa0a08a PR/49109: Jeremie Le Hen: fix sed relative addressin (1,+N)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192108
http://svnweb.freebsd.org/base?view=revision&revision=269302
XXX: pullup 7.
2014-08-13 11:35:34 +00:00
tls
ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
matt
beb9c6d1b5 Preliminary files for AARCH64 (64-bit ARM) support.
Enough for a distribution build.
2014-08-10 05:47:35 +00:00
bad
2a950d2831 Treat an undefined option as a warning instead of an error when undoing an
option.

Allows one to win with declarations like:
no options 	MSGBUFSIZE
options 	MSGBUFSIZE="128*1024"

Briefly discussed with cube@, lukem@ and martin@.
2014-08-09 12:40:14 +00:00
gson
4cfcf01b16 Fix comment: Error, Fatal, and Punt take any number of arguments, not two. 2014-08-08 19:20:39 +00:00
christos
f70ccee6df Fix overflow check. From Kamil Rytarowski. 2014-08-05 08:20:02 +00:00
apb
f80058aa23 Synchronise several shell_quote implementations, and:
* Elide some unnecessary pairs of quotation marks, to improve readability.
  For example, shell_quote "''" is now \'\' instead of ''\'''\'''.
* Don't add quotes around words that contain only safe characters,
  to improve readability.
* LC_COLLATE=C to prevent [a-zA-Z] from matching non-ASCII characters.
* Use ${SED} if defined.
2014-08-04 21:56:30 +00:00
martin
72c3b0988d Cast signal argument of kill(2) to int, as sig_atomic_t may be larger.
Avoids:
src/usr.bin/timeout/timeout.c:331:5: error: conversion to 'int' from 'sig_atomic_t' may alter its value [-Werror=conversion]
     kill(pid, sig_term);
     ^
warning from gcc 4.8
2014-08-02 09:16:22 +00:00
wiz
77ebce0be6 Punctuation, markup, whitespace improvements. 2014-08-02 06:20:56 +00:00
christos
3f7fdb96f5 PR/49053: Kamil Rytarowski: Import timeout(1) from FreeBSD 2014-08-01 14:01:30 +00:00
christos
7a7434fee0 import from FreeBSD 2014-08-01 13:50:55 +00:00
dholland
dfb86850e0 Remove broken snprintf usage (noted in PR 47976) and replace with
something simpler.
2014-07-27 04:32:23 +00:00
dholland
0858ed9253 Fix snprintf usage; from Henning Petersen in PR 47976. 2014-07-27 04:26:23 +00:00
dholland
3363cdd991 typo in comment 2014-07-20 23:00:49 +00:00
christos
ed61af43d9 use hdestroy1 now that hdestroy does not free the key. 2014-07-20 20:20:16 +00:00
justin
d6d2630dfe Avoid use of __arraycount in tools as not portable 2014-07-16 19:31:11 +00:00
justin
da43bc8c3e Remove an accidental C99-ism in tools which needs to be portable 2014-07-16 18:58:07 +00:00
christos
95956a7389 remove debugging 2014-07-16 16:52:59 +00:00
christos
6b5672dab1 PR/48367: David A. Holland: Mark possible submake nodes so that we can
avoid closing the job pipe on exec for them in order to make recursive
makes work in parallel.
2014-07-16 15:33:41 +00:00
christos
ef629cae85 first attempt at toolification. 2014-07-15 13:17:15 +00:00
christos
b415df1f94 fix type, from enh at google dot com 2014-07-14 21:56:03 +00:00
dholland
d2a6847577 Remove leftover #if 0 code from before the libquota rework. 2014-07-13 01:46:04 +00:00
nakayama
653203959c Use u_long to avoid negative value outputs. 2014-07-12 20:04:31 +00:00
mlelstv
6afb7d5190 don't enable IXANY. 2014-07-12 05:28:07 +00:00
christos
11ecaffd58 remove dup usage print (enh at google dot com):
arm just sent us (Android) this:
https://android-review.googlesource.com/#/c/100970/1
2014-07-11 16:30:45 +00:00
apb
1546931886 mtree spec files want nanoseconds, so multiply the microseconds by 1000. 2014-07-06 20:54:47 +00:00
apb
117589e5c1 When printing a timestamp to a metalog, use 9 digits
for the nanoseconds part, except use only 1 digit if
the value was zero.
2014-07-06 20:50:03 +00:00
dholland
b7b7574d3b Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
2014-07-05 19:22:41 +00:00
dholland
c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00
christos
bf51dc6d97 restore sccsid[]'s per core@'s decision 2014-06-26 02:14:32 +00:00
uwe
7fbcdeb13a Command file argument to -f is not optional. 2014-06-25 02:05:58 +00:00
shm
ce020e4866 PR/47319 use addgrp_ret_t instead of magic values 2014-06-23 06:57:31 +00:00
christos
ff4ba887a6 typo 2014-06-21 21:05:54 +00:00
christos
239f3a758e CID 10006930: Prevent outfile overwrite resource leak. 2014-06-21 17:43:04 +00:00
manu
fe10ff49c1 Use returned size and not buffer max length when displaying attribute
From Thomas Schmitt <scdbackup@gmx.net>
2014-06-20 15:22:01 +00:00
manu
f56cc676bf Do not record a trailing \0
From Thomas Schmitt <scdbackup@gmx.net>
2014-06-20 14:55:31 +00:00
njoly
e75f143af6 Remove fagile test which ensured that first namelist element (was
X_NCHSTATS) had a known type. Make disk stats available again for
vmstat display.
2014-06-20 07:08:15 +00:00
sjg
5e8aec3baa Return varNoError rather than var_Error for ::?= etc. 2014-06-20 06:13:45 +00:00
uwe
5a5964be39 Suppress space after -I and -i options in description too.
XXX: This should be documented explicitly.
2014-06-18 14:47:02 +00:00
uwe
8b8d85039c Suppress space after -I and -i options. 2014-06-18 14:26:15 +00:00
christos
c095d1ec95 Fix usage. The man page is incorrect with respect to -I and -i and need
fixing, but my troff foo is not there.
2014-06-18 14:15:50 +00:00
christos
71faadbf26 fix second line of synopsis. 2014-06-18 14:12:20 +00:00
wiz
55d6e53ccb Sync usage with manpage. 2014-06-18 09:41:29 +00:00
wiz
9825fbace6 Sort options. Use Ss for non-standard headers. New sentence, new line.
Add missing Op.
2014-06-18 09:35:31 +00:00
christos
a406f30e48 add -u (unbuffered output) after GNU sed. 2014-06-17 16:39:02 +00:00
wiz
980f4832e1 Fix -f description: it is also ignored if stdin is a FIFO.
From Philip Guenther via jmc@openbsd.
Bump date.
2014-06-15 11:37:56 +00:00
joerg
10aed88aaf GC X_NCHSTATS 2014-06-14 20:10:42 +00:00
joerg
99d9473857 Init summary counters. 2014-06-14 04:06:54 +00:00
joerg
11e7f587a5 Fix format string for ILP32. 2014-06-14 01:26:59 +00:00
joerg
67c88a0d78 Use kern.pool for the live system. 2014-06-13 19:10:01 +00:00
joerg
7be9a8f800 Remove unused headers. 2014-06-13 11:26:37 +00:00
joerg
375882325f Remove KVM support. 2014-06-11 14:57:55 +00:00
christos
3a475c5557 PR/48883: Justin Cormack: Cope with systems that don't provide REG_STARTEND 2014-06-09 12:48:58 +00:00
mlelstv
e34b3bf0dd Handle ctime() failure. 2014-06-08 09:53:43 +00:00
enami
ac4742896b Fix signal delivery to remote process; As described in rcmd(3), a signal
is delivered to the remote process via the secondary channel.  So,
the backend driver, rcmd(1), is responsible to watch the file descriptor 2
and transfer the data to the remote process, rather than receiving signal
by itself.  Previously, signal generated by tty was sent since rcmd was
incorrectly generated the data, but, for example, signal sent to rsh command
by kill command was ignored.
2014-06-08 02:44:15 +00:00
enami
bd8959c84b Whitespace nits. 2014-06-08 02:02:41 +00:00
enami
97fb545d9f Remove kerberos support code completely. It no longer compiles anyway.
OK'ed by christos on tech-userlevel.
2014-06-08 01:44:52 +00:00
christos
999f583a86 put back WARNS=6 2014-06-07 16:37:32 +00:00
christos
72feb6a6b9 PR/48880: Ryo ONODERA: Unapply one of our patches that broke 'G'. 2014-06-07 16:36:54 +00:00
ryoon
83acbdf28c Restore G command 2014-06-07 06:02:27 +00:00
wiz
15b8d8629f Renumber so that 3 follows 2. 2014-06-06 21:56:39 +00:00
christos
26bea92f67 After 2 comes... 2014-06-06 14:36:38 +00:00
joerg
6457787c51 usage is __dead. Kill useless sccsid. 2014-06-06 12:46:54 +00:00
christos
81af4b3486 Prefer setvbuf for those who have it. 2014-06-06 01:45:11 +00:00
christos
186a5e22f3 add netbsd 2014-06-06 00:14:55 +00:00
christos
ef24ec4ecc Merge our changes. 2014-06-06 00:13:13 +00:00
joerg
deae2c9ba3 Always use_sysctl in preparation of removing all kvm code. 2014-06-03 22:22:41 +00:00
joerg
6cf722d5a8 GC left-over kread. 2014-06-03 21:56:30 +00:00
joerg
472ed4a521 Use CPU statistics from uvmexp when possible. 2014-06-03 21:56:03 +00:00
joerg
201b45ebb5 Use kern.clockrate if possible. 2014-06-03 21:45:41 +00:00
joerg
100b00cbbc Convert the remaining uvmexp users to the sysctl as default source. 2014-06-03 21:41:56 +00:00
joerg
5b23be7ac8 Use vm.uvmexp data as much as possible for vmstat -s.
Temporarily disable shadowing warning until the other users are cleaned
up.
2014-06-03 21:31:54 +00:00
joerg
94adc2671a Provide sysctl for namecache statistics. 2014-06-03 21:16:15 +00:00
joerg
93b8079710 GC unused variables. 2014-06-02 22:57:50 +00:00
joerg
11c4049413 Drop kvm-based access for driver statistics. 2014-06-02 19:29:00 +00:00
joerg
8670ce0cf0 Make missing kern.evcnt an error, don't try to fallback to kmem use. 2014-06-02 19:16:10 +00:00
msaitoh
e5ef5a5dc5 Remove duplicated lines. 2014-05-30 19:01:52 +00:00
msaitoh
42c09e06f3 Add 5.1.4, 5.2.2. 6.0.4 and 6.1.3. 2014-05-30 08:36:28 +00:00
rmind
2286cc983b netstat(1) and ifmcstat(8): ifnet was renamed to ifnet_list, PR/48850. 2014-05-30 01:44:21 +00:00
wiz
910ba5f05b Bump date for previous. 2014-05-29 08:13:17 +00:00
mrg
ebf7669ed7 implement "no ident". 2014-05-29 07:47:45 +00:00
jnemeth
88eea82455 Happy Towel Day! 2014-05-25 16:08:11 +00:00
dholland
d8da1d6013 avoid error path SIGSEGV 2014-05-21 05:25:34 +00:00
sjg
f45e7bfbd6 Var_Parse: endc only counts when at the correct nesting depth.
This ensures we correctly detect errors like:
.if empty(VAR && !empty(FOO)

Var_Subst: if Var_Parse returns var_Error it is an error.
This ensures we detect errors like:

VAR:= ${FOO.${GOO}
2014-05-19 22:09:58 +00:00
apb
ba94e92b25 Add an example with find ... -exec sh -c .... 2014-05-17 11:31:40 +00:00
hannken
42c8d67c49 Add a global vnode cache:
- vcache_get() retrieves a referenced and initialised vnode / fs node pair.
- vcache_remove() removes a vnode / fs node pair from the cache.

On cache miss vcache_get() calls new vfs operation vfs_loadvnode() to
initialise a vnode / fs node pair.  This call is guaranteed exclusive,
no other thread will try to load this vnode / fs node pair.

Convert ufs/ext2fs, ufs/ffs and ufs/mfs to use this interface.

Remove now unused ufs/ufs_ihash

Discussed on tech-kern.

Welcome to 6.99.41
2014-05-08 08:21:53 +00:00
wiz
9237f38b59 Sort options in usage. 2014-05-05 21:04:09 +00:00
wiz
5f345558c9 Sort SYNOPSIS. Bump date for previous. 2014-05-05 20:52:45 +00:00
martin
1957b5eaba Add two new options, -U and -D, that can be used to define "makeoptions"
on the config command line. While there, rename the undocumented (internal)
parser debug option from -D to -d.
Discussed on tech-toolchain.
2014-05-05 19:08:13 +00:00
christos
6a4e46c891 Handle a closing brace at the end of a command without a preceding semi-colon:
/foo/ {p;d}
2014-05-05 17:12:11 +00:00
joerg
cc89f7922a Most CPUs implement shifts modulo the width, but ARM doesn't. Don't
depend on this UB.
2014-04-30 21:04:58 +00:00
njoly
0f34420c1f Fix compat netbsd32 syscall return values display by calling
output_long() instead of printf().
2014-04-30 11:51:51 +00:00
christos
f48bd7a250 need bsd.own.mk 2014-04-29 01:21:02 +00:00
christos
12014f31d7 use the same for the route metrics part, both in the sysctl and kmem paths.
From Takahiro HAYASHI
2014-04-28 15:41:15 +00:00
pooka
401f0b87d5 Remove LD_DYNAMIC_WEAK whine, by large it's not necessary anymore. 2014-04-27 15:26:05 +00:00
christos
9bbbeef3e7 PR/48426: Dimitris Karagkasidis: Make nfsstat use unsigned numbers. 2014-04-24 18:40:35 +00:00
christos
a2dd64f9b4 The sysctl code does not support verbose route printing that prints the
internal route statistics. Restore the old kmem route printing code that
was not just used for post-mortem displays. Reported by kardel@, test by
netstat -nrvf inet
2014-04-24 14:56:29 +00:00
christos
7cdbcec7f5 un __P 2014-04-24 14:54:51 +00:00
wiz
82cdf33b46 Bump date for previous. 2014-04-22 06:02:06 +00:00
ginsbach
236104be8e Add optional method for specifying protocol as part of the service
option.  This is similar to how the port number and protocol name are
specified in services(5).
2014-04-22 02:23:03 +00:00
christos
e305f86ab5 add more attributes 2014-04-21 21:52:24 +00:00
christos
1be8982a73 add asm function renames 2014-04-21 18:57:20 +00:00
christos
39d78ca60c fix asm() misclassification 2014-04-21 18:57:07 +00:00
snj
1f0d8af3c5 Add 6.0.5 and 6.1.4. 2014-04-19 15:51:46 +00:00
christos
9b2bca8f70 add more places where attribute is valid. 2014-04-18 21:54:52 +00:00
christos
719ac47d5d provide a poor man's fmemopen() 2014-04-18 21:53:44 +00:00
christos
f1ed7fe14d remove attribute keyword 2014-04-18 02:41:32 +00:00
christos
04a020c93e handle constant attribute 2014-04-18 02:41:17 +00:00
christos
0d1cbc6a00 don't include fmemopen in tools builds. Since tools does not define
_NETBSD_SOURCE, we don't get the fmemopen prototype
2014-04-18 02:17:14 +00:00
christos
c8b1f28fd2 Never return the attribute keywords if we are not in attribute. 2014-04-18 01:39:57 +00:00
christos
1f0ca5f12c builtins only for NetBSD since fmemopen is not portable. 2014-04-18 01:18:54 +00:00
christos
31ce3096fd Add some builtins 2014-04-18 01:15:07 +00:00
christos
687432e7a3 Handle the rest of gcc __attribute__ s. 2014-04-18 00:23:46 +00:00
christos
59bbfbb11d only fill memory with junk if BLKDEBUG 2014-04-18 00:21:14 +00:00
christos
a46cc2f317 handle LDOUBLE 2014-04-18 00:20:37 +00:00
christos
20ba703761 make outname print where it came from in case of error 2014-04-17 18:52:03 +00:00
christos
10e73b5c30 - add a function to dump a node
- better diagnostics on abort
- allow converting a constant
- initialize right node now that we trash memory this makes a difference.
  before it was NULL.
2014-04-17 18:23:18 +00:00
christos
e34b25460d typeof and extension don't need parens 2014-04-17 17:29:24 +00:00
christos
f87049800a Trash freed memory so we catch bad uses. 2014-04-17 16:30:05 +00:00
christos
8a20351779 Don't free memory; it is used later. 2014-04-17 16:29:26 +00:00
ginsbach
42bc9b7b73 Hook getaddrinfo(1) into the build. Hi riastradh! 2014-04-15 22:09:27 +00:00
snj
fc99b6a4d6 Change some standard exit status text to ".Ex -std"
From Eitan Adler in PR bin/47790.
2014-04-13 01:45:34 +00:00
christos
e9d34c2f4d mention -V none 2014-04-11 17:41:09 +00:00
christos
0b1777bf87 recognize -V none 2014-04-11 17:30:03 +00:00
dholland
1c111fd5cf typo in comment 2014-03-23 04:58:16 +00:00
pooka
3f0878753a On glibc systems, issue a warning if LD_DYNAMIC_WEAK is not 2014-03-21 16:26:30 +00:00
riastradh
5c1b7f4542 Clarify some wording in getaddrinfo.1. 2014-03-19 18:21:39 +00:00
ginsbach
aa8e09363a Add missing include files. Don't rely on them bein pulled in as a
side effect of other includes.  Fixes build errors when getaddrinfo(1)
is added to the usr.bin tree.
- need <sys/socket.h> for address family (AF_*) and socket type (SOCK_*)
- need <stdio.h> for printf() and friends
2014-03-19 01:24:32 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
dholland
c49e034e83 Fix gcc48 build. No obvious reason why nobody else has hit this... 2014-03-16 01:07:46 +00:00
dholland
19d6c717ae Fix gcc48 build without Kerberos.
While here, rectify related bug where if gethostname() failed, login
would null-terminate uninitialized stack trash and cheerfully pass it
on to kerberos. In this case, revert to "amnesiac" instead.
2014-03-16 00:33:13 +00:00
ginsbach
55791dff41 add missing break 2014-03-14 13:17:18 +00:00
jdc
3db3d1f929 Restore lost break. 2014-03-08 20:51:20 +00:00
riastradh
da030fc8bd `Controller' takes two l's. 2014-03-06 15:00:21 +00:00
matt
b1f346caa8 Use OBJECT_FMTS from <bsd.own.mk> to determine elf32/elf64 needs 2014-03-02 03:55:19 +00:00
matt
cbff955678 Use OBJECT_FMTS from <bsd.own.mk> 2014-03-02 03:42:50 +00:00
ginsbach
28ffd7e64f AF_MAX isn't an address family so don't include it in the generated table. 2014-02-27 01:17:13 +00:00
joerg
a400a0406f struct member can't be null, if the pointer itself is valid. 2014-02-27 00:49:46 +00:00
skrll
6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
mlelstv
8ab37b8ab4 skip unparseable addresses. 2014-02-23 07:50:01 +00:00
dsl
dc210c7fbd Remove some pointless inclusions os sys/user.h 2014-02-19 20:42:14 +00:00
christos
34fd6c876e add __extension__ and typeof 2014-02-18 22:01:36 +00:00
christos
a675eb32ca __real__ and __imag__ produce lvalues 2014-02-18 20:43:36 +00:00
uwe
28b0656f7c config() in manconf.c now verifies _build (and _crunch) command
templates with fmtcheck(3) so annotate the printf that uses these
commands as safe with a __format_arg wrapper and drop
-Wno-format-nonliteral.

XXX: Using local wrapper for now, solving this in general would be
nice, but it raises namespace pollution issues.

XXX^2: catman(8) also uses manconf.c and uses _build and _crunch so it
can also benefit from this (but see above).
2014-02-17 03:10:12 +00:00
uwe
20ec07777a Check _build and _crunch commands with fmtcheck(3), warn about and
ignore bad ones.
2014-02-17 02:53:48 +00:00
sjg
2adf342aef Put .INCLUDEDFROM* in the right section 2014-02-15 18:55:30 +00:00
christos
7757a9ebde delete the correct variables on eof
fix typo in comment (from sjg)
2014-02-15 00:17:17 +00:00
christos
d2bf840533 fix protocol printing order. 2014-02-14 20:43:34 +00:00
wiz
26dba06cb7 Fix some typos found by Rich Neswold and reported in PR 48597. 2014-02-13 22:36:28 +00:00
sjg
e84a63caab Reduce the calls to realloc from brk_string by basing initial argmax guess
on length of input.

Reviewed by: christos
2014-02-12 01:35:56 +00:00
pooka
9f33b0ead1 Use Var_Value() instead of getenv() to obtain MAKEOBJDIR{,PREFIX}.
Fixes "make -X MAKEOBJDIR=foo".  Purely uncoincidentally, build.sh
creates the nbmake wrapper with MAKEFLAGS -X on FreeBSD.
2014-02-07 17:23:35 +00:00
wiz
47c7c18d7f Correct number of output files in example.
From Jason McIntyre <jmc@OpenBSD>.

While here, also explain about the extra file in the example and
put .Ex into its own section in the correct place. Bump date.
2014-02-04 19:48:48 +00:00
njoly
a935b103a7 Handle another declaration after statement case for lint in c99 mode.
Add the corresponding testcase.
2014-02-04 08:08:59 +00:00
wiz
97cd0ff474 From Igor Sobrado in private email (based on his OpenBSD commit):
improve POSIX compliance by continuing to process the remaining file
    operands after not finding an input file.

    from the IEEE Std 1003.1-2008 (``POSIX.1'') rationale:

    "Unlike other utilities, some historical implementations of cut
    exit after not finding an input file, rather than continuing to
    process the remaining file operands.  This behavior is prohibited
    by this volume of POSIX.1-2008, where only the exit status is
    affected by this problem."

    joint work with jmc@, who identified the compliance issue, and millert@

    ok millert@, jmc@
2014-02-03 20:22:19 +00:00
pooka
dd477c0e3e Clarify that -l params must be given after options. 2014-01-28 14:02:54 +00:00
pooka
7943bb5b88 * make -h actually work
* give usage for invalid usage
2014-01-28 13:58:25 +00:00
pooka
ce8449bfdb rcs id police *uuu-aaa, uuu-aaa* 2014-01-28 13:56:02 +00:00
jnemeth
020285b36a add today's releases: 5.1.4, 5.2.2, 6.0.4, and 6.1.3 2014-01-27 21:00:02 +00:00
matt
01097770dd Recognize coldfire 2014-01-26 18:24:29 +00:00
riastradh
3a07c2a841 Get SIZE_MAX and OFF_MAX straight... 2014-01-25 16:38:15 +00:00
riastradh
482c113d44 Factor out an offtab_compute_window_position routine. 2014-01-25 16:26:17 +00:00
riastradh
0853010545 Fix some more integer overflow/truncation issues.
Arithmetic in C is hard.  Let's go shopping!
2014-01-25 15:31:06 +00:00
christos
115b322731 CID 1164169: integer overflow 2014-01-24 17:30:18 +00:00
christos
9db3fbf52f Checking _LP64 to determine the size of the built binary is just wrong. We
build n32 by default on mips64 now, we don't handle the compat build which
is n64. This is the same case for sparc64/sparc and amd64/i386 (lint does
not run in compat)
2014-01-24 00:17:33 +00:00
joerg
eecb404dbe Mark offtab_bug[x] as dead. 2014-01-23 14:17:05 +00:00
riastradh
380386c8de Fix $NetBSD$ tag. 2014-01-22 14:25:07 +00:00
riastradh
708b399e9d Bump date on vndcompress(1) man page. 2014-01-22 06:18:17 +00:00
riastradh
18fe60ee74 Fix vndcompress man page to reflect default window size. 2014-01-22 06:18:09 +00:00
riastradh
f13ecd80a5 Change vndcompress to use a default window size of 512.
For vnduncompress on nonseekable input, the window size is as large
as it needs to be by default, as before.  Not clear that this is the
right choice -- by default vnduncompress on nonseekable input will
just use unbounded memory unsolicited.
2014-01-22 06:18:00 +00:00
riastradh
120dc04ff6 Document the new vndcompress -w option and nuke BUGS section.
Perhaps vndcompress and vnduncompress ought by default to choose a
limited window size (say, 8192 entries, i.e. 64k bytes, the default
MAXPHYS), and vnduncompress should fall back to an unlimited window
only if the input is nonseekable.
2014-01-22 06:17:51 +00:00
riastradh
a7ef6dc75a Reflect rename of -s' to -b' in the vndcompress man page. 2014-01-22 06:17:42 +00:00
riastradh
dc88592abd Move err1 & errx1 to the end of vnduncompress.c; add __printflike. 2014-01-22 06:17:34 +00:00
riastradh
9aa3cfafcd Rename block size option from -s' to -b'.
Makes more sense and makes it consistent with other utilities such as
pax and pigz.  This vndcompress has never gone out in a release, so
changing the name of the option shouldn't cause too many problems...
2014-01-22 06:17:25 +00:00
riastradh
a4a41d7780 Simplify vndcompress offtab_compute_window_size. 2014-01-22 06:17:16 +00:00
riastradh
a0dfc29413 Fix typo in comment. 2014-01-22 06:17:07 +00:00
riastradh
c803c22d4c Fix up ulimited vndcompress tests and explain what's up with them. 2014-01-22 06:16:59 +00:00
riastradh
02796a4937 Add some simple automatic tests for window sizes. 2014-01-22 06:16:50 +00:00
riastradh
6ae2f589bf Remove silly comment in offtab_reset_write. 2014-01-22 06:16:41 +00:00
riastradh
7dc3ecc300 Window size is now an option; remove XXX comment to the contrary. 2014-01-22 06:16:32 +00:00
riastradh
a3d8273010 Add comment explaining why piperestart.cl2part is allowed to fail. 2014-01-22 06:16:23 +00:00
riastradh
e70e005842 Split guard in offtab_write_window into offtab_maybe_write_window. 2014-01-22 06:16:14 +00:00
riastradh
a3544454a1 Seek if necessary at end of offtab_reset_read.
Fixes vnduncompress with a small window, and makes offtab_reset_read
symmetric with offtab_reset_write.
2014-01-22 06:16:05 +00:00
riastradh
7c5bfcbe34 Add option -w to vnd(un)compress to specify the window size. 2014-01-22 06:15:57 +00:00
riastradh
1c2cd5c047 Add some leading zero digits to the flags. Cosmetic change only. 2014-01-22 06:15:48 +00:00
riastradh
c9b17454f7 Add WARNS=5. 2014-01-22 06:15:39 +00:00
riastradh
5b1eaed138 Judicious (and justified) casts to avoid signed/unsigned comparisons. 2014-01-22 06:15:31 +00:00
riastradh
3e40e9d7d6 Implement machinery for fixed-size windows into the offset table. 2014-01-22 06:15:22 +00:00
riastradh
519e5b52f0 Write offsets in hexadecimal, not decimal. 2014-01-22 06:15:12 +00:00
riastradh
6e96c4ea68 Move block_signals/restore_sigmask to utils.c 2014-01-22 06:15:04 +00:00
riastradh
28c82fe6ee Use write-to-temporary/rename-to-permanent pattern in Makefile. 2014-01-22 06:14:55 +00:00
riastradh
735c239796 Abstract handling of the cloop2 offset table.
Preparation for converting it to use a fixed-size window.
2014-01-22 06:14:46 +00:00
riastradh
b06b564040 Use read_block instead of read in vnduncompress. 2014-01-22 06:14:28 +00:00
riastradh
d99bda47ef Move vndcompress utilities to utils.c. 2014-01-22 06:14:20 +00:00
riastradh
573999a972 Fail if malloc can't allocate offset table. 2014-01-22 06:14:03 +00:00
reed
c872f7bc2e use macro for OS name when first introduced 2014-01-21 02:53:30 +00:00
apb
8d32845036 Emphasise the fact that the regexp and replacement in :C/// are
subjected to variable expansion before regexp parsing.  This was already
documented if you read carefully enough, but more emphasis would have
helped me to figure out why I needed three or four backslashes where I
expected to need only two.
2014-01-19 10:23:29 +00:00
christos
c7b4698e4c make fstat -f search for unix sockets. 2014-01-17 03:28:01 +00:00
wiz
2f4794901c Sort options and option descriptions.
Document -h.
2014-01-16 09:54:05 +00:00
pooka
c06e5f9624 alleviate may-be-used-unused 2014-01-16 02:20:50 +00:00
pooka
b5108f448c Add rump_wmd, a utility to resolve rump kernel component dependencies. 2014-01-16 01:54:47 +00:00
christos
3e99fec0fb empty init_decl {} is valid 2014-01-16 00:43:43 +00:00
pooka
77666f11e0 terminology audit 2014-01-16 00:32:48 +00:00
pooka
5304903c03 Attempt to load all components even if they are not given in
dependency order.
2014-01-16 00:31:39 +00:00
pooka
fad3839b1f use rumpuser_port.h 2014-01-15 16:53:32 +00:00
wiz
6c4455e96a Bump date for previous. 2014-01-10 16:28:34 +00:00
christos
6ee57b9ada add .INCLUDEDFROM{FILE,DIR} 2014-01-10 16:12:52 +00:00
wiz
0eb3a654b0 Better document eval, mentioning optional second and third arguments.
Requested by martin.
Bump date.
2014-01-07 13:32:21 +00:00
joerg
d9c7ee5b63 Annotate functions using format strings. 2014-01-07 02:07:08 +00:00
christos
5eb5e1c36d - use just the basename for program name
- quote variables
- use mktemp to create directories (from jtc)
- exit on errors
2014-01-06 22:43:15 +00:00
wiz
cefc4c9359 Remove second copy for RCS Id. 2014-01-04 15:43:27 +00:00
martin
65dddd35c0 Remove .note.netbsd.mcmodel and .note.netbsd.pax from the chrunched binaries.
We don't know wether the former would make sense (as currently used, it never
makes sense for static binaries) and we can not conclude safe PAX flags from
combined binaries.
2014-01-04 08:58:51 +00:00
sjg
7a951eee59 Treat '~' as a meta char requiring a shell.
Patch from Steve McIntyre 93sam at debian.org

Reviewed by: christos
2014-01-03 00:02:01 +00:00
pooka
4b870e3771 Use signal.h instead of sys/signal.h. The latter is not standard
and does not exist at least on systems with musl libc.

from Justin Cormack
2013-12-31 00:23:56 +00:00
rjs
d63e9ca599 Only build shmif_dumpbus when rump is available. 2013-12-28 02:32:01 +00:00
wiz
d95f5d3fd5 Revert previous, it was wrong.
From David H. Gutteridge in PR bin/48460.
2013-12-20 17:01:39 +00:00
wiz
dc3127b204 Document what ngen 0 does.
From David Gutteridge in PR 48460.
2013-12-20 10:14:25 +00:00
pooka
aab6639102 make portable 2013-12-20 10:04:33 +00:00
pooka
ef64361cbb Allow overriding LIBCRT0 in mk.conf 2013-12-20 09:44:16 +00:00
pooka
84de6be8b7 RCS Id police stings again! 2013-12-20 09:36:03 +00:00
pooka
26ef2cc943 If creating a pcap dump to stdout, print metainfo to stderr. 2013-12-20 09:32:13 +00:00
rmind
4aae4db7db Add shm_open(3) and shm_unlink(3) to support POSIX shared memory objects.
They are implemented using tmpfs (mounted at /var/shm).

Discussed on tech-{kern,userlevel} (quite a while ago).
2013-12-19 19:11:50 +00:00
pooka
a1ee0e7eea Actually, nevermind with the whole LD_DYNAMIC_WEAK business, forgot
to unset it from the shell before testing.
2013-12-18 20:56:32 +00:00
pooka
e51a22a59b Set LD_DYNAMIC_WEAK, required by glibc ld.so for -l params.
(this accidentally slipped in the previous commit already, but
I'm recommitting it to get cvs annotate right)
2013-12-18 20:50:30 +00:00
pooka
57d34ab9b0 Use rumperr to print correct error strings on !NetBSD. 2013-12-18 20:48:31 +00:00
apb
81b1fb1df7 In all man pages that say:
The -H, -L and -P options are ignored unless the -R option is
    specified.  In addition, these options override each other and the
    command's actions are determined by the last one specified.

Add:

    The default is as if the -P option had been specified.
2013-12-17 09:54:08 +00:00
bad
a88c18e5e2 Don't hold back, tell us how you really feel when dlopen() fails. 2013-12-16 23:27:33 +00:00
mlelstv
9a7a6e815f Fix output for -A -f ... 2013-12-15 18:56:59 +00:00
wiz
82c52eb924 sync usage with man page 2013-12-15 09:21:03 +00:00
wiz
73135dc321 Sort SYNOPSIS and option descriptions. Bump date for previous. 2013-12-15 09:20:48 +00:00
wiz
95452ff947 Sync usage and option descriptions with manpage. 2013-12-15 09:18:31 +00:00
wiz
4b6a96229a Standardize SYNOPSIS. Sort option descriptions and remove duplicates. 2013-12-15 09:18:14 +00:00
mlelstv
b3d56b5ecb New -A option. Add an output column with the address of the
kernel object (vnode or file) that can be matched with prstat(8) output.
2013-12-15 08:16:24 +00:00
christos
7f1aab93ea Put back the extra prototype for main(); some programs #define main to
something else, so we need the extra prototype.
2013-12-15 06:07:39 +00:00
christos
a54bed1665 downgrade illegal bitfield from error to warning so we can ignore it. 2013-12-15 03:43:37 +00:00
christos
0213edf018 - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
2013-12-15 00:40:17 +00:00
wiz
d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
pettai
515a14aba7 fix == compatibility problem 2013-12-06 13:33:15 +00:00
mbalmer
4675096298 Nelson Mandela died today, aged 95. I whish farewell to a great statesman. 2013-12-05 22:06:13 +00:00
christos
f95f074778 we have moved. 2013-11-28 22:39:29 +00:00
christos
f7ce1bf0d8 PR/48413: Inappropriate sign extension in kdump output 2013-11-27 20:27:58 +00:00
apb
f45f136e10 Use LIST_FOREACH, LIST_NEXT, etc., instead of direct access to
the internals of queue.h structs.
2013-11-27 17:38:11 +00:00
joerg
f9d128e05f Include signal.h early for MiNT and Linux. From pkgsrc. 2013-11-26 13:44:41 +00:00
rmind
df64447ca6 Remove cpu_queue (and thus eleminate another use of CIRCLEQ) by replacing
its uses with cpu_infos array.  Extra testing by christos@.
2013-11-24 21:58:38 +00:00
dholland
a32d5d5201 Fix documentation of how to expire old messages. For some reason the
expiration period must be given as a negative number, indicating how
many days ago to place the expire threshold.

PR 48404 from Martin Neitzel.
2013-11-24 19:49:22 +00:00
mlelstv
ffb41b3a17 Fix fallout from circleq->tailq transition. 2013-11-24 13:13:12 +00:00
christos
30107bf0d8 Update for new pcb tailq's.
While here fix ipv6 pcb printing by making tcp6_dump with tcp.
XXX: Merge the inet and the inet6 code. It is silly to need to specify
-p tcp6 to print a tcp6 pcb, we already know what it is.
2013-11-23 22:01:12 +00:00
christos
e675354f1e switch to the nv in external/bsd 2013-11-22 16:10:25 +00:00
kleink
7f9d164c04 Explicitly include <stdint.h> for uintmax_t; from Eitan Adler. 2013-11-20 17:19:14 +00:00
joerg
eb3bd1d5f0 Spell NULL pointer as NULL. 2013-11-18 19:55:59 +00:00
sjg
ca96724fac Don't SEGV when Hash_Table is uninitialized 2013-11-14 00:27:05 +00:00
sjg
d959c16735 Don't SEGV when passed NULL for list. 2013-11-14 00:01:28 +00:00
pooka
cbdf0ef490 Support disklabel partitions on all platforms.
also addresses buildrump.sh issue #41 (github)
2013-11-13 17:47:27 +00:00
pooka
8b205e8660 make -m available on all platforms 2013-11-13 16:43:38 +00:00
pettai
67f944d13d Add zfgrep that fell off from last update 2013-11-13 11:12:24 +00:00
pettai
54844dd551 Added zless(1) - comes in the lastest version of zmore(1) from OpenBSD
(OKed by tron@)
2013-11-12 21:58:37 +00:00
pooka
b82822977b Handle static rump kernel base correctly. 2013-11-11 15:53:56 +00:00
christos
fe3f867991 remove unused variables 2013-11-10 17:14:25 +00:00
mrg
5517e5441c add a row with totals for some pool statistics. 2013-11-10 05:16:10 +00:00
christos
232e5144bb reorganize to make clear variable use. 2013-11-09 15:57:15 +00:00
dholland
0256a35b09 apostrophe's do not make plural's. 2013-11-07 18:50:46 +00:00
christos
71c18b90bc more volatile for m68k 2013-11-07 02:06:51 +00:00
christos
b4ab7d1288 let progressmeter deal with the timeout once we've started transferring. 2013-11-03 14:45:50 +00:00
christos
422740a7f1 PR/34796: Hauke Fath: ftp does not timeout on http fetches. 2013-11-02 19:55:47 +00:00
christos
6fce9f6ad7 go back to using file:line: from uwe. 2013-11-01 21:39:13 +00:00
christos
8ae3ff1668 make config errors look more like other programs: <file>,<line>:
instead of <file>:<line>:
2013-11-01 17:09:59 +00:00
apb
786efef96b Document that patterns are specified using extended regular expressions. 2013-11-01 07:49:00 +00:00
christos
4a734be04d PR/48351: Dennis Ferguson: Fix incorrect parsing of flock flags.
XXX: still flock -s 0 fails with EINVAL, why?
2013-10-29 16:02:15 +00:00
njoly
9d2c3170bc Small typo. From Michael W. Bombardieri. 2013-10-29 12:27:23 +00:00
christos
094fa0251a Instead of guessing the suffix in the code, use the suffix list previously
loaded via man.conf(5). While there, zap unused iteration code.
(Franco Fichtner)
2013-10-28 23:46:17 +00:00
mbalmer
0382fd8b79 No more walk on the wild side. RIP Lou Reed. 2013-10-27 18:30:49 +00:00
wiz
6f46d26376 Remove trailing whitespace. 2013-10-27 11:38:13 +00:00
apb
e7b5d5dc5f Explain that ${VAR:M*} will normalise the inter-word spacing. 2013-10-25 22:05:00 +00:00
apb
e1debe8414 The :C/// modifier takes an extendedregular expression. 2013-10-25 20:57:02 +00:00
christos
a64eb75968 get rid of equal(), use {s,g}etprogname(). 2013-10-21 14:47:46 +00:00
christos
04908d82dd use correct function and symbolic constants 2013-10-19 15:56:05 +00:00
christos
35be7e66a7 use new scopeid functions 2013-10-19 00:28:38 +00:00
bad
8fd869ab61 Make :drives, :display, :ignore accept fnmatch(3) patterns to specify drives.
Bump man page date.
2013-10-18 22:42:31 +00:00
bad
87c60cd65e Make the -f option accept multiple address families.
Bump man page date.
2013-10-18 22:18:14 +00:00
christos
6e28978d84 fix unused variable warnings 2013-10-18 20:47:06 +00:00
christos
8dda6b583e fix sequence point violations 2013-10-18 20:46:09 +00:00
christos
bdeefc61e5 more clobbering fixes. 2013-10-18 20:43:45 +00:00
christos
c3e578cfbe fix clobbered variable 2013-10-18 20:41:58 +00:00
christos
b52ab07dd4 remove unused 2013-10-18 20:41:49 +00:00
christos
15a5bba97c - avoid pointer gymnastics
- remove unused variables
2013-10-18 20:26:45 +00:00
christos
9f630f8bc1 avoid redefinitions 2013-10-18 20:19:36 +00:00
christos
30eeb0614b don't read random garbage from the stack 2013-10-18 20:19:03 +00:00
christos
3c6b5224e0 avoid pointer gymnastics 2013-10-18 20:18:42 +00:00
christos
f49cbbddb9 avoid longjmp clobber. 2013-10-18 20:17:59 +00:00
bad
87f2ce05f1 No David, '\?' is not the del character. Broken in rev 1.21.
XXX pullup-5, pullup-6.
2013-10-14 22:23:22 +00:00
jnemeth
694b13b9ba delete duplicate (and wrong) entry for Thanksgiving Day in Canada 2013-10-13 16:43:49 +00:00
christos
73da111b07 fix the rest of the lint warnings [pass 1] 2013-10-07 15:17:24 +00:00
dholland
04fb430032 Save errno around fwrite(), which can otherwise trash it; PR 47813.
This appears to fully resolve the problem described in the PR, even
though one might think it wouldn't.
2013-10-07 02:00:46 +00:00
dholland
603ad97a41 Merge some of the cleanup from PR 21894. Do a bit more of my own.
lint still squawks quite a bit, and it woudl probably be worthwhile
for someone to go through and make all the signedness consistent, but
I think I've got the valuable bits.
2013-10-07 00:16:19 +00:00
christos
8818316ba3 add more compression suffixes and local suffixes. 2013-10-06 17:14:49 +00:00
christos
b496a26a9d Recognize .gz and .bz2 suffixes so $ man ./man.1.gz works. From Franco Fichter
via dfly.
2013-10-06 16:43:41 +00:00
christos
7d79a7ccd9 Be more permissive in interpreting man pages as filenames, from Franco
Fichter via dfly. fixes:
	$ man usr.bin/man/man.1
2013-10-06 16:29:26 +00:00
roy
c019d40dad terminfo uses CDB instead of DB 2013-10-01 09:01:49 +00:00
sjg
5042f283e6 meta_oodate: 'L'ink and 'M'ove entries need extra processing.
The src of a Link should be treated as a file Read
while the target a file Written.
The src of a Move is like a file Deleted
and the target like a file Written.
2013-10-01 05:37:17 +00:00
wiz
f5b349c2c4 Sort. Use .Ex for EXIT STATUS section. 2013-09-30 08:13:59 +00:00
riastradh
88bc4b53a7 New utility getaddrinfo(1) to reflect getaddrinfo(3).
Discussed on tech-userlevel back in April:

https://mail-index.netbsd.org/tech-userlevel/2013/04/25/msg007719.html

Not hooked into the build or sets yet.
2013-09-30 06:19:22 +00:00
riz
985d0231c0 NetBSD 6.0.3 and 6.1.2 released. 2013-09-30 03:50:31 +00:00
jnemeth
0acf56cdc6 add NetBSD 5.1.3 and 5.2.1 releases 2013-09-29 07:43:43 +00:00
wiz
2626dec52e Improve description.
From Jérémie Courrèges-Anglas <jca@wxcvbn.org>.
2013-09-24 22:08:06 +00:00
joerg
3657cb7f1d Update LLVM/Clang snapshot to r191105. This brings in a better detection
of unused static variables and functions. Disable this for some external
code and for ioconf.c in the kernel.
2013-09-21 22:28:12 +00:00
khorben
77b82c32cc flock(1) really appeared first in NetBSD 6.1 2013-09-21 15:01:14 +00:00
wiz
bcd8a2345c If file argument is '-', read from stdin.
From Jérémie Courrèges-Anglas <jca@wxcvbn.org>.
2013-09-17 20:00:50 +00:00
matt
3c2ba04fe8 If MAKE_NATIVE, use sysctl to get MACHINE_ARCH from hw.machine_arch. 2013-09-14 15:09:34 +00:00
joerg
73c26f5d13 Remove copyright, use __RCSID. 2013-09-13 20:51:20 +00:00
wiz
2aa10166ef Update standards conformance. From jmc@openbsd. 2013-09-12 07:26:13 +00:00
pooka
d5e9a0d652 Not all systems sport err.h, so redo those bits using the die() routine
we need to have hanging around anyway for proper error reporting from
a daemonizing server.  le sigh
2013-09-10 20:36:08 +00:00
pooka
7066c11a5f <sys/cdefs.h> comes from rumpuser_port.h 2013-09-10 19:42:32 +00:00
pooka
22882349e0 Need bsd.own.mk for mk.conf, include it at an opportune place. 2013-09-10 18:28:46 +00:00
pooka
ff8534b0b9 Make it possible to omit libutil from the link. It's used only for
disklabel stuff, and is only harmful on platforms that don't currently
provide user namespace disklabel interfaces.
2013-09-10 18:22:55 +00:00
pooka
4e5f4292e3 Make this work on platforms without disklabels, modules, etc. 2013-09-10 17:59:52 +00:00
pooka
56651ceb36 Do like the comment suggests and don't sanity-check the -c parameter here,
since we can't do it properly.
2013-09-10 17:13:29 +00:00
christos
f812b4b441 Expand ep->host to contain the final string that we are going to print
before computing the width of the host column.
2013-09-09 19:20:38 +00:00
wiz
be79f6c038 Improvements from jmc@openbsd. 2013-09-09 09:02:25 +00:00
prlw1
2f73dfb288 Fix
/var/log/httpd/access.log  644  52   *  $W0D23 ZBP /var/run/httpd.pid 30
newsyslog: config line 16: bad signal type
(strtol: **endptr is '\0' on success rather than *endptr)
2013-09-05 11:34:40 +00:00
sjg
cde1c40e1b Add VAR_INTERNAL as a context for variables set by make itself,
which should not override those set by makefiles.
Currently MAKEFILE is the only variable affected.

Reviewed by: christos
2013-09-04 15:38:26 +00:00
sjg
be3c37de45 Do not apply shellErrFlag unless errCheck is true. 2013-09-02 19:26:42 +00:00
jnemeth
571c39977c use spaces, not tabs 2013-09-01 10:17:58 +00:00
jnemeth
50fa456661 add NetBSD 6.1.1 release 2013-09-01 10:16:19 +00:00
mrg
0c2e06460b move most of the header writing code from record.c into wav.c and sun.c.
introduce a struct write_info for communication between front ends and
backends.

libaudio API is still pretty ugly, and needs to stay local here for now,
but it is a little more usable for other tools now.
2013-08-30 20:57:26 +00:00
sjg
ec98624792 Fix parsing of SUNSHCMD style :sh = assigments.
Submitted by: Will Andrews at freebsd.org
2013-08-28 21:56:49 +00:00
dholland
98ce70f09e passes WARNS=5, don't set it to 4. 2013-08-21 21:05:29 +00:00
joerg
d9a44d716d Use more static and __dead. 2013-08-15 20:48:56 +00:00
christos
17168f5ab4 CID 1062241: simplify free for coverity 2013-08-12 20:36:30 +00:00
joerg
2c7fa37363 Add more __dead. 2013-08-12 14:03:18 +00:00
pooka
26b4d3d169 ioconf/pseudo-root have been in here unchanged for 3+ years and their use
has spread from rump kernels into dozens of kernel modules.  Let's pretend
we don't want to see config yell about them being experimental every time.
2013-08-11 10:37:08 +00:00
apb
480a3064b0 Use Va markup to show that the "suffix" part of ".PATH.suffix"
is a placeholder, not a literal string.
Also bump date.
2013-08-11 09:53:49 +00:00
dholland
e9067f113d WARNS=5 2013-08-11 08:03:10 +00:00
dholland
99934b2d0c Passes WARNS=5, so don't set WARNS=4. 2013-08-11 06:48:46 +00:00
dholland
65910359bc Passes WARNS=5, so don't set WARNS=3. 2013-08-11 06:47:38 +00:00
dholland
06eef6894d add more static 2013-08-11 06:45:23 +00:00
dholland
043c758bea add more const 2013-08-11 06:43:10 +00:00
dholland
beced5ea78 WARNS=5 2013-08-11 06:39:47 +00:00
dholland
7899f1dc15 Remove redundant WARNS=5. 2013-08-11 06:32:13 +00:00
dholland
1a91378aae Pass WARNS=5. 2013-08-11 06:31:00 +00:00
dholland
524e377411 Passes WARNS=5; don't set WARNS=4. 2013-08-11 06:09:29 +00:00
dholland
f02a6c3b94 Document .PATH.suffix:. Noted by apb back in December of 2008
(that's how long my queue is...)
2013-08-11 04:40:58 +00:00
dholland
7c248df2ae Whitespace. 2013-08-11 01:54:35 +00:00
dholland
8d0b47d1c9 Fix another bug, relating to parsing the [=x=] syntax. 2013-08-11 01:49:40 +00:00
dholland
aba78f7512 Tidy up more. This is pretty ratty code. 2013-08-11 01:42:35 +00:00
dholland
5e8eff378e Tidy up. 2013-08-11 01:29:28 +00:00
dholland
9f2ae0ea3d Pass -Wpointer-sign. 2013-08-11 01:00:13 +00:00
dholland
d506ddf6f7 avoid undefined behavior. 2013-08-11 00:52:17 +00:00
dholland
8a7a973b90 Don't explicitly zero bss variables that are already zeroed. 2013-08-11 00:49:15 +00:00
dholland
c47da08424 Add comments explaining how this works. 2013-08-11 00:48:37 +00:00
dholland
8b42fe334c Simplify the parser handling. 2013-08-11 00:39:22 +00:00
dholland
e141bc4323 Remove silly written-out initialization of string1. 2013-08-11 00:34:09 +00:00
dholland
848d757378 Make tr -c work. Fixes PR 48113.
When -c is in effect, scan string1 first, complement it, and then
iterate over the results while scanning string2. Otherwise, scan
string1 and string2 together as before.
2013-08-11 00:28:46 +00:00
dholland
567ab40d47 apply some CSE 2013-08-11 00:12:47 +00:00
dholland
9dd74a9973 Restore preexisting wrong behavior of tr -c (translates all characters
to the last letter in string2) instead of a different wrong behavior
(translates all characters to 0xff) accidentally just introduced.
2013-08-11 00:11:46 +00:00
dholland
48dbbc109e sprinkle const 2013-08-11 00:05:49 +00:00
dholland
7f7f549599 Make the parser state opaque. While here, fix a memory leak when using
the [:foo:] syntax.
2013-08-11 00:04:14 +00:00
dholland
d05d2aa5a7 Expose less of the parser state outside str.c. 2013-08-10 23:54:41 +00:00
sjg
7f708505a0 ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.
2013-08-10 21:20:03 +00:00
dholland
3c77b25ade punctuation usage 2013-08-10 20:59:27 +00:00
sjg
ac8c620987 Move the call to Job_SetPrefix() to Job_Init() so that
makefiles have had a chance to set .MAKE.JOB.PREFIX
2013-08-04 16:48:15 +00:00
sjg
bd8f3e806f Allow an empty .MAKE.JOB.PREFIX to supress output of --- job --- tokens 2013-07-30 19:09:57 +00:00
joerg
349a581e92 Mark the dead. 2013-07-30 15:10:04 +00:00
pgoyette
d96eb15780 fferentiate zegrep and zfgrep by their basename only, so they can be
invoked with a pathname (ie, /usr/bin/z{e,f}grep).

OK wiz@
2013-07-25 12:25:23 +00:00
wiz
a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
uwe
2a44517182 Constify some more. 2013-07-19 05:05:59 +00:00
uwe
4e29a793cc Spell "keywords" without space. Fix couple of typos. 2013-07-19 04:59:46 +00:00
uwe
6a118683e9 manual_find_buildkeyword() - now that we control the format string, we
may use asterisk precision specification instead of temporary
modifying the _build string itself.
2013-07-19 04:55:05 +00:00
uwe
6fed3e8105 Fix manual_find_buildkeyword() to not use non-literal printf format. 2013-07-19 04:18:10 +00:00
uwe
fd25be260e Use -Wno-format-nonliteral instead of blanket -Wno-format. 2013-07-19 04:17:02 +00:00
matt
c9855651f8 Add stub port for evbcf which has enough to do a distribution build. 2013-07-18 22:08:59 +00:00
matt
105794b79c Use ${MACHINE_CPU} == "m68k" 2013-07-18 21:11:47 +00:00
matt
611b1a73a0 Make sure fdformat is on m68k (even sun2) 2013-07-18 21:03:07 +00:00
uwe
887d84a8cf Don't access memory outside the array if tmpdirlen == 0. 2013-07-18 16:33:31 +00:00
christos
f75400a6b8 use -Wno-format and revert "fixstring" 2013-07-18 16:28:52 +00:00
christos
532207c739 Set the string to NUL instread of providing an new empty string (from uwe) 2013-07-18 16:01:25 +00:00
christos
ef965bff9b WARNS=6
- fix cast qual issues
- don't use snprintf on a user-provided buffer
2013-07-18 15:39:08 +00:00
sjg
11a6c9d08b From bmake: move decl of pwd nearer to where it is used so the whole
thing can be ifdef'd out without causing unused variable errors.
2013-07-18 15:31:49 +00:00
uwe
a2ec5e5863 Revert previous; other errors from WARNS=3 obscured the error in jump(). 2013-07-18 04:05:32 +00:00
uwe
d7a42acd68 Constify jump() arguments appropriately. 2013-07-18 04:02:31 +00:00
uwe
e0d6c9b51f Move manstate::pagerlen so that its "length of the above" comment makes sense. 2013-07-18 03:48:22 +00:00
uwe
3403b722b4 whatis.db is no more, so don't mention its location in FILES. 2013-07-18 03:40:31 +00:00
uwe
db23d137fa Remove unnecessary line wrap. 2013-07-18 03:38:25 +00:00
sjg
af0aba95fb When a var is set in the CMD context, it prevents the same name
being set in GLOBAL context.  We should also delete any such
variable in GLOBAL context, else make -V will show the wrong value.
2013-07-16 20:00:56 +00:00
sjg
7217d3f346 Fix unit-tests to cope with recent change to progname 2013-07-16 19:59:28 +00:00
christos
b294e9655c WARNS=6 2013-07-16 17:48:22 +00:00
christos
17cdc7e70d use bmake_foo instead of efoo() 2013-07-16 14:22:13 +00:00
christos
4f413ffa5d More gmake compatibility:
1. add -w flag to print Entering and Leaving directory name the the beginning
   and the end of processing.
2. export MAKELEVEL=$((MAKELEVEL + 1)) only in the child environment.
3. when printing error messages, prefix them with the program name [$MAKELEVEL]
   for $MAKELEVEL > 0
4. if $MAKEFLAGS consists only of letters assume it is a set of flags (as
   allowed by posix), convert them to -f -l -a -g -s, so that they get parsed
   properly.
With those fixes gmake -> bmake -> gmake -> bmake etc. works as expected.
2013-07-16 14:00:53 +00:00
christos
76db28c1cd Make this work again like gmake. sjg: see the test program. 2013-07-15 20:33:11 +00:00