Commit Graph

6888 Commits

Author SHA1 Message Date
Sean Kelly
42249c7f31 Fix m4 to properly handle bitwise operators &, ^, and |. Fix operator
precedence. Add short-circuit evaluation.

PR:		bin/60914
Reviewed by:	petef
Discussed with:	jeff, petef
2004-05-01 03:59:43 +00:00
Sean Kelly
15ea803975 m4 script to test the functionality of math operators in eval().
Submitted by:	K S Braunsdorf <sed@ksb.npcguild.org>
2004-05-01 03:27:05 +00:00
Sean Kelly
528d980cc0 A new version that does exponents and lots of other neat things. Update
from the original author of math.sed.

Submitted by:	K S Braunsdorf <sed@ksb.npcguild.org>
2004-05-01 02:15:58 +00:00
Tim Kientzle
231a973125 Speed up hardlink detection by using a self-sizing hash
table rather than the old linear list search.

On my "hardlink detection torture test", this reduced
user time from 4700 seconds down to 4.2 seconds
and wallclock time from 1:24:48 down to 1:08.
(Yes, that's over one THOUSAND times reduction in user time. ;-)
In the worst case, the new code doubles peak memory usage,
though it could actually reduce memory usage in many cases.

MFC after: 1 week
PR: misc/42167, bin/51151
2004-04-30 18:17:51 +00:00
Tim Kientzle
6c6b3d9aa5 -U is now implemented. (It's been recognized by bsdtar for a while;
now libarchive actually supports the underlying request.)
2004-04-29 05:22:13 +00:00
Tim Kientzle
d7837b06fe Refuse to extract entries with '..' in pathname.
Pointed out by: David Schultz
2004-04-28 18:53:07 +00:00
Tim Kientzle
0c27da5f82 Remove information about specific formats; replace with a
reference to libarchive-formats(5).
2004-04-28 04:43:57 +00:00
Tim Kientzle
749029a437 Update write.c to follow recent API changes to libarchive.
Also, bump up the default copy buffer from 8k to 64k
to improve performance.
2004-04-26 23:39:17 +00:00
Mike Silbersack
fa126c2954 Add the bad reset statistic (corresponds to tcp_input.c rev 1.235) 2004-04-26 02:57:33 +00:00
Tim Kientzle
7e02198e95 Fix username/groupname cache so it returns a name that
was just looked up by get{pw,gr}id().  Otherwise, it
returns a NULL name unless it's already in the cache.

Credit to Juergen Lock.
2004-04-23 16:33:51 +00:00
Tim J. Robbins
6d4ba9cd4e Print fork statistics with %u as they are unsigned quantities.
PR:		65889
Submitted by:	Ken Stailey
2004-04-23 13:10:29 +00:00
Tim Kientzle
fe44171ebd Eliminate a redundant call to archive_entry_set_pathname() 2004-04-21 05:16:28 +00:00
Dag-Erling Smørgrav
47d91ba394 Clarify and correct some compatibility notes.
PR:		65822
2004-04-21 00:42:55 +00:00
Brian Feldman
59fb7e543f Treat kevent(2) returning an error EINTR as the non-error it is. 2004-04-20 22:04:12 +00:00
Tim Kientzle
97c4c5308b Allow brave souls to install bsdtar as the
default "tar" command by defining WITH_BSDTAR.

Note: "gtar" and "bsdtar" commands both exist regardless.
2004-04-19 22:09:04 +00:00
Olivier Houchard
ec8ffccbdc Handle window resizing better.
Submitted by:	Cyril Nguyen Huu
Obtained from:	OpenBSD
2004-04-19 21:37:29 +00:00
Marius Strobl
d3770a0c15 Add my birthday.
Approved by:	marcel (mentor)
2004-04-18 01:05:55 +00:00
Tim J. Robbins
6c488bf29c Restore old value of LESSKEYFILE_SYS. 2004-04-17 07:48:21 +00:00
Tim J. Robbins
55e19c81cb Regenerate with less 381 configure script. 2004-04-17 07:46:08 +00:00
Tim Kientzle
cc52bf3428 --help is only supported if you have getopt_long().
This allows bsdtar to compile on FreeBSD 4.x.
2004-04-16 03:50:04 +00:00
Tim Kientzle
855e109158 As suggested by Julian Elischer, use a self-sizing hash
table for the hardlink cache.  This dramatically improves
performance when archiving millions of hardlinked files.

While I'm here, clean up some style bugs (per Bruce Evans)
and clarify some comments.
2004-04-15 22:37:54 +00:00
Bruce Evans
929789b42c Include <sys/proc.h> instead of depending on namespace pollution in
<sys/user.h> for the definition of TDF_SINTR.  Fixed anachronous
spelling of TDF_SINTR in a comment

Demangled VCS ids.  There were 2 misplaced copies of $FreeBSD$ and of
the include before it.  The vendor id infrastructure was edited.

Fixed the only other remaining style bug since rev.1.1 (expansion of
struct member names made a line too long).
2004-04-14 09:34:17 +00:00
Bruce Evans
a1541efa63 Include <sys/proc.h> for the definition of PS_INMEM instead of
depending on namespace pollution in <sys/user.h>.

Reduced nearby include messes.
2004-04-14 09:01:56 +00:00
Tim Kientzle
17834543c8 A simple cache of uid->uname lookups and gid->gname lookups eliminates
almost 1/2 of the CPU time required to create an uncompressed archive
and makes a noticable reduction in wallclock time.
2004-04-14 00:40:54 +00:00
Tim Kientzle
c7141791f3 When all the links to a file have been dumped, don't forget
to free() the memory used to store the filename.
2004-04-13 23:50:48 +00:00
Tim Kientzle
907d74bb26 Eliminate a lot of malloc/free calls by using
a stack-allocated buffer for safe_fprintf formatting.
Only if the result is too large do we resort to malloc.
2004-04-13 23:49:02 +00:00
Tim Kientzle
de60e4436b Manpage changes suggested by Irina Liakh.
Also, add -h as a synonym for -H, for Linux Standards Base compliance.
2004-04-13 19:45:55 +00:00
Luigi Rizzo
0b46c08590 Replace ROUNDUP/ADVANCE with SA_SIZE 2004-04-13 11:24:43 +00:00
Ruslan Ermilov
57d9d1d762 The .DEFAULT target with no commands caused a null pointer dereference.
PR:		bin/63405
Obtained from:	NetBSD
2004-04-12 20:05:11 +00:00
Tim Kientzle
5316058f3c Style fixes
Pointed out by: bde
2004-04-12 18:06:07 +00:00
Ruslan Ermilov
07b80458ef Document the new .warning directive. 2004-04-12 18:00:54 +00:00
Ruslan Ermilov
dba067b170 Added the new .warning directive.
Submitted by:	Cyrille Lefevre
2004-04-12 17:57:51 +00:00
Ruslan Ermilov
e16552014d Show link-level multicast packet counters with the -a option. 2004-04-12 15:00:48 +00:00
Ruslan Ermilov
bce2e7c8bb Fixed alignment of multicast addresses when printing that got
broken in previous revision.
2004-04-12 09:44:42 +00:00
Tim Kientzle
4cbbc3a35e Add DPADD to Makefile (thanks to Andrey for pointing this out).
Generally clean up Makefile, remove dmalloc references from source
(there are better ways to do this than pollute the FreeBSD src tree).
2004-04-12 00:13:23 +00:00
Maksim Yevmenkin
2f122b6e8a Use uint instead of u_int 2004-04-09 23:26:16 +00:00
Maksim Yevmenkin
4ae439a316 Make sure Bluetooth stuff can be compiled on amd64
Submitted by:	ps
2004-04-09 23:01:42 +00:00
Maxime Henrion
1aefe0e32e Backout previous commit. It seems this comment applied to something
else than I thought, and thus really needs to go away.

Noticed by:	ru
2004-04-09 17:30:26 +00:00
Maxime Henrion
92375a1cb9 Reintroduce a comment that was wrongly removed in revision 1.34. 2004-04-09 14:19:12 +00:00
Tim J. Robbins
149a123b34 Improve robustness of multibyte character handling (-m option), and
simplify the read buffering now that we can feed partial multibyte
characters to mbrtowc().
2004-04-09 11:17:29 +00:00
Tim Kientzle
f6f4796250 Allow arguments to appear in any order.
While I'm here, add a couple of extra sanity-checks to
the argument parsing (reject -j -z, for instance) and
update the docs a bit.

Requested by: most everyone ;-)
2004-04-08 19:37:01 +00:00
Tim Kientzle
54b3a82544 Document the newly-implemented -T option. 2004-04-08 06:21:03 +00:00
Tim Kientzle
330924f9bd Add support for -T option on create.
(Required by pkg_create.)
2004-04-08 06:12:01 +00:00
Tim Kientzle
4102998278 Correct signature in alternative stub implementation of setup_acls() 2004-04-07 17:43:48 +00:00
Tom Rhodes
53e87059f0 Add -acl and a small blurb about it to the options list.
Update date.
2004-04-07 14:48:30 +00:00
Tim Kientzle
1eb80e1673 Archive both access and default ACLs. 2004-04-06 23:08:31 +00:00
Tim Kientzle
e813a37f91 Connect bsdtar to the build. 2004-04-06 17:04:38 +00:00
Dag-Erling Smørgrav
3d49384208 Workaround for servers that ignore byte ranges when using chunked
encoding.

MFC after:	3 days
2004-04-06 12:24:26 +00:00
Tim Kientzle
d7fe3b4f52 Initial commit for bsdtar. 2004-04-05 21:32:18 +00:00
Ruslan Ermilov
78f104db9c Unbreak compilation on RELENG_4.
Submitted by:	des
2004-04-05 17:02:08 +00:00
Dag-Erling Smørgrav
3a0ad2fe74 Sort #includes, remove <sys/types.h> (made redundant by <sys/param.h>),
add <signal.h> (needed for sigaction())

Noticed by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-04-05 06:16:48 +00:00
Philippe Charnier
79a32d2730 Be consistant while reporting error conditions. 2004-04-04 19:17:38 +00:00
Philippe Charnier
75fb4a5304 Add FBSDID. Use %ld to printf(3) a long (even if the number is small). 2004-04-04 19:11:01 +00:00
Philippe Charnier
d6d62d8d63 Add FBSDID. Do not dot terminate errx(3) string. 2004-04-04 18:56:53 +00:00
John-Mark Gurney
9d2e2dd933 I can't believe that we had the Queen's birthday but not the King's...
Since my wife is Thai, she knows the proper date.
2004-04-04 07:31:35 +00:00
Bosko Milekic
9c5d31dff2 Give find(1) the option -acl to locate files with extended
ACLs.  This is similar to what ls(1) can do.  It is handy to
have it so that it can be used in conjunction with
"-exec setfacl {} \;" (to find(1)), among others.

This is the submitter's patch, but slightly modified.

PR: bin/65016
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
2004-04-03 17:10:04 +00:00
Colin Percival
734938becc From the list of calendars, remove some duplicate entries which were added
as a result of mis-sorting.

PR Submitter wanted to see a sorted list of non-national holidays followed
by a sorted list of national holidays; I'm not going to do this, because I
don't think we want to get into the "what is a nation?" debate.

PR:		docs/64848
Submitted by:	Ulrich Spoerlein <q@uni.de> (approximately)
MFC after:	3 days
2004-03-30 18:28:36 +00:00
Garance A Drosehn
c3f750cfbf Use KERN_PROC_PROC instead of KERN_PROC_ALL on the call to kvm_getprocs(),
so we get one line per process instead of one for each kernel-thread.

Noticed by:	ache & tjr
2004-03-30 15:10:50 +00:00
Garance A Drosehn
13ea8563af Add a cross-reference to pkill(1), now that pkill is hooked up to the build. 2004-03-27 23:45:33 +00:00
Garance A Drosehn
c3e741f776 bde also tells me that he is confident that P_SYSTEM will not work
any better on 4.x than it does on 5.2. If that's true then there
is no point to the __FreeBSD_version check that I had added.
2004-03-27 06:49:57 +00:00
Garance A Drosehn
f56b4f2de1 Hook pkill' (and thus pgrep') to the standard buildworld.
Reviewed by:	freebsd-arch
2004-03-27 05:44:55 +00:00
Garance A Drosehn
b643171bdb Some style(9)-ish improvements, courtesy of bde.
Noticed by:	bde
2004-03-27 05:40:31 +00:00
Garance A Drosehn
3d7fb10b5f Remove the _PATH_DEVNULL setting for "swapf". From the kvm_open(3)
man page:  The swapfile argument is currently unused.

Noticed by:	ru
2004-03-26 19:29:57 +00:00
Garance A Drosehn
47fc3041b2 Remove the NEED_KMEM support meant for FreeBSD 3.x. This base-system
version isn't going to be committed to that branch...

Noticed by:	des
2004-03-26 18:02:40 +00:00
Garance A Drosehn
d5ddb9bf52 Switch to checking P_KTHREAD instead of P_SYSTEM when deciding what
"system processes" to always ignore.  Based on my testing with `-D',
I am pretty sure this is what we want for 5.x-current.  If my thinking
is wrong, this also makes it easier to switch to a different check.
2004-03-26 17:51:49 +00:00
Ruslan Ermilov
ab82970ed2 Properly document the -M and -N options. 2004-03-26 11:01:45 +00:00
Ruslan Ermilov
376d460cff Correct the description of the -N option. 2004-03-26 10:48:35 +00:00
Ruslan Ermilov
f9a480abb1 Avoid the manpage layering violation and low-level implementation
details of libkvm, and just tell what the getbootfile(3) function
will return, by using the text from netstat(1) and dmesg(8).
2004-03-26 08:54:27 +00:00
Ruslan Ermilov
411ec5a7be Correct the description of options -N and -M to match reality. 2004-03-26 08:47:01 +00:00
Ruslan Ermilov
73bfeb89ca Apply style.Makefile(5). 2004-03-26 07:44:49 +00:00
Garance A Drosehn
f72f4d3a9c Send those -Debug messages to stderr, not stdout... 2004-03-26 02:20:52 +00:00
Garance A Drosehn
c44047c7a8 Add a debugging option, as I don't understand something that I'm seeing.
(this is a probably temporary option, and is not to be documented)
2004-03-26 01:43:19 +00:00
Garance A Drosehn
5def7269c2 Remove a redundant check against mypid (the check is done later, in
the "Take the appropriate action" section).

Obtained from:	the sysutils/pkill port
2004-03-26 01:30:15 +00:00
Garance A Drosehn
eb6d801134 Add a cast to get this to compile with WARNS=5 on sparc64. This is
needed because off_t == __int64_t, while size_t == __uint64_t.  This
also compiles with WARNS=5 on amd64, but I haven't tested the other
platforms yet.
2004-03-26 00:36:27 +00:00
Garance A Drosehn
ae1a248822 Fixes so this will compile with WARNS=5 on i386. 2004-03-26 00:15:20 +00:00
Garance A Drosehn
7ee9bb7817 Fix two cosmetic style(9) issues. 2004-03-25 23:35:14 +00:00
Garance A Drosehn
a6b60aa310 Add a comment for when these utilities were added to FreeBSD, and add
a cross-reference to killall(1).
2004-03-25 23:32:12 +00:00
Garance A Drosehn
998c10ebd9 Add -M' and -N' options to pkill' and pgrep', similar to
what are supported in `ps':

  -M  Extract values associated with the name list from the
      specified core instead of the default /dev/kmem.
  -N  Extract the name list from the specified system instead
      of the default /kernel.

Written by:	Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
Obtained from:	the sysutils/pkill port
2004-03-25 23:19:16 +00:00
Garance A Drosehn
69fd9fbfbc Use the correct type for some casts, thus avoiding a few warning messages
when compiling with WARNS=3

Written by:	Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
Obtained from:	the sysutils/pkill port
2004-03-25 22:08:52 +00:00
Garance A Drosehn
1b58b96b64 Change some routine and variable names to match the FreeBSD system.
Written by:	Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
Obtained from:	the sysutils/pkill port
2004-03-25 21:58:56 +00:00
Garance A Drosehn
0ddb37d879 Add the pkill' and pgrep' commands from NetBSD. This is the source
straight from NetBSD (except to add the RCS-ID lines for FreeBSD).
These will probably require a few updates before they are added to
the FreeBSD buildworld.  I might MFC these to 4.x-stable after 4.10.

Discussed on:	freebsd-arch
Obtained from:	NetBSD (and OpenBSD also has these)
2004-03-25 19:08:48 +00:00
Poul-Henning Kamp
743f91743d Respect decimal flag when dumping USER type records. 2004-03-25 12:33:55 +00:00
Bruce M Simpson
1d2a7e07d7 Sort SRCS in Makefile and document -g option additions.
Nudged by:	ru
2004-03-25 09:07:26 +00:00
Bruce M Simpson
3f2631c7ba Output style: Get rid of an unnecessary newline. 2004-03-25 08:51:14 +00:00
Bruce M Simpson
9fcc066d3e Teach netstat(1) how to print the multicast group memberships present
within the running system.

Sponsored by:	Ralf the Wonder Llama
2004-03-25 08:43:59 +00:00
Bosko Milekic
4d2e8e5fb8 Add -u option to ipcs(1) and document it in ipcs.1
It allows you to list IPC facilities owned by username/uid.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
PR: bin/63463
2004-03-24 04:01:43 +00:00
Dag-Erling Smørgrav
6ae3893bf3 Remove doscmd from the base system now that it lives in the ports tree. 2004-03-23 22:27:24 +00:00
David Malone
e45a5a0d08 Add support for decoding Timespec, Timeval, Itimerval, Pollfd,
Fd_set and Sigaction structures. Use these for printing the arguments
to sigaction(), nanosleep(), select(), poll(), gettimeofday(),
clock_gettime(), recvfrom(), getitimer() and setitimer().

This is based on Dan's patch from the PR but I've hacked it for
style and some other issues. While Dan has checked this patch, any
goofs are probably my fault.

(The PR also contains support for the dual return values of pipe().
These will follow once I've ported that support to platforms other
than i386.)

PR:		52190
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
2004-03-23 12:37:02 +00:00
David Malone
b637237cba Use pread to implement pread, rather than taking a detour throug stdio.
PR:		52190
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
2004-03-23 12:29:17 +00:00
Alfred Perlstein
5214320f76 decode mprotect args while i'm here. 2004-03-23 09:16:18 +00:00
Alfred Perlstein
894b8f7afb decode fcntl and mmap arguments. 2004-03-23 09:04:06 +00:00
Tim J. Robbins
2fa2fea101 Use fseeko() to properly support large files. 2004-03-22 11:15:03 +00:00
Tim J. Robbins
23e7704b30 Use errc(). 2004-03-22 09:33:10 +00:00
Colin Percival
a616808417 1. Use socklen_t instead of int
2. Compare socket(2) return code to -1, not <= 0.

Obtained from:	OpenBSD rev. 1.9
2004-03-21 08:14:39 +00:00
Dag-Erling Smørgrav
efc4d24dd6 Support C-style comments in profile. 2004-03-21 04:47:54 +00:00
Ruslan Ermilov
6bb3f2072d More cleanups:
- 0 should have been -1 in previous commit (just to stay consistent),
- Spell null pointers as NULL, not 0,
- Fixed the comment about pr_usesysctl to not confuse it with boolean.

Pointed by:	bde
2004-03-18 07:21:31 +00:00
Ruslan Ermilov
52ded959f5 NULL -> 0. 2004-03-17 20:19:45 +00:00
Ruslan Ermilov
0222d5bc2d Improved incorrect usage diagnostics. 2004-03-17 11:06:40 +00:00
Ruslan Ermilov
5d8fdf31dd Trust bsd.prog.mk to set SRCS correctly. 2004-03-17 10:52:12 +00:00
Ruslan Ermilov
2dc7343e8e GC unnecessary include file. 2004-03-17 10:51:18 +00:00
Thierry Thomas
eb34a15088 Approved by: mat (mentor). 2004-03-16 19:39:11 +00:00
Ruslan Ermilov
1a490c95d2 Catch up with the removal of the wt(4) driver. 2004-03-14 12:09:43 +00:00
Juli Mallett
8714ee5954 Add multiple inclusion guards. Mostly this is for extern.h, which was
included twice by lprint.c, which included both finger.h and extern.h.
finger.h, in turn, includes extern.h.  The redundant include of extern.h
was removed from lprint.c, as part of this change, but the include guards
were added anyway out of spite.
2004-03-14 06:43:34 +00:00
Bruce Evans
9b987187ee Fixed misspellings of 0 as NULL. Fixed some nearby style bugs. 2004-03-14 05:55:16 +00:00
Bruce Evans
f342fec625 Fixed a misspelling of 0 as NULL. 2004-03-14 05:51:20 +00:00
Warner Losh
7cbabef2c2 With the passing of the asc driver, the sasc prograqm is no longer
necessary.
2004-03-14 04:59:17 +00:00
Dag-Erling Smørgrav
6d7c0d2fed Do not print a warning about net.inet.pim.stats if errno is
ENOENT, because that means we do not have PIM in the kernel.

Submitted by:	hmp
MFC after:	1 week
2004-03-12 11:22:50 +00:00
Bruce Evans
c044589554 Fixed a misspelling of 0 as NULL.
Fixed a nearby bug.  The "play it safe" code in dosysctl() was unsafe
because it overran the buffer by 1 if sysctl() filled all of the buffer.

Fixed a nearby style bug in output.  Not just 1, but 2 extra newlines
were printed at the end by "vmstat -m" and "vmstat -z".  Don't print
any newlines explicitly.  This depends on 2 of the many formatting
bugs in the corresponding sysctls.  First, the sysctls return an extra
newline at the end of the strings.  This also messes up output from
sysctl(8).  Second, the sysctls return an extra newline at the beginning
of the strings.  This is good for separating the 2 tables output by
"vmstat -mz" and for starting the header on a new line in plain sysctl
output, but gives a bogus extra newline at the beginning for "vm -[m | z]"
and "sysctl -n [kern.malloc | vm.zone]".

Fixed some nearby style bugs in the source code:
- the same line that misspelled 0 as NULL also spelled NULL as 0.
- the size was doubled twice in the realloc loop.
- the "play it safe" comment was misleading.  Terminating the buffer
  is bogus because dosysctl() is only meant to work with sysctls that
  return strings and the terminator is part of a string.  However, the
  kern.malloc sysctl has more than style bugs.  It also doesn't return
  a string.  Termination is needed to work around this bug.
2004-03-11 11:30:57 +00:00
Josef El-Rayes
55cc37447a Replace <iostream.h> with <iostream> to remove annoying warning
of using deprecated header.

Approved by:    dwhite, simon(mentor)
Reviewed by:    mlaier
Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>
PR:             bin/63781
2004-03-11 10:43:35 +00:00
Bruce Evans
83e6e8406c Fixed a misspelling of '\0' as NULL. 2004-03-11 10:22:25 +00:00
Bruce Evans
00925a8e84 Fixed misspellings of 0 as NULL. 2004-03-11 10:19:45 +00:00
Bruce Evans
263bf898e0 Fixed misspellings of '\0' as NULL. 2004-03-11 10:12:05 +00:00
Bruce Evans
754df37025 Fixed a misspelling of 0 as NULL. 2004-03-11 10:09:01 +00:00
Ruslan Ermilov
30b800de8e Reworked the fix to print the useful line number on error in
the .for loop:

- Replaced four global variables in parse.c with one.
- Made Parse_FromString() accept the "lineno" as an argument.
- Fixed line numbering when there are escaped newlines in the
  body of the .for loop.

Adopted from:	NetBSD
2004-03-10 21:51:06 +00:00
Peter Edwards
c2026e4db2 Another April Fool signs up. 2004-03-10 00:06:01 +00:00
Ruslan Ermilov
577cf233eb Make it possible to ``.undef ${VAR}'' (expanding VAR to get
the variable name to undef).

Submitted by:	Cyrille Lefevre
2004-03-09 17:36:55 +00:00
David Malone
33dc549136 Fix the easy warnings:
1) Avoid shadowing index.
2) Constness.
3) Missing prototype for ifcmd.
4) Missing include of string.h.
5) Avoid shadowing error function.
6) ANSI definition for main.
2004-03-09 11:57:28 +00:00
David Malone
a77c5ad8b7 Misc fixes brought to light by WARNS=6:
1) Constness, unusedness and size_tness.
2) Don't clobber the value returned by hid_report_size in the daemon case.
3) Don't misspell "sizeof buf" as 100.
4) Don't run off the end of a buffer if the pid is about a google.
5) Avoid shadowing the usage function.
2004-03-09 11:35:43 +00:00
Ruslan Ermilov
d56ed147ae Fixed line numbering inside the .for loops.
Submitted by:	Cyrille Lefevre
2004-03-09 08:09:33 +00:00
Mike Heffner
43acc706ac These aren't all binary options. 2004-03-09 01:20:24 +00:00
Colin Percival
8c423a998e Make it possible for the %[eEfgG] formats to not result in an error
being reported by /usr/bin/printf.

This bug has been around for 22 months... either nobody uses printf
with floating-point values, or people are forgetting to check their
return codes.

Approved by:	rwatson (mentor)
2004-03-07 22:22:13 +00:00
Dag-Erling Smørgrav
7b8fd8e313 Fix markup.
Submitted by:	ru
2004-03-06 23:36:41 +00:00
Dag-Erling Smørgrav
bd43dc4256 Hook logins(1) up to the build. 2004-03-06 21:57:47 +00:00
Dag-Erling Smørgrav
0a5f38d4b1 Add a logins(1) utility similar to that found in SVr4 derivatives. This
particular implementation is based on the Solaris logins(1) man page.
2004-03-06 21:57:29 +00:00
Mike Heffner
761981e0e8 Assign checkmode boolean earlier to handle the goto jump.
Might fix PR bin/63769.
2004-03-06 13:27:59 +00:00
Wes Peters
0d1bf85301 Use getopt instead of hand-rolled argument parsing. Usage remains
the same, no man page changes required.

PR:		bin/48313
Submitted by:	Stefan Farfeleder <stefan@fafoe.dyndns.org>
Reviewed by:	joe@
2004-03-05 01:52:09 +00:00
Josef El-Rayes
edf075d085 Update URL of GCC status page to GCC 3.3
Approved by:    simon(mentor)
Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>
PR:             docs/63370
2004-03-04 20:29:27 +00:00
Marc Fonvieille
ede93bc647 Typo fix.
PR:		docs/63677
Submitted by:	Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
MFC after:	1 week
2004-03-03 09:15:07 +00:00
Jake Burkholder
d499047c83 Elf_Phdr.p_type 7 is "PT_TLS". 2004-03-02 14:06:27 +00:00
Mike Heffner
c92dfc231b Add the -e (mail presence test), -H (header summary mode), and -F
(message save as first recipient) options for standards
conformance.

Submitted by:	Wartan Hachaturow <wart@tepkom.ru> (with some changes)
PR:		standards/61934
2004-02-29 20:44:44 +00:00
Jens Schweikhardt
ec6001d98e Fix grammar bogon. 2004-02-29 12:52:21 +00:00
Bruce Evans
77585df415 Fixed style bugs in previous commit (.ifndef instead of .if defined(),
and tab lossage).

Garbage-collected NEED_LIBNAMES.
2004-02-29 06:39:11 +00:00
Tom Rhodes
e578c2421c Update the find manual page:
1: Document -follow under COMPATIBILITY.
2: Update an example to be a little more 'safe'.
3: Use '/' in place of '.' for an example; similar to other manual pages.

PR:		40196 (1), 39532 (2, 3)
Submitted by:	Marc Silver <marcs@draenor.org> (2 and 3)
Discussed with:	des (1)
2004-02-27 20:04:38 +00:00
Dag-Erling Smørgrav
76e4339aa7 I am a moron. 2004-02-27 19:00:41 +00:00
Dag-Erling Smørgrav
13ae56f84d Re-add the setuid bit, conditional on NO_SETUID_LOGIN being undefined. 2004-02-27 17:50:59 +00:00
Dag-Erling Smørgrav
ac9fd74eb1 Remove EXAMPLES section which duplicates text in fetch(3). 2004-02-27 10:27:01 +00:00
Dag-Erling Smørgrav
c9d0616d93 Cut through the bikeshed and remove login(1)'s setuid bit. It has no
business trying to impersonate su(1), and it does not need to be setuid
to function properly when invoked by getty(8) or telnetd(8).
2004-02-27 08:39:16 +00:00
Dag-Erling Smørgrav
e9c67f69d1 Use the -H option instead of the deprecated -follow predicate. 2004-02-25 21:45:41 +00:00
Bruce Evans
7501cdc8e5 Demangled vendor ids. Fixed misplaced FreeBSD id. 2004-02-25 13:26:53 +00:00
Bruce Evans
5dfef63412 Backed out rev.1.6. A bogus include was added to work around breakage of
<netinet/tcp_var.h>'s prerequisites.  Prerequistes should not grow for
userland headers, and <netinet/tcp_var.h> is unfortunately still needed
in userland.
2004-02-25 13:11:48 +00:00
Colin Percival
28ef1f9814 Send birthday presents to Wadham College, Oxford. :)
Approved by:	rwatson (mentor)
2004-02-24 01:44:47 +00:00
Markus Brueffer
538d21bfb9 Add my birthday.
Approved by:	arved (mentor)
2004-02-23 20:39:23 +00:00
Johan Karlsson
604d24db95 style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
Dag-Erling Smørgrav
24126ee089 Typo. 2004-02-23 09:08:27 +00:00
Dag-Erling Smørgrav
5476ba5545 Use %zu for size_t, like God intended. 2004-02-18 21:51:02 +00:00
Dag-Erling Smørgrav
eae1afd9a2 Fix printf() format bug in previous commit (size_t != int).
Use %ju and an (uintmax_t) cast to print size_t values.
Use %jd and an (intmax_t) cast to print off_t values.
Use off_t variables to hold the difference between two off_t values.
Don't bother with unsigned char where char will do nicely.
2004-02-18 21:37:36 +00:00
Dag-Erling Smørgrav
3f59deafb3 Revamp the statistics code, and switch to a much more compact display
format.  The old code tried to produce the exact same output as the
pre-libfetch implementation, but I no longer see any value in this.
2004-02-18 15:12:00 +00:00
David Malone
c4dd6db19b Fix some WARNS:
1) Remove some unused variables.
2) Mark some things aas static or __unused.
3) Cast to make sure we're comparing the same types.
2004-02-15 22:48:25 +00:00
David Malone
feeb25809c Remove an unused variable. 2004-02-15 22:12:32 +00:00
David Malone
10f106f5fd Fix a few WARNS:
1) Include string.h for strcpy.
2) Don't make duplicate declaration of dump_file, we now include extern.h.
3) Help out with some constness.
4) Cast to slightly better types in some comparisons.
2004-02-15 22:01:23 +00:00
David Malone
baa8d9176f Include timeconv.h for _int_to_time and _time_to_int. 2004-02-15 21:52:59 +00:00
Colin Percival
d6a68195af Attempt #2 to fix script(1) if the standard input is closed: If we
read EOF from STDIN_FILENO, write zero bytes into the pseudo-terminal;
this is interpreted as an EOF by the program being scripted.

I've tested this with two non-interactive scripts:
# echo 5 | script foo sh -c 'read x; sleep $x; echo bar'
# echo bar | xargs script foo echo
and one interactive program:
# script foo more /etc/passwd
and everything seems to work properly...

PR:		bin/56166, bin/57414, ports/57415, ports/60534
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-02-15 17:30:13 +00:00
Bruce Evans
a55a608e71 Only indent once for continuation lines when not lining up with
parentheses if the continuation indent is exactly half of the main
indent.  Indenting one contination indent for every level of
parentheses gives bad results in most cases and is not what is done
in about 90% of properly hand-formatted KNF code (sys/kern/*.c,
nvi/common/*.c).  The main advantage of the non-default KNF options
-nlp -ci4 is that continuation lines don't accidentally line up with
the next main indentation level or march to the right, and increasing
their indentation defeats this.

This behaviour change is limited to when the continuation indent is
exactly half of the main indent to avoid adding yet another option.
2004-02-12 16:25:12 +00:00
Wes Peters
d5a445b62b Add some presidential birthdays. 2004-02-10 18:41:52 +00:00
Max Laier
9c43d53bb8 Add my birthday (for those interested)
Approved by: bms (mentor)
2004-02-10 16:23:17 +00:00
Bruce Evans
88ce0e7f7e Added an option -ldi<N> to control indentation of local variable names.
The default is to be backwards compatible and non-KNF (use the same
indentation for locals as for globals; -ldi0 gives KNF indentation
for locals (none)).  The indentation for globals also applies to struct
member names in local declatations.  The indentation of variable names
in multi-line declarations is broken in various ways and this commit
gives some new variations.

indent.1:
Also clarified the description of -di<N>.
2004-02-09 21:48:51 +00:00
Bruce Evans
7b3b38c6db Only use tabs to indent variable names if the declaration indent is
nonzero (so that the 1-char indentation given by -di0 is never rendered
by a tab).

Removed garbage commented out code for setting the indentation of variable
names.
2004-02-09 20:42:08 +00:00
Bruce Evans
eebee5a754 Backed out a part of previous commit that wasn;t mentioned in the log
message and wasn't quite ready (it avoided indenting the names of local
variables).
2004-02-09 20:26:27 +00:00
Bruce Evans
e024a09064 Fixed tab lossage in indented variable names. The -diN option was
worse than useless because it caused things like mangling of
"^int\tfoo" to "int     foo" (this for N = 8).  This quick fix breaks
the invariant that characters between s_code and e_code have width 1,
but nothing seems to depend on this.
2004-02-09 15:57:35 +00:00
Bruce Evans
47fe027b66 Fixed misformatting of "struct foo *bar" in function parameter lists. It
was mangled to "struct foo * bar".  There should be an option to control
this, but no space is normal.  This finishes fixing the bugs in rev.1.4.

indent(1) still doesn't really understand types in parameter lists.  It
thinks keywords inside parentheses are for casts or sizeofs.  This works
accidentally for scalar types and this quick fix makes it work similarly
but not so accidentally for struct/union/enum types.
2004-02-09 15:27:02 +00:00
Bruce Evans
611e9fdbb4 Expanded the size of the keyword table from 100 to 1000 entries so that
the number of typedef-names is not so limited.  Same as in rev.1.4.

Added the "const" and "volatile" to the keyword table.  Rev.1.4 added
these but they were misclassified so they were not formatted as types.
indent still doesn't really understand them.  E.g., it mangles
"char * const *foo" and "char *const *foo".  This change mainly stops
it mangling "char const foo" to "char<declaration-indent>const foo".
2004-02-09 13:13:03 +00:00
Bruce Evans
43a3abfd1e Backed out rev.1.4 and 1.7 so they they can be implemented and committed
properly.  Of the 3 changes mentioned in the log message for rev.1.4,
the first (implementing -[n]fcb) was correct but didn't touch this
file, the second (no-space-after-sizeof) was not actually done (it is
the default and is controlled by the undcoumented -[n]bs options), and
the third (no-space-after 'struct foo *') was very buggy and was reduced
to wrong comments and other style bugs by backing out the main part
of it in rev.1.6.  Rev.1.4 had 2 changes which were not mentioned in
its commit log: expand specials[] so that more than -83 typedef-names
can be specified (this was the one working change in rev.1.4), and add
"const" and "volatile" to specials[] (this was buggy).
2004-02-09 12:52:15 +00:00
Ruslan Ermilov
b08f1446e3 - Demangle usage().
- Require the "directory" argument with the -d option.
2004-02-07 07:22:11 +00:00
Ruslan Ermilov
47d7e8a96f Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
Ruslan Ermilov
b77a54a688 Added missing DPADD. 2004-02-05 22:01:28 +00:00
Hajimu UMEMOTO
4ef2dc8b71 printed statistics about source address selection rules.
Obtained from:	KAME
2004-02-05 12:08:35 +00:00
Hajimu UMEMOTO
cb60a8de59 stops program if kvm_read fails.
Obtained from:	KAME
2004-02-05 12:05:35 +00:00
Hajimu UMEMOTO
22a4e20905 - support hmac-ripemd160.
- support AES XCBC MAC/AES counter mode.

Obtained from:	KAME
2004-02-05 12:02:37 +00:00
Hajimu UMEMOTO
3fde69b944 print stats on SPD cache lookups.
Obtained from:	KAME
2004-02-05 12:01:39 +00:00
Hajimu UMEMOTO
5d8a878a55 - %d is 12 chars, not 10. use NI_MAX* where appropriate.
- goodbye RC5.
- use %llu directly.
- KNF.

Obtained from:	KAME
2004-02-05 11:59:37 +00:00
Ruslan Ermilov
3ce0bf5144 Removed unnecessary dependencies on librpcsvc.
Prodded by:	des
2004-02-04 11:59:08 +00:00
Ruslan Ermilov
80c49332e2 Put libdevstat before libkvm, because the former depends on the latter. 2004-02-04 10:20:43 +00:00
Josef El-Rayes
f08535cddc Add myself.
Approved by:	simon(mentor)
2004-02-03 23:26:36 +00:00
Lukas Ertl
1c77c0f187 Add my birthday.
Approved by: joerg (mentor)
2004-02-03 12:08:18 +00:00
Ruslan Ermilov
6ec2f175f9 Fixed style of assignments. 2004-02-02 18:01:19 +00:00
Ruslan Ermilov
3826278409 GC (now unused here) -lcrypt. 2004-02-02 18:00:06 +00:00
Andrey A. Chernov
af30114b09 Back out LANG printing changes. POSIX is unclear in this place, but
other systems do that in the old way.
2004-02-02 16:14:02 +00:00
Andrey A. Chernov
903e95e660 Fix printout case when LANG is overwritten by LC_ALL 2004-02-01 10:32:22 +00:00
Wes Peters
fbcf5e6575 Remove the inadvertant HTML additions to this man page.
These appear to have been inserted in the PR text by gnatsweb.

Noticed by:		des (maintainer)
2004-01-28 18:51:24 +00:00
Maksim Yevmenkin
18d948adb1 Add NO_BLUETOOTH knob to the build process
Requested by:	phk
Reviewed by:	imp (mentor), ru
2004-01-28 00:42:51 +00:00
Colin Percival
0a43b788bf Back out part of 1.21, since it breaks script interactive-program. This
re-breaks non-interactive portupgrade (or at least old versions of
portupgrade); I'll see if I can put together a solution which avoids
breaking anything later.

Approved by:	rwatson (mentor)
Noticed by:	Stefan Farfeleder, Joshua Goodall
2004-01-27 17:50:47 +00:00
Max Khon
71f4a30d59 Fix ~/.hushlogin handling.
PR:		61354
Submitted by:	Eugeny Grosbein <eugen (at) kuzbass.ru>
2004-01-26 20:04:47 +00:00
Diomidis Spinellis
5aa41214a8 New -e flag, modifies the behavior of the -u uid flag to use the
effective user id, instead of the real user id.

MFC after:	2 weeks
2004-01-26 11:11:36 +00:00
Wes Peters
09d2d42edd Revert changes of rev 1.55; replace with strong encouragement to
read fetch(3) as well.

Requested by:	des (maintainer)
2004-01-26 07:55:30 +00:00
Dag-Erling Smørgrav
90ffd7ea34 Previous commit did the reverse of what the log message said (and of
what I intended to do).  Really remove my middle name.
2004-01-26 07:09:12 +00:00
Ruslan Ermilov
a59f8cc52c Fixed a bug that previous revision has introduced -- we missed
the double quotes ("" and '') as a separate argument.

Reported by:	ache

The fix in this and previous revisions combined is functionally
equivalent to the below patch against rev. 1.27 but the code is
now much easier to follow:

%%%
Index: str.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/make/str.c,v
retrieving revision 1.27
diff -u -r1.27 str.c
--- str.c	28 Oct 2002 23:33:57 -0000	1.27
+++ str.c	25 Jan 2004 12:09:21 -0000
@@ -168,7 +168,7 @@
 				inquote = (char) ch;
 				/* Don't miss "" or '' */
 				if (start == NULL && p[1] == inquote) {
-					start = t + 1;
+					start = t;
 					break;
 				}
 			}
%%%
2004-01-25 12:28:36 +00:00
Dag-Erling Smørgrav
09e0653941 I don't normally use my middle name, so remove it from attributions in
man pages (though not from copyright notices).  While I'm here, add email
addresses where appropriate.
2004-01-25 11:39:42 +00:00
Tim J. Robbins
397df60637 Fix section number in cross reference. 2004-01-23 20:29:03 +00:00
Wes Peters
cec5287b4d Document fetch(1) environment variables in fetch(1) man page, instead of
taking lazy users on the arduous journey through SEE ALSO to fetch(3).

PR:		docs/61759
Submitted by:	Christian S.J. Peron <maneo@bsdpro.com>
2004-01-23 04:50:48 +00:00
Sheldon Hearn
4294ff16a7 Fix SYNOPSIS of manual page, clustering no-arg options correctly.
Sync usage with manpage.
2004-01-22 21:26:41 +00:00
Colin Percival
e292a0e3f1 Two fixes for script(1):
1. Don't do tty stuff to stdin if stdin isn't a tty.
2. When running in non-interactive mode, don't select(2)
on the standard input.

This un-breaks non-interactive portupgrade.

PR: bin/59036 [1]
PR: bin/56166, bin/57414, ports/57415, ports/60534 [2]
MFC after: 7 days
Approved by: rwatson (mentor)
2004-01-22 21:01:14 +00:00
Colin Percival
b4e148e9ff Serial murderers shouldn't commit suicide. (killall should
avoid killing itself.)

PR: bin/46107
Submitted by: stacey <stacey_@starwhack.net>
2004-01-22 20:56:06 +00:00
Ruslan Ermilov
cc7282659a Fixed broken logic when parsing double quotes.
PR:		bin/61673
MFC after:	1 month
2004-01-22 18:17:44 +00:00
Peter Grehan
5cfe0423e6 Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe
2004-01-22 07:23:36 +00:00
Colin Percival
54ca359425 Two fixes here:
1. If fgets fails, don't go into an infinite cpu-intensive loop.  Instead,
check to see if the terminal still exists, and sleep(1) otherwise.
2. When we check to see if the terminal still exists, make sure we're not
mislead by EINTR.  This could have been a security issue, but fortunately
the current implementation of tcgetattr doesn't EINTR.

PR: bin/60758
Approved by: rwatson (mentor)
2004-01-22 04:24:15 +00:00
Philip Paeps
ad093bdc0a Add my birthday.
Approved by: njl (mentor)
2004-01-21 18:11:46 +00:00
Jens Schweikhardt
ef6885585b Revert previous commit, ru has ideas how to better document this
elsewhere.
2004-01-21 17:58:33 +00:00
Dag-Erling Smørgrav
e562f8fb28 Use a larger field for the size in blocks; the current width (4 digits)
is only good for 5 MB.
2004-01-20 09:27:03 +00:00
Jens Schweikhardt
863fa48f65 Document __MAKE_CONF and its default, /etc/make.conf.
MFC-After:	2 weeks
2004-01-19 21:44:58 +00:00
Philippe Charnier
612956f67c Remove unused includes. Make it WARNS=6 friendly. Concerning bin/2442, make
a new function dup_shell() to replace ok_shell() and make it unconditionnally
strdup() its result to make the caller's code simplier. Change ok_shell() to
just return an integer value suitable for tests (it was used mainly for that
purpose). Do not use strdup() in the caller's code but rely on dup_shell()
that will do the job for us.

PR: bin/2442
2004-01-18 21:46:39 +00:00
Maxim Konovalov
ed4788962e o -m flags contructs case sensitive RE, not case insensitive.
MFC after:	1 week
2004-01-18 17:51:34 +00:00
Maxim Konovalov
6dcfd34771 o Sync usage() and man page synopsis with reality.
MFC after:	1 week
2004-01-18 17:49:25 +00:00
Ruslan Ermilov
869537e12d Put chkey(1), newkey(8), and keyserv(8) into the crypto distribution. 2004-01-18 09:29:47 +00:00
Ruslan Ermilov
d10a8d6cb4 - Build things in pure dictionary order (see sort(1)).
- Unify the conditional assignments section so that architectural
  exclusions come first, then options and !options, sorted by the
  option name, also in directory order, then architecture specific
  sections, sorted by the architecture name, with i386 being a
  traditional exception.

Prodded by:	bde
2004-01-16 15:23:19 +00:00
Hartmut Brandt
10a527618c Allow variable substitutions in SYSV variable substitutions like
$(SRC:.c=$O). This brings us closer to other makes.

Reviewed by:	ru
Obtained from:	NetBSD
2004-01-12 10:35:46 +00:00
Jacques Vidrine
74b4aad765 Remove (another) now redundant and now conflicting declaration of
sysarch(2).  Remove now unnecessary casts.

grep(1) says this is the last sysarch declaration in the src tree.

Reported by:	alpha tinderbox
2004-01-12 04:05:23 +00:00
Ruslan Ermilov
1c43e2766b Moved the code for :U and :L modifiers where it belongs, so that
the fallback for SysV (now in POSIX) variable substitution works
for old_string arguments starting with 'U' or 'L'.
2004-01-10 16:30:29 +00:00
David Malone
1bc99f1144 Move declarations of Procfd to a header file. 2004-01-07 14:29:45 +00:00
David Malone
9b83b9f75c Fix a printf format warning. 2004-01-07 14:27:30 +00:00
Jacques Vidrine
d48ff1e438 Mark a function as `unused' in generated code. (Sometimes it is used,
sometimes it is not, depending upon the input grammar.)
2004-01-06 19:03:44 +00:00
Jacques Vidrine
d179cf2207 Work around a `label defined but not used' warning in *generated* code. 2004-01-06 18:54:55 +00:00
Dag-Erling Smørgrav
60f4b54d8f When root tries to su to a non-existent user, pam_authenticate() will
normally succeed (because root can su to anyone), but pam_acct_mgmt()
will most likely fail, causing su to log a confusing "pam_acct_mgmt:
error in service module" message.  To avoid this, call getpwnam()
before pam_acct_mgmt().

Sponsored by:	registrar.no
2004-01-06 09:47:24 +00:00
Philippe Charnier
0a2956bbc0 Correct reference to a non existant man page. 2004-01-04 16:34:16 +00:00
Philippe Charnier
ca802a8abe Avoid using .Nm at the start of the sentence. 2004-01-04 15:33:06 +00:00
Greg Lehey
ca3692455f Remove inappropriate reference to USSR. 2004-01-01 23:32:07 +00:00
Andrey A. Chernov
db785f7f72 Fix typo in prev commit 2003-12-31 18:01:31 +00:00
Andrey A. Chernov
d784f97cd2 Remove incorrect holiday, add new one, fix another one 2003-12-31 18:00:01 +00:00
Bruce Evans
9e53fb7dc8 Use floating point instead of unsigned long longs in percentage
calculations.  Long longs should never be used, since they break compiling
with C90 compilers and don't necessarily work any better than longs for
avoiding overflow.

Print percentages with another digit of precision since they can be small
and this is easy to do now that the format is floating point.

Restored some more of the old -m output:
Print the percentage of allocated memory that is in use.  This is the
amount of memory in active mbufs and mbuf clusters relative to the
total amount of memory soft-allocated for mbufs and mbuf clusters.

Print the percentage of allocated memory that is wired (cached).  The
old mbuf allocator never freed memory so printing this value wasn't
useful.  A previous version of netstat for the new allocator printed
the in-use amount as a percentage of the wired amount.

Fixed some nearby style bugs (excessive parenthesization and a redundant
return).

Reviewed by:	alfred
2003-12-29 08:25:32 +00:00
Bruce Evans
aa54e1ecc5 Fixed missing declaration of pluralies(). This showed up as strange
printf format warnings for inet6.c (pluralies() was implicit int, but
the context requires a "char *").

Added WARNS?=2 to the Makefile so that such errors don't come back.
Added NO_WERROR?= to the Makefile because I haven't checked that setting
WARNS doesn't uncover more bugs except on i386's.
2003-12-29 04:41:38 +00:00
Bruce Evans
3e15599181 Fixed style bugs created in rev.1.27 by removing "__P(" and its closing ")"
without removing the space before it.
2003-12-29 04:34:36 +00:00
Alex Dupre
ab05eab129 Add my birthdate (gifts are welcome :-)).
Approved by:	blackend (mentor)
2003-12-28 18:13:57 +00:00
Mike Silbersack
6171a2800d Teach netstat about the new sendfile statistics. 2003-12-28 08:59:41 +00:00
Martin Cracauer
5cdf6a132b Fix signal behaviour.
In my last change I made sure that the signal as reported from a truss
exit is the same as if truss wasn't between parent and trussed
program.  I was smart enough to not have it coredump on SIGQUIT but it
didn't ocur to me SIGSEGV might cause a coredump, too :-)

So get rid of SIGQUIT extra hack and limit coredumpsize to zero
instead.

Tested: still works, correct signal reported.  No more codedumps from
SIGSEGV in the trussed proces.  This file compiles cleanly on AMD64
(sledge).

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2003-12-28 01:20:03 +00:00
Mike Silbersack
18258f6d7a Clean up the style of the previous commit, and fix a few
type mismatches as well.

Suggested by:	bde
2003-12-27 09:02:31 +00:00
Mike Silbersack
8db142fa03 Teach netstat to read and display the new sfbuf statistics. 2003-12-27 07:58:31 +00:00
Alfred Perlstein
1164d324ea Fix percentages by using long long to hold values for 'space',
overflow was breaking a bunch of the stats, specifically the
percentage displayed for wired memory.

Fix the output for current/peak/max lines, I forgot to output the types.
161/320/51200 (current/peak/max):
-to-
639/25696/51200 mbufs in use (current/peak/max):
2003-12-26 18:47:41 +00:00
Maxim Konovalov
3de7e68ab4 More holidays in .ru, fixes, strip redundant prefix.
Submitted by:	osa
2003-12-26 13:04:13 +00:00
David Malone
67206e04f9 Remove an unused variable.
Add some missing constness.
2003-12-25 01:32:55 +00:00
Mike Silbersack
ba2bc772d1 Make systat -net aware of compressed time_wait sockets. 2003-12-24 08:54:53 +00:00
Alfred Perlstein
7a744a48d2 I asked Bosko Milekic for help with 'peak' reporting, and he suggested
using the old 'cached' value but reporting it as 'cached'.

I've decided to report the 'cached' as 'peak', why?  Well because
it is the peak, the peak of what is actually allocated.  'cached'
doesn't make sense to me as a user.
2003-12-23 14:06:24 +00:00
Alfred Perlstein
dbe0253a8b Restore old netstat -m output.
A new flag '-c' can be used to ask for the cache stats.
2003-12-23 13:24:03 +00:00
Maksim Yevmenkin
263a3a25b1 Fix a couple of stylistic issues
Reviewed by: imp (mentor), ru
Approved by: imp (mentor)
2003-12-22 22:50:21 +00:00
Maksim Yevmenkin
4b1493e53d Fix uncontrolled access to the buffer in rfcomm_sppd(1).
Fix typo in hcsecd(8) man page.

Submitted by: Guido Falsi <mad@madpilot.net>
Reviewed by: imp (mentor)
Approved by: imp (mentor)
2003-12-19 18:15:56 +00:00
Scott Long
d11fc0ae6f Change the select timeout from 100ms to 2 seconds now that SIGCHILD is
handled.
2003-12-19 11:18:37 +00:00
Maxim Konovalov
cf8bfa740b Add a bunch of Russian holidays.
PR:		docs/50013
Submitted by:	osa
2003-12-15 11:51:26 +00:00
Dag-Erling Smørgrav
4358431405 Install a SIGCHLD handler so select(2) will be interrupted when a child
terminates.  Without this patch, 'make -j1 buildworld' takes about 30%
longer than 'make -B buildworld' on my 2.4 GHz P4; the difference is
probably even larger on faster systems.  With this patch, there is no
perceptible difference in wall time between the two.

Submitted by:	bde
MFC after:	3 days
2003-12-13 15:26:27 +00:00
Bruce Evans
06849fd97a Fixed misplacement of __FBSDID(). Backed out editing of vendor id lines.
Just wrap them in #if 0...#endif.
2003-12-11 10:58:29 +00:00
Dag-Erling Smørgrav
56f9b09632 Revert part of revision 1.74 after bde reminded me of a detail I'd
forgotten about how sysctl works.  This removes a potential (though
not very likely) race that 1.74 introduced.
2003-12-11 07:46:08 +00:00
Dag-Erling Smørgrav
1b62c2410d Whitespace cleanup. 2003-12-10 22:19:19 +00:00
Dag-Erling Smørgrav
dc4ed4fe11 Remove debugging printf 2003-12-10 22:14:32 +00:00
Dag-Erling Smørgrav
eb23b4e6cd Document the simpler -a semantics. 2003-12-10 22:12:06 +00:00
Dag-Erling Smørgrav
7d268144f1 Fix a couple of issues in the interrupt code:
- Replace overly-complicated (and buggy) -a logic with a much simpler
   version: -a causes all interrupts to be displayed, otherwise only
   those that have occurred are displayed.  This removes the need for
   any MD code.

 - Instead of just making sure intrcnt is large enough, figure out the
   exact size it needs to be.  We derive nintr from this number, and we
   don't want to risk printing garbage.  Note that on sparc64, we end up
   printing garbage anyway because the names of non-existent interrupts
   are left uninitialized by the kernel.

Tested on:	alpha, i386, sparc64
2003-12-10 22:11:51 +00:00
Dag-Erling Smørgrav
3c455bcacc s/u_(int|long)\>/unsigned \1/ 2003-12-10 21:43:10 +00:00
David Malone
e38926c160 Fix a couple of warnings (const a function parameter and change some
ints to size_ts to better match the types of variables they are used
with).

Glanced at by:	des
2003-12-10 19:24:11 +00:00
Maxim Konovalov
89dff38285 Use .St -susv2 rather than "The Single UNIX specification".
Submitted by:	osa
2003-12-10 10:52:48 +00:00
Peter Wemm
24b648094d First pass at attempted debrucification:
- sort the -E switch into the right place.
- add previously missing -p pid in usage (from the last few commits).
- add -E to usage.
- consistently use trfile in the man page.

I knew I shouldn't have touched the man page.  If I commit to a man page,
it just makes people suspicious. :-)
2003-12-08 22:47:59 +00:00
Marcel Moolenaar
7e00080caa Unbreak vmstat -i on ia64:
o  nintr and inamlen must by of type size_t, not int,
o  Remove now unnecessary casts,
o  Handle the aflag differently, because the intr. names have a
   fixed width and almost always have trailing spaces.
2003-12-08 07:57:57 +00:00
Maxime Henrion
ec912781bb The uuidgen(1) program is WARNS=6 clean, so flag it as such.
Tested on:	i386, sparc64
2003-12-07 21:34:56 +00:00
Dag-Erling Smørgrav
c51633823d Finish the transition from libkvm to sysctl that I started a while ago.
The use of libkvm for post-mortem analysis is still supported (though it
could use more testing).  We can now remove vmstat's setgid bit.

While I'm here, hack the interrupt listing code to not display interrupts
that haven't occurred unless the -a option was given on the command line,
and document this change.
2003-12-07 17:46:14 +00:00
Peter Wemm
ec13191464 Add a -E (elapsed time) flag to kdump. This is like -T, except it is
relative to start of the dump.

Approved by:  re (scottl)
2003-12-07 01:06:32 +00:00