Commit Graph

11600 Commits

Author SHA1 Message Date
joerg
d04cc43e5c usage() is not unused, it is dead 2011-08-29 13:56:17 +00:00
joerg
49dbe234f7 static + __dead 2011-08-29 13:55:22 +00:00
joerg
a746333485 static + __dead 2011-08-29 13:47:16 +00:00
elric
95bd2d4a1e Remove crypto/dist/heimdal and its associated build infrastructure as
it has been replaced by crypto/external/bsd/heimdal.
2011-08-28 16:21:57 +00:00
christos
d99091ea8b use strpct from libutil. 2011-08-28 08:24:42 +00:00
sjg
09fee58e88 In meta mode, we create .meta files for most targets.
These capture all the interesting data - useful for debugging.
In such cases there is no need to replicate commands in the build log.
Rather than run the entire build .SILENT, allow meta mode to set that flag
per target iff a .meta file is created.
Normal behavior is retained for targets where no .meta file is created,
ensuring that no build data is lost.
2011-08-28 03:54:07 +00:00
joerg
c36a7298be ANSIfy. Add static. Add __dead. 2011-08-28 01:17:47 +00:00
joerg
45e9b5a831 Avoid using non-literal format strings. Fix verbose option -- va_list is
passed by reference and vprintf would have processed all arguments
already.
2011-08-25 16:19:23 +00:00
christos
76987894af misc knf cleanup. 2011-08-23 20:27:22 +00:00
dholland
879c64122d Requires stdint.h. 2011-08-21 23:38:43 +00:00
christos
a040843f47 use const char [] for format. 2011-08-21 08:50:08 +00:00
plunky
a54eea1c06 add print_utf8_string for some profiles that specify UTF-8 specifically,
and supply a print_codeset_string() so we don't need void * casts to avoid
the char ** -> const char ** complaint
2011-08-20 09:18:47 +00:00
sjg
daf6508d3f Make some dashes em-dashes (based on patch from Andrew O. Shadoura).
Note behavior of .META flag wrt out-of-date.
2011-08-18 15:36:51 +00:00
sjg
4f95291ad9 Fix formatting of Notes to work with groff.
Patch from Andrew O. Shadoura.
2011-08-18 15:19:30 +00:00
christos
cb81bcdf23 revert 4 digit year printing and add -y option to print 4 digit years. 2011-08-18 11:29:27 +00:00
sjg
bbf6dc9998 If a target is explicitly flagged .META,
a missing .meta file means it is out-of-date.
2011-08-18 00:00:21 +00:00
joerg
0a09baa75f Fix disable stricter format string messages with clang again. 2011-08-17 22:16:42 +00:00
christos
cef6b9f736 document non-literal format strings 2011-08-17 15:32:20 +00:00
christos
4802a96d70 fix non-literal format strings 2011-08-17 14:07:45 +00:00
christos
90f7aa069d add noreturn atttribute. 2011-08-17 14:07:31 +00:00
christos
82c2d298ee document non-literal format strings 2011-08-17 14:00:30 +00:00
christos
9ca5242243 fix non-literal string format 2011-08-17 13:57:12 +00:00
christos
103ef387e2 document that we are using non-literal string formats. 2011-08-17 13:54:31 +00:00
christos
e6c0663544 Eliminate non-literal format strings, and now that gcc warns, kill y2k format
warning.
2011-08-17 13:48:11 +00:00
christos
e9332b1686 kill 2 digit year format. 2011-08-17 13:37:39 +00:00
christos
6d44ff404c document non-literal string format 2011-08-17 13:29:39 +00:00
christos
08c8290bd9 eliminate non-literal format strings. 2011-08-17 13:26:49 +00:00
christos
9590e2915d document non-literal format strings 2011-08-17 13:22:33 +00:00
christos
5a1e6eb35b document non literal string format 2011-08-17 13:19:09 +00:00
christos
c480e28cfc fix non-literal format stringg. 2011-08-17 13:12:39 +00:00
christos
ea9a6fbf23 avoid "... dutch" being interpreted as a pascal continuation message, and
core-dumping.
2011-08-17 13:11:22 +00:00
christos
77984ce781 document non-literal format strings. 2011-08-17 12:57:19 +00:00
joerg
09b543b065 Do proper input validation without penalizing performance. 2011-08-16 13:55:01 +00:00
christos
d27516e895 document non-literal format string. 2011-08-16 12:05:52 +00:00
christos
aab2693089 document non-literal format strings 2011-08-16 12:03:31 +00:00
christos
855e98819b - document non-literal format string
- use err/errx
- prototypes
2011-08-16 12:00:46 +00:00
christos
abf73dc18d document non-literal format string 2011-08-16 11:49:17 +00:00
christos
5353040f23 document non-literal format strings 2011-08-16 10:35:03 +00:00
christos
4a313422fa set errno on overflow return. 2011-08-16 03:25:34 +00:00
christos
89c75b98e4 provisional fix for CVE-2011-2895, buffer overflow in decompression 2011-08-16 03:24:47 +00:00
christos
5db8b1f126 provisional fix for CVS-2011-2895, buffer overflow when uncompressing 2011-08-16 03:21:47 +00:00
christos
4551250b00 document non-literal format strings. 2011-08-14 13:45:34 +00:00
christos
856f19c27d Provide a consistent date/time format instead of a
locale-specific one that might have 2 digit years
2011-08-14 13:41:17 +00:00
christos
e3f2281ab3 kill gcc-4.5 warnings 2011-08-14 13:27:47 +00:00
christos
d0e87f5f87 - add a SYSEX0 macro that does not override the initializers and use it
- fix whitespace
- make things static and eliminate unused functions
2011-08-14 13:26:23 +00:00
christos
ccb821a2ac - remove gcc-4.5 warnings
- simplify job printing code
- document non-literal format strings
2011-08-14 13:06:09 +00:00
christos
42ff0d2ac9 kill gcc-4.5 warning 2011-08-14 12:59:25 +00:00
christos
51a4285889 fix gcc-4.5 warnings 2011-08-14 12:58:15 +00:00
christos
2da76c1342 eliminate gcc4.5 warnings 2011-08-14 12:50:10 +00:00
wiz
e96bfc25cf Sort options and option descriptions, and sync usage. 2011-08-13 14:11:16 +00:00
jakllsch
6c3008d052 Sort (and synchronize) option list and `SYNOPSIS' section in
manpage, as well as the program's `usage'-line; also some other
minor changes.

From Snader_LB.
2011-08-13 14:02:48 +00:00
jruoho
ea330d8d1a Xref limits(3). 2011-08-09 18:11:37 +00:00
wiz
9038276921 Add lzma and lzo to usage. From Elie De Brauwer in PR 45219. 2011-08-06 11:12:05 +00:00
matt
8fa5ea82ed Add O_TRUNC to the open of the image file (in case the size decreases). 2011-08-04 04:47:59 +00:00
matt
9be0f04367 Add lzma and lzo compression types 2011-08-03 17:46:40 +00:00
matt
dfbaa6afbe Add -E entrypoint for "byteswapped" entry-points. 2011-08-03 17:00:13 +00:00
riz
a91ba62b09 Add an -m flag to mkubootimage, for specifying an alternate magic
value.
2011-08-01 06:16:35 +00:00
christos
3edabd2e8e Don't attempt to touch special targets; make -t would create .END in every
directory.
2011-08-01 02:13:21 +00:00
yamt
b0bc17c5a1 dopoolcache: don't print unused caches unless verbose 2011-07-26 13:24:38 +00:00
yamt
4af7b61bfc add an option to put samples for each symbols together. 2011-07-26 12:24:16 +00:00
yamt
836b5ebd94 remove a duplicated "unknown option" message. 2011-07-26 12:21:27 +00:00
christos
d97d3aebdc - use poll() instead of select()
- make everything static
- knf
- consistently check for == -1 for syscall errors
- isatty(fd) == tcgetattr(fd), don't do it twice
- make error messages more consistent
- use sig_atomic_t for variable set inside signal handler
2011-07-18 21:51:06 +00:00
christos
ea35959226 gcc 4.5 error support ("file:line:col: error" instead of "file:line: error") 2011-07-18 21:46:15 +00:00
plunky
412b8db41e only modify the termios structure when tty_in is verifiably a terminal 2011-07-18 15:44:17 +00:00
njoly
58b2cc408f Use errx() to display kvm_openfiles error message, the provided buffer
already has it.
2011-07-17 10:22:07 +00:00
wiz
d738592f9d Fix typos, remove trailing whitespace. 2011-07-14 22:14:03 +00:00
manu
a6ed313d9c Improve extended attribute commands:
- allow namespace to be omitted when using a namespace-prefixed attribute
  name, a la Linux.
- Improve hexdump for getextattr -x
- Add more display option for binary attributes, using vis(3)
- Add a -i option to setextattr to get the attribute value from file, so
  that we can set binary values
2011-07-14 15:25:27 +00:00
wiz
e1881f54f7 Fix a logic error: when renaming a file, strip trailing \n from file name. 2011-07-14 06:35:30 +00:00
apb
8c250ec6f2 Comments and white space changes, inspired by Greg Woods' remarks
in PR 45130, but not directly copied from the patch in the PR.
2011-07-13 07:58:35 +00:00
apb
69e4520422 Fix error in previous: The first character of $i should be removed
only if it is '!', but it was removed in the wrong case branch.
2011-07-13 07:48:19 +00:00
apb
404ff31a48 Allow quoting of embedded shell metacharacters in locate.conf(5).
The shell_quote function here is identical to that in postinstall
and etcupdate.

This should fix PR 45130 from Greg Woods.
2011-07-10 13:42:49 +00:00
mrg
29bf026bea install elf2ecoff for all mips64 systems. it's needed for stand. 2011-07-10 08:43:50 +00:00
tsutsui
b578f76170 Make this cross-tool ready. Mostly taken from elf2ecoff(1).
XXX: assume no LP64 a.out binaries
2011-07-10 05:07:48 +00:00
tsutsui
da8589ed6d Set a_midmag MAGIC in a.out header properly for more possible a.out ports
in the past per ex.e_machine in ELF header.
2011-07-10 04:56:31 +00:00
matt
105471657d When making the symlink for machine -> arch/foo/include
also make foo -> arch/foo/include.  This allows one to include <foo/bar.h>
include <machine/bar.h> which can be handy.
2011-07-09 08:01:58 +00:00
plunky
cc67630292 ensure string buffer is null terminated, for zero length strings.. 2011-07-07 10:49:38 +00:00
plunky
f88159b8d2 parse IEEE 1284 Device ID, since it is not strictly a
string, and may run longer than a line
2011-07-07 10:26:00 +00:00
matt
c28121025f Use __builtin_offsetof if __GNUC__ >= 4 2011-07-05 05:19:02 +00:00
manu
be95d60797 Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.

There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)

This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.
2011-07-04 08:07:29 +00:00
tron
32830a8673 Remove the old version of "less". 2011-07-03 21:58:52 +00:00
mrg
3f6ead21a6 upgrade less to WARNS=2 with -Wno-shadow. 2011-07-03 15:28:47 +00:00
mrg
5286814248 avoid an uninitialised variable warning that shouldn't normally happen
in practise but isn't entirely impossible for the future.
2011-07-01 02:34:50 +00:00
wiz
4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
tsutsui
41319be297 ANSIfy, de-__P(), KNF, misc cosmetics. 2011-06-28 13:15:24 +00:00
tsutsui
63fc11e983 ANSIfy, KNF, misc cosmetics. 2011-06-28 13:13:15 +00:00
manu
d297a7739e Fix previous broken commit for extended attribute listing. 2011-06-28 07:24:14 +00:00
manu
d8abff28ef Implement extended attribute listing for UFS1.
Modify lsextattr(8) so that it does not expect each attribute name to be
prefixed by its length. This enable extattr_list_(file|link|fd) to
return a buffer matching its documentation. This also makes the interface
similar to what Linux and FUSE do, which is nice for interoperability.

Note that since we had no EA implementation supporting listing, we do
not break anything.
2011-06-27 16:34:47 +00:00
plunky
2424b4a6bc use size_t to satisfy lint 2011-06-25 09:16:52 +00:00
plunky
9a6467a351 some attributes contain comma separated lists which are too long to
show on a single line, split them up
2011-06-24 20:53:56 +00:00
plunky
b0e371d8b4 in the "Basic Printing Profile" it is not really very clear
which ServiceClass the attributes relate to, so link them
to "Direct Printing" and "Printer Status" as well as
"Reference Printing", since I have a printer (HP460) which
does not claim the latter.
2011-06-24 20:11:23 +00:00
plunky
45c72a0110 if print_attribute() did not print, we should try the next
service_class before failing
2011-06-24 20:06:04 +00:00
plunky
10d720db72 interpret "Hardcopy Cable Replacement Profile" attributes 2011-06-24 19:03:46 +00:00
plunky
12d259798e interpret "Basic Imaging Profile" attributes 2011-06-24 18:50:32 +00:00
christos
bfb07aa1f2 Always use our own align macro and explain a bit more why this is bogus. 2011-06-24 01:10:31 +00:00
christos
2fa13d153a Don't give out information about processes we can't control. 2011-06-23 22:50:53 +00:00
sjg
ebe0193f6c After each strsep(&p) check that p is valid.
If not the .meta file is corrupted (build interrupted?)
issue a warning and declare target oodate.
2011-06-22 21:13:12 +00:00
mrg
fcdfa9157d don't bother casting the return value of malloc. 2011-06-22 06:23:07 +00:00
mrg
0e79bf59af use offsetof() instead of some strange local hack. 2011-06-22 06:22:48 +00:00
mrg
5ed322d90a apply some -Wno-error/-Wno-enum-compare/-Wno-array-bounds.
this should be looked at more closely.
2011-06-22 05:23:53 +00:00
mrg
c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
wiz
322aa1720c New sentence, new line. 2011-06-21 20:51:27 +00:00
kefren
f881c97d31 add a sentence regarding multiple tags 2011-06-21 19:46:36 +00:00
kefren
214feb60c7 print multiple tags if exists, comma separated 2011-06-21 19:42:45 +00:00
joerg
8cba5925cb Add a few explicit casts for sign mismatches. 2011-06-21 13:25:45 +00:00
mrg
75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
christos
b3e9080143 cross reference xz.1 2011-06-19 02:22:36 +00:00
christos
9593a36e94 make this work:
- forgot to account for prelen in the input length
- deal with EOF properly
2011-06-19 02:19:45 +00:00
christos
5708f444da recognize .xz suffix 2011-06-19 02:19:09 +00:00
christos
255ae88a08 - remove unused call
- read headers separately
- print error id.
2011-06-19 01:52:28 +00:00
tsutsui
7c8d31ee49 XZ_SUPPORT requires maybe_errx(). 2011-06-19 01:20:19 +00:00
christos
40b41259f0 Add lzma (.xz) support. Somehow this does not decode after the first read yet. 2011-06-19 00:43:54 +00:00
wiz
ddcaed45e1 This is installed in section 1, so make internal section the same.
Also use name under which it is installed as main internal name.
Comment out reference to extattr(2) which doesn't exist on NetBSD
(a reference to extattr(3) still remains).
2011-06-17 18:19:58 +00:00
wiz
6d765c9977 Fix usage in man page and sync usage in executable with it. 2011-06-14 20:08:45 +00:00
joerg
2d9f8bf04f Add support for man -p to print the search path for manual pages (not
including cat page directories).

From Abhinav Upadhyay as part of Google's Summer of Code 2011
2011-06-14 18:53:48 +00:00
mrg
08d84f24b2 an_ref is now a uintptr_t. 2011-06-12 06:34:59 +00:00
sjg
0277db2f8c Use %zu rather than cast 2011-06-11 02:10:48 +00:00
sjg
af8b888000 size_t on amd64 doesn't like %u, use a cast. 2011-06-10 23:57:39 +00:00
yamt
bae8a3a858 mention combinations of flags 2011-06-08 13:54:16 +00:00
yamt
6f8a344413 err -> errx where appropriate 2011-06-08 13:51:13 +00:00
matt
6d32ef3fed When printing the header, convert values to names:
Use strlcpy to copy the name, not strncpy.

 magic:       0x27051956
 time:        Tue Jun  7 15:58:41 2011
 size:        2482203
 load addr:   0x00020000
 entry point: 0x00020000
 data crc:    0x700fdf53
 os:          2 (netbsd)
 arch:        7 (powerpc)
 type:        2 (kernel)
 comp:        1 (gz)
 name:        NetBSD/evbppc 5.99.52 (INSTALL_
 header crc:  0x94ea96cf
2011-06-08 05:54:38 +00:00
bouyer
a3a7248ce7 Fix bad cut'n'paste in copyright. Pointed out by dyoung@ 2011-06-07 14:56:12 +00:00
sjg
873dae776d Some systems (eg. MirBSD) use a ksh, with an echo which cannot
be used for things containing \x: etc.
Check for print or printf as builtin and use if available.
Note that a builtin will fail, if make decides a shell is not needed.
2011-06-07 00:10:20 +00:00
jnemeth
86de657587 add an entry about the US nationalising gold to replace old confiscation entry 2011-06-06 03:15:14 +00:00
sjg
43c87c739c ApplyModifiers: if we parse a variable in the modifier list,
do not consider it a nested modifier set, unless it is followed by
endc, a ':' or end of string.
2011-06-03 21:10:42 +00:00
wiz
518b4753cf Bump date for previous. 2011-06-01 22:17:43 +00:00
alnsn
a739efc5b5 kern/42030 - tracking of file descriptors by ktrace/kdump 2011-06-01 21:24:59 +00:00
enami
179c4640cc Don't touch before the mmap'ed region. 2011-05-31 02:34:32 +00:00
christos
856fae793d Handle the empty suffix properly. Convert suffix list to a list from an
array and don't have limits in the suffix length. Also don't require that
suffixes have a single dot.
2011-05-30 22:52:12 +00:00
manu
ed3e0293c8 Document that localsocket may be of type SOCK_SEQPACKET 2011-05-29 04:54:45 +00:00
manu
1b0d8e317f Display SOCK_SEQPACKET local sockets in sockstat and netstat 2011-05-29 04:45:08 +00:00
rmind
8a0123cd33 - Prevent tmpfs.h from inclusion in userland.
- Clean up and KNF tmpfs.h a little bit.
2011-05-29 01:00:50 +00:00
cheusov
a541b13903 fix bug in section .ORDER of make.1 2011-05-28 21:53:54 +00:00
drochner
0a8dabda40 pull in AES-GCM/GMAC support from OpenBSD
This is still somewhat experimental. Tested between 2 similar boxes
so far. There is much potential for performance improvement. For now,
I've changed the gmac code to accept any data alignment, as the "char *"
pointer suggests. As the code is practically used, 32-bit alignment
can be assumed, at the cost of data copies. I don't know whether
bytewise access or copies are worse performance-wise. For efficient
implementations using SSE2 instructions on x86, even stricter
alignment requirements might arise.
2011-05-26 21:50:02 +00:00
joerg
9411f274f4 Use CWARNFLAGS.clang and not CWARNFLAGS here 2011-05-26 14:20:22 +00:00
joerg
a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
drochner
ebc232a582 copy AES-XCBC-MAC support from KAME IPSEC to FAST_IPSEC
For this to fit, an API change in cryptosoft was adopted from OpenBSD
(addition of a "Setkey" method to hashes) which was done for GCM/GMAC
support there, so it might be useful in the future anyway.
tested against KAME IPSEC
AFAICT, FAST_IPSEC now supports as much as KAME.
2011-05-24 19:10:08 +00:00
spz
5f1fd2312c RA flood mitigation via a limit on accepted routes:
- introduce a limit for the routes accepted via IPv6 Router Advertisement:
  a common 2 interface client will have 6, the default limit is 100 and
  can be adjusted via sysctl
- report the current number of routes installed via RA via sysctl
- count discarded route additions. Note that one RA message is two routes.
  This is at present only across all interfaces even though per-interface
  would be more useful, since the per-interface structure complies to RFC2466
- bump kernel version due to the previous change
- adjust netstat to use the new value (with netstat -p icmp6)
2011-05-24 18:07:11 +00:00
joerg
1e608ad53f Fix format string usage 2011-05-24 12:49:11 +00:00
joerg
de862ba918 Properly use format string 2011-05-24 12:46:16 +00:00
joerg
9f52716d37 Properly use format strings 2011-05-24 12:44:30 +00:00
joerg
6ff5354c03 Fix usage() to actually not return 2011-05-24 12:42:25 +00:00
joerg
80952d9f7f Properly use format strings. 2011-05-24 12:40:11 +00:00
joerg
a3ba17a6a3 Properly use format string. 2011-05-24 12:35:36 +00:00
joerg
a988c0e8be Properly use format string 2011-05-24 12:35:01 +00:00
joerg
a5bcf1850f Use proper format strings. 2011-05-24 12:33:22 +00:00
joerg
de7d5b1342 Doesn't need input. 2011-05-24 12:32:36 +00:00
joerg
20c68d4f2c Fix const issues 2011-05-24 12:31:56 +00:00
joerg
9a1e56f24b Fix sign compare 2011-05-24 12:27:29 +00:00
joerg
4dfc56bdfa Don't use user input as format string 2011-05-24 12:25:05 +00:00
joerg
48a413800a Simplify 2011-05-24 12:24:22 +00:00
joerg
b794a0de4d Kill self assignment 2011-05-24 12:19:11 +00:00
drochner
cfdc35650d report aes-ctr statistic counter by name 2011-05-23 14:29:55 +00:00
tsutsui
56683e6b6e Explicitly #include <time.h> for time(3) and strftime(3).
Fixes warnings on some non NetBSD hosts.
2011-05-21 07:30:42 +00:00
christos
fdcc1029ab use warn/err. 2011-05-21 00:43:52 +00:00
christos
0364d1f4f2 - KNF
- more static
- fix argument parsing.
2011-05-21 00:43:42 +00:00
christos
8deae7b7cb remove unused. 2011-05-21 00:43:31 +00:00
wiz
cc9481a1a2 Sync usage with man page. 2011-05-20 07:09:52 +00:00
wiz
33b9c78b3c Fix macro name in SYNOPSIS. 2011-05-20 07:08:24 +00:00
wiz
3ba25bec19 Sort options, merge single letter options in synopsis. 2011-05-20 07:07:37 +00:00
christos
0be029e699 counting was off, and setting things to themselves does not work very welll. 2011-05-20 02:00:45 +00:00
christos
ec9611ac0f - use getopt
- use err
- add -p <filelevel> to chop levels like patch
- document all the options
2011-05-19 22:55:53 +00:00
dsl
cf5ef24619 Back out a local change 2011-05-18 06:36:48 +00:00
dsl
c5191c6734 If a makefile if a multiple of the page size and doesn't end with a
newline, then it all goes horribly wrong when make tries to terminate
the last input line.
This was all ok before the mmap changes (rev 1.169) because the last
32 bytes of the input buffer were never read into.
The non-mmap case has a similar problem.
Bug found because my .depend files don't have a newline at the end of
the .OPTIO|NAL line (don't know if that is a local change).
2011-05-17 21:56:51 +00:00
mrg
8169e46991 move and rename the uvm history code out of uvm_stat to "kernhist".
rename "UVMHIST" option to enable the uvm histories.

TODO:
- make UVMHIST properly depend upon KERNHIST
- enable dynamic registration of histories.  this is mostly just
  allocating something in a bitmap, and is only for viewing multiple
  histories in a merged form.


tested on amd64 and sparc64.
2011-05-17 04:18:05 +00:00
christos
7aac162c51 Make this produce proper ansi c and knf. 2011-05-15 21:28:51 +00:00
dyoung
0d0dd0e146 Suppress whitespace at EOL to fix lib/librumphijack/t_tcpip. 2011-05-11 22:21:59 +00:00
drochner
4f6bdd19b5 use getmicrouptime(9) rather than microtime(9) for TIME_WAIT duration
calculation, because this doesn't get confused by system time changes,
and uses less CPU cycles
reviewed by dyoung
2011-05-11 15:08:59 +00:00
enami
dd41556bdf Use ptrdiff_t to hold pointer difference to avoid coredump on LP64 system. 2011-05-10 04:40:16 +00:00
drochner
3e2a0f5f49 decode camellia-cbc in stats histogram 2011-05-05 17:49:47 +00:00
wiz
9e66d3e091 Remove trailing whitespace. 2011-05-04 21:24:59 +00:00
christos
fc29dd21ad Document what I wrote for PR/40115 2011-05-04 21:14:56 +00:00
sjg
48587910e0 Add .MAKE.META.BAILIWICK - to identify the scope of make's control.
meta_oodate: if a file that was written or linked within our bailiwick,
but outside of .OBJDIR is missing, add it to missingFiles.
If we get to the end of the .meta file without seeing it [re]moved,
then consider the target out-of-date.
2011-05-04 20:38:31 +00:00
pgoyette
38b438f332 Use %zx for _both_ size_t formats! 2011-05-04 03:43:30 +00:00
dyoung
fe23a102a6 On second thought, make a more conservative change: use %zx instead of
%x for size_t.
2011-05-04 01:31:40 +00:00
dyoung
6392073d00 Use %zu format for size_t instead of %x. 2011-05-04 01:30:01 +00:00
dyoung
7957556091 Always try to open kmem, do not always set use_sysctl to 1, and do not
fail if opening kmem fails unless !use_sysctl.  Fixes netstat(1) options
such as -s.
2011-05-04 01:13:35 +00:00
dyoung
7135b6c6f4 Access the kvm_t using get_kvmd(), only. 2011-05-04 01:11:29 +00:00
dyoung
fea546afcb Don't use type qualifier 'register'. 2011-05-04 00:55:19 +00:00
dyoung
7f40ffb8aa Do not display expired or reclaimed vestigial TIME_WAIT entries. 2011-05-03 23:36:26 +00:00
dyoung
c2e43be1c5 Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

MSLT and VTW were contributed by Coyote Point Systems, Inc.

Even after a TCP session enters the TIME_WAIT state, its corresponding
socket and protocol control blocks (PCBs) stick around until the TCP
Maximum Segment Lifetime (MSL) expires.  On a host whose workload
necessarily creates and closes down many TCP sockets, the sockets & PCBs
for TCP sessions in TIME_WAIT state amount to many megabytes of dead
weight in RAM.

Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to
a class based on the nearness of the peer.  Corresponding to each class
is an MSL, and a session uses the MSL of its class.  The classes are
loopback (local host equals remote host), local (local host and remote
host are on the same link/subnet), and remote (local host and remote
host communicate via one or more gateways).  Classes corresponding to
nearer peers have lower MSLs by default: 2 seconds for loopback, 10
seconds for local, 60 seconds for remote.  Loopback and local sessions
expire more quickly when MSLT is used.

Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket
dead weight with a compact representation of the session, called a
"vestigial PCB".  VTW data structures are designed to be very fast and
memory-efficient: for fast insertion and lookup of vestigial PCBs,
the PCBs are stored in a hash table that is designed to minimize the
number of cacheline visits per lookup/insertion.  The memory both
for vestigial PCBs and for elements of the PCB hashtable come from
fixed-size pools, and linked data structures exploit this to conserve
memory by representing references with a narrow index/offset from the
start of a pool instead of a pointer.  When space for new vestigial PCBs
runs out, VTW makes room by discarding old vestigial PCBs, oldest first.
VTW cooperates with MSLT.

It may help to think of VTW as a "FIN cache" by analogy to the SYN
cache.

A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT
sessions as fast as it can is approximately 17% idle when VTW is active
versus 0% idle when VTW is inactive.  It has 103 megabytes more free RAM
when VTW is active (approximately 64k vestigial PCBs are created) than
when it is inactive.
2011-05-03 18:28:44 +00:00
wiz
610b889888 Sort options and option descriptions. Use more markup. 2011-04-29 09:23:29 +00:00
wiz
c0e7cc216d New sentence, new line. 2011-04-28 17:14:45 +00:00
wiz
0b0f158833 New sentence, new line. Use more markup. 2011-04-28 14:59:27 +00:00
wiz
ebdacac575 Punctuation nit, sendmail(8) -> (1). 2011-04-28 13:54:13 +00:00
mbalmer
44190c279c On december 16, 1991, Kazakhstan declared its independence from the USSR. 2011-04-28 07:42:20 +00:00
joerg
5e6a27ebbb Remove Mach specific trace points. 2011-04-27 00:00:46 +00:00
joerg
787e55aa29 Remove PECOFF/Win32 emulation. 2011-04-26 16:57:38 +00:00
joerg
e958063324 Remove IRIX emulation 2011-04-26 16:36:40 +00:00
joerg
5aca2679d7 Remove Darwin, MACH and Mach-O support. 2011-04-26 15:51:22 +00:00
wiz
064134a9dd Improve description, based on OpenBSD v1.11. 2011-04-25 22:42:11 +00:00
elric
07b0c75a48 We no longer need -I/usr/include/krb5. 2011-04-24 21:42:06 +00:00
elric
89208b4ceb Stop using functions deprecated by Heimdal. Also, if krb5_init_context()
fails, we can't use Kerberos functions to grab error strings, we
resort to strerror(3) which is what Heimdal's deprecated function
does in this case.
2011-04-24 21:16:43 +00:00
joerg
0cef9f9563 Add MKBSDGREP switch for easy testing of the GNU grep
replacement/alternative.
2011-04-21 14:26:33 +00:00
drochner
ab862eb3da fix some labels for ipcomp counters which didn't make sense at all 2011-04-19 18:34:39 +00:00
joerg
6a4bfecd54 Avoid C99 features. 2011-04-18 23:22:42 +00:00
joerg
34bdd27889 Add support for --null-data. Change -Z to behave like GNU grep's -Z. 2011-04-18 22:46:48 +00:00
joerg
ff9dcf4380 Redo context printing so that adjourning contexts don't print the
separator, following GNU grep's behavior in this regard.
2011-04-18 17:18:03 +00:00
joerg
4bb7e7be1d Use the more portable getline. 2011-04-18 03:48:23 +00:00
joerg
4c78e1ea83 Fix memory leaks. 2011-04-18 03:47:40 +00:00
joerg
f7d22212e7 Include nbtool_config.h for tool builds. 2011-04-18 03:27:40 +00:00
christos
28e5fe5363 Recognize --sysroot but don't document it or do anything about it for now. 2011-04-17 22:35:22 +00:00
elric
98fbe74f8c Upgrade Heimdal to 1.5pre1 by switching the build from crypto/dist/heimdal
to crypto/external/bsd/heimdal.  The latter was just imported as the head
of the Heimdal tree as of a few days ago.
2011-04-15 18:05:42 +00:00
plunky
d1fbb9e17f move the build of ldd binary to a subdir in order to allow
explict ordering. This makes "make all" work the same as
"make dependall"
2011-04-15 08:47:02 +00:00
yamt
97023e2700 - adapt to the kernel
- add some options
2011-04-14 16:27:17 +00:00
yamt
28e47a3677 don't link unused library. 2011-04-14 16:25:58 +00:00
rmind
e7ba7d8ca0 Add DTYPE_SEM. 2011-04-14 00:35:35 +00:00
sjg
2ac5d52245 Add a test case for sysV modifier subst 2011-04-11 15:10:15 +00:00
sjg
521f3749c8 If a "long" modifier name does not match, goto default case
so SysV modifier can be tried.
2011-04-11 14:49:09 +00:00
wiz
2974cb7ffe Remove trailing whitespace. 2011-04-11 06:56:50 +00:00
sjg
b446ef338f Add :localtime and :gmtime which use value as format string for strftime. 2011-04-11 01:44:15 +00:00
pgoyette
f39adfe33e Fix string constant so it compiles again. 2011-04-10 16:06:59 +00:00
christos
63ab96a1bd we don't have access to si_lid anymore. 2011-04-10 14:38:19 +00:00
christos
6a8b690e91 print detailed info about other SI_ codes. 2011-04-10 00:05:51 +00:00
joerg
53d81ae021 Add the :hash modifier to compute a 32bit hash of an variable.
This uses MurmurHash3 to get a reasonable collission-free hash with
small code. The result is endian neutral.
2011-04-07 01:40:01 +00:00
dholland
efb9133f26 Expand user warning (adding examples) and move to CAVEATS as it's not fixable. 2011-04-03 19:44:15 +00:00
dholland
ba1f9c173a remove stray extra word 2011-04-03 19:25:05 +00:00
mbalmer
18e7170716 Declare variable only once. Fixes PR 44795. 2011-04-02 07:58:30 +00:00
sjg
c76b9c11ac Call meta_job_finish() from meta_job_error(), so that if
the .ERROR target copies the .meta file, it has been completed.
meta_job_finish() is safe to call again.
2011-03-31 06:50:43 +00:00
sjg
64809b8858 We must now call meta_job_finish() after meta_job_error()
so that .ERROR_META_FILE is captured.
2011-03-31 06:28:42 +00:00
sjg
ff54381362 Add NetBSD tags 2011-03-30 22:03:49 +00:00
wiz
c51b743b1e Add long example describing how to find and configure multimedia
keys; based on Mihai Chelaru's description on current-users in February.
Bump date.
2011-03-30 11:35:25 +00:00
joerg
8fa6585514 Block signals when using the exclusive lock. 2011-03-29 20:56:35 +00:00
sjg
be03bd0379 Check for extra commands as soon as we reach CWD,
so we return faster (if oodate) and give a more accurate debug message.
2011-03-29 17:29:20 +00:00
sjg
ede3eaf4a5 CondDoExists: Avoid use after free() 2011-03-29 17:19:22 +00:00
fair
99c0cae956 Add dholland's comment about units not warning users about non-sensical
conversions to the BUGS section.
2011-03-28 16:09:10 +00:00
dholland
75f2c9abd2 fix typo 2011-03-28 00:14:51 +00:00
dholland
8cf15952a4 Update radioactivity-related units from http://physics.nist.gov/cuu/Units/.
The prior definition of sievert was, as far as I can tell, entirely wrong.

Caution: while "gray" and "sievert" have the same dimensionality,
they're not interchangeable -- you need to multiply by a fudge factor
that varies depending on the type of radiation and the tissue it's
affecting. (Dimensional analysis is often not a substitute for knowing
what you're doing.)

It would be nice if units had a way to warn users when they're trying
to do something that doesn't make sense, since there are lots of ways
to do so, but it doesn't, and it wouldn't be easy to arrange in the
general case.
2011-03-28 00:08:47 +00:00
sjg
1e444cd2f2 Use curdirOk as the token 2011-03-27 19:47:46 +00:00
sjg
dd0a10eeff When .MAKE.MODE inlcudes 'meta'; 'curdir=true' enables creating .meta
files in .CURDIR - such as when running make in .OBJDIR with a generated
makefile.
2011-03-27 19:39:21 +00:00
dholland
51ab93526e Exit with EXIT_FAILURE for invalid arguments. PR 43517. 2011-03-26 21:45:48 +00:00
dholland
b82f0f1987 Catch up to Makefile rev 1.40 (from 2006): add lstPrev.o. Closes PR 43466. 2011-03-26 21:42:12 +00:00
joerg
cb1cd7e860 Add basic locking to ld.elf_so. 2011-03-25 18:07:04 +00:00
bouyer
d9210c2405 Add a new libquota library, which contains some blocks to build and/or
parse quota plists; as well as a getfsquota() function to retrieve quotas
for a single id from a single filesystem (whatever filesystem this is:
a local quota-enabled fs or NFS). This is build on functions getufsquota()
(for local filesystems with UFS-like quotas) and getnfsquota();
which are also available to userland programs.
move functions from quota2_subr.c to libquota or libprop as appropriate,
and ajust in-tree quota tools.
move some declarations from kernel headers to either sys/quota.h or
quota/quota.h as appropriate. ufs/ufs/quota.h still installed because
it's needed by other installed ufs headers.
ufs/ufs/quota1.h still installed as a quick&dirty way to get a code
using the old quotactl() to compile (just include ufs/ufs/quota1.h instead of
ufs/ufs/quota.h - old code won't compile without this change and this is
on purpose).
Discussed on tech-kern@ and tech-net@ (long thread, but not much about
libquota itself ...)
2011-03-24 17:05:39 +00:00
tsutsui
784931d63b Fix OPT_LIST. -t is not available in SMALL case. 2011-03-23 12:59:44 +00:00
christos
ca5bce8901 support grouping format. 2011-03-15 23:11:49 +00:00
pooka
e49693227e Record address from offer to actually send it as part of the
request.  May fix interaction with some pickier dhcp servers
(like riz's).  Thanks to Jeff for debugging assistance.
2011-03-14 23:02:16 +00:00
pooka
7bc641dd16 aaaand actually make the logic clause correct 2011-03-14 11:13:22 +00:00
pooka
db454f263c make the code also correctly correct, not just xxxgcc'ly correct 2011-03-14 11:10:35 +00:00
pooka
7780c2df6d * attempt to make this endian-independent (tested only on el)
* write via libpcap (since i thought there would be some fancy
  api to deal with endianness.  after doing 80% of the work i
  noticed there wasn't, but went ahead anyway)
2011-03-14 11:08:28 +00:00
pooka
bea8760a7c Apropos, pcap doesn't export the on-disk pcap packet header but
only the in-memory one.  Since the in-memory one uses struct timeval
and the on-disk one uses 32bit time_t, things didn't work so well
on -current.  Generate a suitable local packetheader to fix things.
(don't think it's worth writing via libpcap for something as simple
as this)

noticed both by bouyer and the shmif_dumpbus test
2011-03-12 18:27:42 +00:00
bouyer
46d2eadf0e Don't include quotautil.h here, it's not used. 2011-03-12 12:28:47 +00:00
jmmv
2a77c0a96c Note that window(1) will go away after netbsd-6 is branched. 2011-03-10 13:23:41 +00:00
pooka
a10e19a78e Add some asserts to make sure the bus offset isn't beyond what we
mapped.  (I had a very interesting time last night trying to figure
out what was going when things apparently got compiled with a 64bit
time_t on nb5.  this caused only 4k of the bus file to be mapped...)
2011-03-10 10:11:25 +00:00
joerg
aad599979d Add TLS support infrastructure. For dynamic binaries, ld.elf_so exports
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to
setup the thread private area of all new threads. ld.elf_so is
responsible for setting up the private area for the initial thread.
Similar functions are called from _libc_init for static binaries, using
dl_iterate_phdr to access the ELF Program Header.

Add test cases to exercise the different TLS storage models. Test cases
are compiled and installed on all platforms, but are skipped on
platforms not marked for TLS support.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

It is inspired by the TLS support in FreeBSD by Doug Rabson and the
clean ups of the DragonFly port of the original FreeBSD modifications.
2011-03-09 23:10:05 +00:00
jmmv
66b2e37b2b Add a script to generate a distfile of window from the verbatim sources on
cvs.  This will be used for the upcoming pkgsrc package of window.

I am not copying the code to othersrc because I want to keep things as
simple as possible for now.  When we remove window from src, the code will
be moved to othersrc and any improvements (such as autoconfification) can
be done there.
2011-03-09 17:32:03 +00:00
pooka
73fa5bcac3 print processing details only if we've not outputting a pcap file
to stdout
2011-03-09 12:56:08 +00:00
riz
802dd4220f Revert previous, to fix build on Mac OS X again.
ok christos@
2011-03-08 23:55:19 +00:00
bouyer
726315aa0b Properly evaluate the space needed to print "unlimited" in an human-readable
way.
2011-03-07 11:46:55 +00:00
christos
1c901e8c26 merge one more triplicated function 2011-03-06 23:26:05 +00:00
christos
e0e65cb1e2 - merge more code.
- simplify struct access.
2011-03-06 22:36:07 +00:00