Commit Graph

7060 Commits

Author SHA1 Message Date
Tim Kientzle
8d49c1a85c Mimic ls(1) by putting an extra space before the year in old dates 2004-07-12 13:15:13 +00:00
Tim Kientzle
3481100baf Fix tab/space screwup in long_help() 2004-07-12 13:13:42 +00:00
Tim J. Robbins
2a573a0ebf Remove BUGS section that talked about missing multibyte character support.
We have support now that the regular expression routines do.
2004-07-12 10:17:02 +00:00
Dag-Erling Smørgrav
9b30d69710 Adjust the show_self code (the test got inadvertantly reversed a couple of
revisions ago)

Submitted by:	Alex Vasylenko <lxv@omut.org>
2004-07-12 08:22:32 +00:00
Alfred Perlstein
98c151d6d9 Cache a pointer to the old proc (as well as negative cache) to make
computing the io statistics over and over not as expensive.
This is a bit of a cop out, as I should just allocate a struct with
the computed values, but this will do for now.
2004-07-12 04:55:07 +00:00
Tim J. Robbins
f58b94cba4 Call setlocale() with category LC_ALL instead of LC_MESSAGES. We need
LC_CTYPE and LC_COLLATE to correctly interpret regular expressions
returned by nl_langinfo(YESEXPR), and it doesn't hurt to include the
rest.
2004-07-12 04:18:44 +00:00
Tim J. Robbins
338b72d96e Respect locale settings from the environment. 2004-07-12 02:48:40 +00:00
Stefan Farfeleder
70c3c978b9 Fix a few cases that relied on 'implicit int' (constraint violation in C99). 2004-07-11 17:37:33 +00:00
Tim J. Robbins
cd2890d712 Fix document year.
Noticed by:	simon
2004-07-11 15:04:16 +00:00
Tim J. Robbins
5c9fc89962 Add fairly standard ENVIRONMENT and DIAGNOSTICS sections. 2004-07-11 14:47:32 +00:00
Tim J. Robbins
0742d4ed1a Respect locale settings from the environment. 2004-07-11 14:44:23 +00:00
Tim J. Robbins
40ccfb3137 Add POSIX-style support for multibyte characters to od(1): the 'c'
conversion interprets input bytes as multibyte sequences and displays
printable characters in the area corresponding to their first byte.
The remaining bytes are shown as "**".
2004-07-11 01:11:12 +00:00
Tim J. Robbins
ee38feb205 Add a reference to od(1). 2004-07-10 13:11:00 +00:00
Alfred Perlstein
fde3a7d1e9 Decode the "wence" arg to lseek and linux_lseek. 2004-07-10 09:23:53 +00:00
Tim J. Robbins
9c8fd487a5 Initialize cs_invert to "false" in new csets. 2004-07-10 06:28:18 +00:00
Tim J. Robbins
9409835314 Report input errors instead of ignoring them. 2004-07-09 05:15:46 +00:00
Tim J. Robbins
e263a4b46e Update for multibyte character support: remove BUGS and change the
description of the -c option to refer to "values" instead of "byte values".
2004-07-09 02:33:46 +00:00
Tim J. Robbins
ca99cfdd14 Add support for multibyte characters. The challenge here was to use
data structures that scale better with large character sets, instead of
arrays indexed by character value:
- Sets of characters to delete/squeeze are stored in a new "cset" structure,
which is implemented as a splay tree of extents. This structure has the
ability to store character classes (ala wctype(3)), but this is not
currently fully utilized.
- Mappings between characters are stored in a new "cmap" structure, which
is also a splay tree.
- The parser no longer builds arrays containing all the characters in a
particular class; instead, next() determines them on-the-fly using
nextwctype(3).
2004-07-09 02:08:07 +00:00
Giorgos Keramidas
26b2243ae7 Build upon the nice work of Alfred and add sorting capabilities to
the -m "io" mode of top.

Approved by:	alfred
2004-07-08 16:45:55 +00:00
Maksim Yevmenkin
23d1e148af Make bluetooth compile on all platforms
Reviewed by:	imp, ru
2004-07-07 22:48:30 +00:00
Giorgos Keramidas
dca30d0f35 Correct a minor syntax mistake.
PR:		docs/67458
Submitted by:	Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after:	3 days
2004-07-07 21:27:44 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Ruslan Ermilov
b2a75fdfdf Fixed bad example.
Added reference to the getopts(1) shell builtin.
2004-07-07 17:39:16 +00:00
Ruslan Ermilov
51f98e585b Fix the NAME section making whatis(1) happy in particular. 2004-07-05 17:12:53 +00:00
Dag-Erling Smørgrav
e38035a512 Additional preemptive unsigned -> signed casts. 2004-07-05 14:55:58 +00:00
Dag-Erling Smørgrav
f92a11552e ki_pctcpu is unsigned, so we cast to long before subtracting. 2004-07-05 14:52:06 +00:00
Dag-Erling Smørgrav
4946a00b0b Unhealthy amount of manual code cleanup. Some long lines still remain. 2004-07-05 14:45:57 +00:00
Tim J. Robbins
8160bf78a3 Add support for multibyte characters. 2004-07-05 13:20:03 +00:00
Dag-Erling Smørgrav
ea9e70bf68 Apply consistent indentation. Long lines will be fixed in a separate
commit.
2004-07-05 13:12:16 +00:00
Dag-Erling Smørgrav
f6a10fea63 Protoize. 2004-07-05 13:03:35 +00:00
Dag-Erling Smørgrav
cd23263cdd Sort out the #include mess. In particular, do not #include "os.h", since
all it does is provide broken prototypes for standard library functions.
2004-07-05 12:58:47 +00:00
Dag-Erling Smørgrav
1ce57ca079 Mechanical whitespace cleanup. 2004-07-05 12:51:35 +00:00
Dag-Erling Smørgrav
d62a717dae My previous commit fixed uid filtering, but broke io mode. Unravel the
process filtering logic to prevent this from happening again.
2004-07-05 12:48:17 +00:00
Dag-Erling Smørgrav
a578eed9af Fix selecting processes by uid, which was broken in the previous commit. 2004-07-05 12:22:50 +00:00
Dag-Erling Smørgrav
c8488e24e7 Truncate long file names in stat_display(), as was originally intended.
MFC after:	1 week
2004-07-05 11:21:50 +00:00
Ruslan Ermilov
284fcee0c0 Fixed cross-references in SEE ALSO.
Emininated double space and hard sentence breaks.
2004-07-04 21:15:37 +00:00
Ruslan Ermilov
1c85060a13 Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
Tim Kientzle
0ddb95d12c Pass the pointy hat, please:
All of --help should go to stdout, not some to stdout and some to stderr.
2004-07-04 18:13:01 +00:00
Stefan Farfeleder
5908d366fb Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
Tim J. Robbins
2e94ae7e0e Fix a markup nit and a misplaced full stop in previous.
Noticed by:	ru
2004-07-03 07:07:11 +00:00
Tim J. Robbins
4f45d81178 Document missing multibyte character support in utilities specified
by POSIX.
2004-07-03 01:28:21 +00:00
Tim J. Robbins
5854077600 Re-add half of UCB copyright notice that went missing in 1.20. 2004-07-03 01:08:03 +00:00
Ruslan Ermilov
557b7fa148 Deal with double whitespace. 2004-07-03 00:24:45 +00:00
Tim J. Robbins
3fead394ea Add support for multibyte characters. 2004-07-02 23:43:05 +00:00
Tim J. Robbins
2ac2784f0c Document the -i option as being a non-standard extension. 2004-07-02 22:56:14 +00:00
Tim J. Robbins
e9fbd31a8c Add support for multibyte characters. 2004-07-02 22:48:29 +00:00
Ruslan Ermilov
8d26eeb865 Nit. 2004-07-02 22:25:40 +00:00
Ruslan Ermilov
759dce33f8 Fix after rev. 1.24 changes: bump document date, and remove -c
from SYNOPSIS.
2004-07-02 22:24:53 +00:00
Ruslan Ermilov
6a3e8b0adc Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
Ruslan Ermilov
839693c44f Deal with unsafe tab characters. 2004-07-02 19:55:26 +00:00
Ruslan Ermilov
11c798a4de mdoc(7): Fixed list types. 2004-07-02 19:37:24 +00:00
Ruslan Ermilov
d37ea99837 Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
Ruslan Ermilov
4b6c8c6498 Fixed spelling of the document date. 2004-07-02 18:00:03 +00:00
Oliver Eikemeier
406e58e038 manlint
Obtained from:	ru
2004-07-02 12:34:13 +00:00
Oliver Eikemeier
f695b5ceca New variable `.MAKEFILE_LIST', useful for tracing, debugging and dependency tracking.
Use
  make -V .MAKEFILE_LIST | tr \  \\n | awk '$0==".." {l--; next} {l++; printf "%*s%s\n", l, " ", $0}'
to print a tree of all included makefiles.

Approved by:	joerg
MFC after:	1 week
2004-07-02 12:30:28 +00:00
Alfred Perlstein
7fe9a86a5a Tell what percentage of the total IO a process is doing.
TODO: Show system totals.
2004-07-01 15:49:28 +00:00
Alfred Perlstein
db6bb7fc01 New feature, provide a display that shows the amount of IO processes
are doing.  Toggle this mode by hitting "m" or passing the command line
option "-m io" to top(1).  This allows one to identify disk bandwidth
hogs much easier.
2004-07-01 09:12:38 +00:00
Jens Schweikhardt
a6a6666238 Bump document date.
Submitted by:	ru
2004-06-30 19:56:16 +00:00
Alfred Perlstein
970636e94f style, remove register. 2004-06-30 04:19:23 +00:00
Brian Feldman
22ab6be3d4 Make vmstat -m work with -M/-N again. Note that making vmstat -z work
is much harder, and -m is grossly using unexported interfaces (that is,
the array of malloc zones/sizes does not have an exported type).
2004-06-30 01:34:26 +00:00
David Malone
1e925017b3 1) ANSIfy.
2) Use %p to print a pointer.
3) Use longs for fileids and ino to avoid comparing signed and unsigned.
4) Make the KVM_READ macro a little more cranky.
5) Set WARNS while I'm here.
2004-06-29 21:28:09 +00:00
David Malone
a1e5be4482 The type of some aout header types changed to uint_32, so now we need
to cast to long before printing. While I'm here, raise WARNS to 6.
2004-06-29 21:13:15 +00:00
Paul Saab
b6101dafe9 Add SACK statistics to netstat. 2004-06-29 20:05:45 +00:00
Jens Schweikhardt
5ac16458a1 Document recently acquired options.
PR:		67983
Submitted by:	Chip Norkus <wd@teleri.net>
MFC after:	2 weeks
2004-06-29 18:57:13 +00:00
Tim Kientzle
77d2ac4af5 Add yet another synonym for -n. 2004-06-28 14:02:22 +00:00
Dima Dorfman
5c3fd35c88 Fix spelling error in my own paragraph. 2004-06-28 11:18:47 +00:00
Tim J. Robbins
6863e5bed2 Document incorrect handling of multibyte characters in input files
and character string arguments.
2004-06-28 07:19:11 +00:00
Tim J. Robbins
ea8348d4e4 Describe the algorithm used by the -n option. 2004-06-28 06:20:28 +00:00
Tim J. Robbins
3b90bf797f Move some variable declarations to the top of the file. 2004-06-28 06:05:36 +00:00
Tim Kientzle
da9cbfaa5d Update -p:
* Don't change the umask; the library now ignores the umask if
    you set EXTRACT_PERM
  * Set the EXTRACT_ACL and EXTRACT_FFLAGS bits (used to be
    controlled by EXTRACT_PERM).
2004-06-27 23:29:44 +00:00
Tim Kientzle
e2fe7499b6 Warn about stripping leading '/' when creating archives. 2004-06-27 18:32:14 +00:00
Tim J. Robbins
f0b4606f3f Silence a warning about an unused argument. 2004-06-27 16:58:56 +00:00
Tim J. Robbins
8180b4573c Correct the description of the -f option: input and output fields are
separated by the field delimiter character, which is not necessarily
the tab character.
2004-06-27 16:55:25 +00:00
Tim J. Robbins
a5c4bafcd1 Handle multibyte characters when cutting out fields (-f and -d options.) 2004-06-27 16:42:33 +00:00
Tim J. Robbins
0dcb7b75a3 Update a comment that compared the parser with an obsolete draft of
IEEE Std 1003.2-1992. Most of the "extensions" here were actually
required by the final version of the standard.
2004-06-27 15:27:15 +00:00
Tim J. Robbins
f91650cf2d Add cross-reference to colrm(1). 2004-06-27 14:57:42 +00:00
Tim J. Robbins
364d0a915c Implement the -c option correctly in locales with multibyte characters
instead of treating it as a synonym for -b.
2004-06-27 14:55:07 +00:00
Jens Schweikhardt
e3625e9c22 Fix problems with non-8 space tabs. New options for function
declarations with the opening brace on the same line as the declaration
of arguments all spaces and no tabs (a feature which exists in GNU's
indent). Man page update to follow RSN.

PR:		bin/67983
Submitted by:	Chip Norkus <wd@teleri.net>
Style guidance and bug for bug compatibility by:	bde
MFC after:	2 weeks
2004-06-27 10:58:37 +00:00
Tim J. Robbins
d900c38411 Make the handling of invalid multibyte sequences more robust by using
mbrlen() instead of mblen().
2004-06-27 10:35:28 +00:00
Tim Kientzle
d3d1a208cb Augment the -T handling:
* Add --null option (sort #defines here)
 * Add process_lines function to util.c that reads newline-terminated
   or null-terminated lines (with self-sizing buffers, etc) and iteratively
   invokes a provided function.  Use this to dramatically simplify:
   -T handling for -c, --exclude-from-file, and --include-from-file.
 * Add -T handling to -x (via include_from_file)

Hopefully, this will fix the openoffice port and a couple of
others that rely on -T and --null.
2004-06-27 06:29:03 +00:00
Tim Kientzle
d24e5e453e Fix "@-" which has apparently been broken for some time. <sigh>
While I'm here, add in a lot more error-checking around append_archive.
2004-06-27 03:28:13 +00:00
Tim Kientzle
4049589b28 Don't abort immediately on directory change errors.
Instead, display a warning, clean up, and let main() return the error.
In particular, this means that chdir() problems won't leave broken
archives, though they will prompt an error exit value.
2004-06-27 01:08:54 +00:00
Tim Kientzle
f758d316c0 Document the -W convention for accessing long options.
Also correct an old error: there was no tar command in Sixth Edition.
2004-06-26 22:58:29 +00:00
Tim Kientzle
0674dded37 Rename C=dir to -C dir, which is what people expect.
This requires some non-trivial surgery to the options parsing.

While here, let people who only have getopt() access long options
through the -W longopt=value convention.
2004-06-26 22:49:51 +00:00
Tim J. Robbins
0f10c7bbea Add support for multibyte characters in input files and delimiter
strings (arguments to the -d option.) This involves backing out paste.c
rev. 1.13 until we have a version of fgetln() that operates on wide
character streams.
2004-06-25 01:48:43 +00:00
Tim J. Robbins
e90e39d92f Document the fact that uniq(1) does not recognize multibyte characters. 2004-06-24 16:29:28 +00:00
Tim J. Robbins
2c3d390701 Document the fact that join(1) does not recognize multibyte characters. 2004-06-24 16:24:11 +00:00
Tim J. Robbins
7ea30a9c00 Copy the warning about incorrect multibyte character handling from vis(3). 2004-06-24 16:08:02 +00:00
Tim J. Robbins
831056382b Document the fact that comm(1) does not recognize multibyte characters
in its input. Although doing so would require only trivial changes,
it would be incompatible with the ordering used by sort(1), which is the
primary source of comm's input.
2004-06-24 15:57:56 +00:00
Tim J. Robbins
19657ec3b8 Add support for multibyte characters and characters that take up more
than one column position.
2004-06-24 15:12:29 +00:00
Tim J. Robbins
a2641fe8d7 Add support for multibyte characters and for characters that take up
more than one column position.
2004-06-24 13:48:28 +00:00
Dag-Erling Smørgrav
adce61f9b4 The description of the -S option in the man page says we won't fail if the
remote size is unknown, but we do.  Resolve this in the man page's favor.

Requested by:   Andre Albsmeier <andre.albsmeier@siemens.com>
MFC after:	1 week
2004-06-24 13:43:57 +00:00
Tim J. Robbins
e545e3c55c Add support for multibyte characters and for characters that take up
more than one column position.
2004-06-24 13:42:26 +00:00
Tim J. Robbins
ddc1eded85 Prefix the names of members of _RuneLocale and its sub-structures
with ``__'' to avoid polluting the namespace. This doesn't change the
documented rune interface at all, but breaks applications that accessed
_RuneLocale directly.
2004-06-23 07:01:44 +00:00
Stefan Farfeleder
8eece1e6eb Retire support for gprof's -c option. All our currently supported
architectures only provide a dummy implementation.

Silence on:	current@
2004-06-20 11:05:25 +00:00
Poul-Henning Kamp
f3732fd15b Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
Max Laier
22ac3ead26 Commit userland part of pf version 3.5 from OpenBSD (OPENBSD_3_5_BASE). 2004-06-16 23:39:33 +00:00
Bruce M Simpson
2b286ced87 Make netstat(1) more closely follow documented behaviour. If a TCP
socket in LISTEN state happens to be bound to an interface, it will
show up in netstat(1) output even without the -a switch.

As the definition of "sockets used by server processes" is a
difficult one to qualify with regards to UDP, do not change the
output behaviour for UDP sockets.

PR:		bin/26359
2004-06-16 07:00:50 +00:00
Mark Murray
b90e600892 Oops. My last commit included a bug that would make "su -m" always
use /bin/sh. Fix this.
2004-06-15 20:23:02 +00:00
Bruce M Simpson
538a4c1f75 mdoc(7) police
Submitted by:	ru
2004-06-15 16:48:42 +00:00
Tim Kientzle
d18eca7d48 Update some internal comments about the --no-same-permissions option.
Thanks to: Kris Kennaway for doing some gtar research for me.
2004-06-15 07:16:44 +00:00
Tim Kientzle
4150562c7b As near as I can tell, --no-same-permissions is a no-op in
gtar, so that makes it easy to implement.

Required by: audio/timidity port
Thanks to: Kris Kennaway
2004-06-15 06:44:41 +00:00
Tim Kientzle
d2286340c9 Oops. bsdtar's old -X option didn't take an argument; the new
(gtar-compatible) one does require an argument.
2004-06-15 06:24:54 +00:00
Tim Kientzle
b7ec47bb9f Add gtar-compatible -X/--exclude-from 2004-06-15 05:55:41 +00:00
Tim Kientzle
b9d38fa25a Fix build. 2004-06-15 01:51:45 +00:00
Tim Kientzle
24220f2890 Rename -X to --one-file-system, as GNU tar uses -X for
something else.  I would really like a short option for
this, but all of the obvious ones conflict with something else.
2004-06-15 00:28:34 +00:00
Tim Kientzle
5a57a7f095 Clean up usage message(s):
* Usage goes to stderr, not stdout
  * Use correct argument markup
  * bsdtar --help  no longer exits with an error return code
  * ensure that the word "bsdtar" appears in the first
    line output from "bsdtar --help" (even if the program is
    invoked as "tar")

In particular, scripts can now test for the presence of bsdtar.
For example, in /bin/sh:

if (tar --help 2>&1 | grep bsdtar >/dev/null 2>&1) then \
          echo bsdtar; else echo not bsdtar; fi
2004-06-15 00:07:23 +00:00
Bruce M Simpson
9d61853d9f Change the default behaviour of talk(1) to use "localhost" as the
"machine name" in ntalkd(8) request packets, when the destination
and source are local.

This should make talk(1) use much more pleasant for those security-
conscious individuals who have chosen to bind talkd to "localhost".

Previous to this change, talk(1) would require that the hostname of
the machine, as retrieved by gethostname(3), resolved to a valid and
reachable IPv4 address, using gethostbyname(3).

This makes talk(1) dependent on a valid host entry for "localhost"
in /etc/hosts (or the Domain Name System).

PR:		bin/23178
Submitted by:	angui.sh admin (with cleanups)
2004-06-14 22:34:13 +00:00
Robert Watson
97b88fbf30 Teach fstat(1) about new location for socket state flags relating to
socket buffer state.

Submitted by:	rik
Reminded by:	le
2004-06-14 20:54:18 +00:00
Bruce M Simpson
7714734ac9 Add -b to usage.
Pointed out by:	ceri
Pointy hat to:	bms
2004-06-14 19:29:37 +00:00
Bruce M Simpson
fb6dad913a Add whois.abuse.net to whois(1).
Submitted by:	ceri (with cleanups)
2004-06-14 17:30:46 +00:00
Bruce M Simpson
939fca9bea Date bump.
Nudged by:	ru
Pointy hat:	bms
2004-06-14 14:49:44 +00:00
Bruce M Simpson
7138e3fe15 Add whois.iana.org to the whois(1) utility, under the -I option.
PR:		bin/48914
Submitted by:	James Raftery
2004-06-14 14:03:10 +00:00
Bruce M Simpson
63fb96902c Fix unterminated RCSID.
Submitted by:	Liam J. Foy
2004-06-13 18:06:49 +00:00
Mark Murray
953cb3ecc8 Paranoia, WARNS fixes and lint. 2004-06-13 11:21:06 +00:00
David Malone
a5d31d1631 A first stab at truss support for amd64, basically cogged from i386.
It seems to work in my limited tests.
2004-06-12 22:49:06 +00:00
Marcel Moolenaar
74b010ebf2 Document the STRIPBIN environment variable. This includes adding a
forward reference from where strip(1) is being mention (-s option).

PR: bin/28620
2004-06-11 17:25:37 +00:00
Poul-Henning Kamp
01b8b4dc80 COMPAT_SUNOS is gone. 2004-06-11 11:58:07 +00:00
Tim Kientzle
c066ba2f01 Oops: gtar's --dereference should be a synonym for bsdtar's -L, not -H.
Pointed out by: devel/nspr port
Thanks to: Kris Kennaway
2004-06-11 01:35:56 +00:00
Tim Kientzle
a85e1b56bb Set program exit value to 1 if there are any of various errors when
creating an archive.

Pointed out by: Failure to complain when building certain broken packages
(Thanks again to Kris Kennaway for finding this!)
2004-06-07 07:19:04 +00:00
Tim Kientzle
af2ef563dd Fix the symlink-detection code. Don't squawk if we're just replacing
an existing symlink (as might happen if you extract an archive twice).
Also, if we remove the offending link, then we've removed the problem
and can safely go forward with the extraction.

Pointed out by: print/adobe-cmaps port (whose distfile has
	duplicate entries for the same symlinks)
Thanks to: Kris Kennaway (for using ports as a testbed for bsdtar)
2004-06-07 04:10:43 +00:00
Tim Kientzle
a55bfb25e7 The --include='pattern' option is the natural counterpart to
--exclude='pattern'.

I should have added this a long time ago, since it's so useful for testing.
In particular, it allows me to select a few entries from a troublesome
archive so that I can easily focus my debugging efforts:
   bsdtar -czf new.tgz --include='*foo*' @old.tgz
2004-06-07 03:49:48 +00:00
Tim Kientzle
b5642237fc Ooops! Previous commit added an over-zealous error check.
It is, in fact, perfectly legal to not specify a compression when
writing an archive. <sigh>
2004-06-07 03:38:17 +00:00
Tim Kientzle
e1f5ccf6fb If -b is specified, then force full padding for the last block. 2004-06-07 03:19:57 +00:00
Tim Kientzle
2225b76daf Per style(9), don't use double spaces in expressions.
Pointed out by: njl, des.
2004-06-07 03:16:18 +00:00
Brian Feldman
cac4b14c12 Do not use KERN_PROC_PROC with kvm_getproc(3); instead, if only process
(and not thread) scope is to be displayed, use KERN_PROC_ALL and
accrue CPU% ourselves, as the kernel makes no attempt to do so.

Of course, this doesn't make most stats any less bogus when displaying
threaded processes, but at least the CPU time is added up and not just
always 0.00%.  There are still issues with SCHED_ULE in top(1) that
cause other processes to display 0.00% CPU when they in fact have used
more.
2004-06-06 19:59:06 +00:00
David Schultz
939e953ed0 s/latter/former/ 2004-06-05 09:35:44 +00:00
David Schultz
08cdb7cdaf - Document the %a, %A, and %F format specifiers.
- Document the way infinity and NaN are printed.
- Un-document the non-existent %w specifier.
2004-06-05 09:32:27 +00:00
David Schultz
03b2eaac40 Enable support for the %a, %A, and %F format specifiers. 2004-06-05 09:32:17 +00:00
Josef El-Rayes
dd17ea59d7 Add austrian calendar as install target.
Approved by:	le
Pointed out by:	stefanf
2004-06-04 11:30:52 +00:00
Tim Kientzle
5251608d94 Pointy hat: sticky bit 't' or 'T' is shown over IXOTH bit, not IXGRP. <sigh> 2004-06-03 23:43:40 +00:00
Brian Somers
7bbdbe1482 Plug a file descriptor leak.
When sed is asked to inline-edit files, it forgets to close the temporary
file and runs out of descriptors for long command lines (assuming you reset
kern.maxfilesperproc to something sane that's less than the number of files
passed to sed).
2004-06-03 22:33:50 +00:00
Tim Kientzle
755e3f9b2e Improve help handling:
* --help produces long help message on systems with getopt_long
   * -h with no other options also produces long help message
     (If a mode is specified, -h has its usual meaning.)
2004-06-02 21:01:27 +00:00
Max Khon
eb6fe0d938 Add missing dot and newline in a message.
Submitted by:	Igor Sysoev <is (at) rambler-co.ru>
MFC after:	3 days
2004-06-02 18:45:05 +00:00
Jean-Marc Zucconi
ce512ab4b9 Fill the 06/02 slot. 2004-06-02 12:24:34 +00:00
Poul-Henning Kamp
cd4dc87a34 typos.
Pointed out by:	ru
2004-06-02 07:31:11 +00:00
Tim Kientzle
e47b3d7a25 Both "foo/" and "foo" should match "foo/bar", so strip
trailing '/' characters on include patterns for extraction.

Pointed out by: games/quakeforge port (thanks to Kris!)
2004-06-02 07:23:54 +00:00
Poul-Henning Kamp
b933ee5464 Give du(1) a -m option to report in megabytes.
Submitted by:	Vasily Korytov <deskpot@msk.yell.ru>
PR:	66976
2004-06-02 07:09:34 +00:00
Seigo Tanimura
8dab9ee864 Add Alice Liddell, Christopher Robin Milne and Winnie-the-Pooh, who
inspired well-known stories for children.
2004-06-01 09:43:22 +00:00
Bosko Milekic
099a0e588c Bring in mbuma to replace mballoc.
mbuma is an Mbuf & Cluster allocator built on top of a number of
extensions to the UMA framework, all included herein.

Extensions to UMA worth noting:
  - Better layering between slab <-> zone caches; introduce
    Keg structure which splits off slab cache away from the
    zone structure and allows multiple zones to be stacked
    on top of a single Keg (single type of slab cache);
    perhaps we should look into defining a subset API on
    top of the Keg for special use by malloc(9),
    for example.
  - UMA_ZONE_REFCNT zones can now be added, and reference
    counters automagically allocated for them within the end
    of the associated slab structures.  uma_find_refcnt()
    does a kextract to fetch the slab struct reference from
    the underlying page, and lookup the corresponding refcnt.

mbuma things worth noting:
  - integrates mbuf & cluster allocations with extended UMA
    and provides caches for commonly-allocated items; defines
    several zones (two primary, one secondary) and two kegs.
  - change up certain code paths that always used to do:
    m_get() + m_clget() to instead just use m_getcl() and
    try to take advantage of the newly defined secondary
    Packet zone.
  - netstat(1) and systat(1) quickly hacked up to do basic
    stat reporting but additional stats work needs to be
    done once some other details within UMA have been taken
    care of and it becomes clearer to how stats will work
    within the modified framework.

From the user perspective, one implication is that the
NMBCLUSTERS compile-time option is no longer used.  The
maximum number of clusters is still capped off according
to maxusers, but it can be made unlimited by setting
the kern.ipc.nmbclusters boot-time tunable to zero.
Work should be done to write an appropriate sysctl
handler allowing dynamic tuning of kern.ipc.nmbclusters
at runtime.

Additional things worth noting/known issues (READ):
   - One report of 'ips' (ServeRAID) driver acting really
     slow in conjunction with mbuma.  Need more data.
     Latest report is that ips is equally sucking with
     and without mbuma.
   - Giant leak in NFS code sometimes occurs, can't
     reproduce but currently analyzing; brueffer is
     able to reproduce but THIS IS NOT an mbuma-specific
     problem and currently occurs even WITHOUT mbuma.
   - Issues in network locking: there is at least one
     code path in the rip code where one or more locks
     are acquired and we end up in m_prepend() with
     M_WAITOK, which causes WITNESS to whine from within
     UMA.  Current temporary solution: force all UMA
     allocations to be M_NOWAIT from within UMA for now
     to avoid deadlocks unless WITNESS is defined and we
     can determine with certainty that we're not holding
     any locks when we're M_WAITOK.
   - I've seen at least one weird socketbuffer empty-but-
     mbuf-still-attached panic.  I don't believe this
     to be related to mbuma but please keep your eyes
     open, turn on debugging, and capture crash dumps.

This change removes more code than it adds.

A paper is available detailing the change and considering
various performance issues, it was presented at BSDCan2004:
http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf
Please read the paper for Future Work and implementation
details, as well as credits.

Testing and Debugging:
    rwatson,
    brueffer,
    Ketrien I. Saihr-Kesenchedra,
    ...
Reviewed by: Lots of people (for different parts)
2004-05-31 21:46:06 +00:00
Tim Kientzle
e5572b4b7c Correction: -h should be a synonym for -L, not -H.
(as specified by Linux Standards Base, GNU tar, and 4.4BSD documentation)
2004-05-31 20:22:41 +00:00
David Malone
b0286e3d31 Use miligram rather than mg in the definition of carats.
PR:		61451
Submitted by:	Tony Monroe <tmonroe+freebsd@nog.net>
2004-05-30 16:09:12 +00:00
Tim Kientzle
de10ed4154 Permit (but ignore) -Z with -x or -t, now that libarchive
recognizes and decompresses .Z format.
2004-05-30 00:09:43 +00:00
Stefan Farfeleder
d86c537ac3 Include <sys/uio.h> for the complete type of struct iovec.
Approved by:	das (mentor)
2004-05-28 17:41:36 +00:00
Oliver Eikemeier
1c8329632e - introduce a new primary `-depth n', which tests whether
the depth of the current file relative to the starting
  point of the traversal is n. The usual +/- modifiers
  to the argument apply.

- while I'm here, fix -maxdepth in the case of a depth-first
  traversal

Print the top ten maintainers of python module ports
(works with p5-* too):

find /usr/ports -depth 2 \! -name 'py-*' -prune -o \
  -depth 3 -name Makefile -execdir make -VMAINTAINER \; \
  | sort | uniq -c | sort -nr | head

PR:		66667
Reviewed by:	ru, joerg
Approved by:	joerg
MFC after:	2 weeks
2004-05-28 17:17:15 +00:00
Tim Kientzle
f0e6a2b96d Minor corrections to error handling and user notifications:
* Move format/compression reporting to end of output, since
  we don't always know the input format until then.
* Set bsdtar exit value to 1 if any file could not be restored.
* Generate gtar-style warning when stripping leading '/' characters.
* Warn when removing symlinks.
2004-05-27 04:35:36 +00:00
Tim Kientzle
8df3c224c0 Provide framework for exiting with non-zero value on non-critical errors. 2004-05-27 04:30:59 +00:00
Pawel Jakub Dawidek
7d3940bb67 Use humanize_number(3) to format sizes into a human readable form. 2004-05-24 22:22:29 +00:00
Pawel Jakub Dawidek
8cab54e9a8 Mark du(1) as WARNS6 clean.
Tested on:	alpha, amd64, i386, ia64, sparc64
2004-05-24 21:31:30 +00:00
Stefan Farfeleder
8b061e144e Include <string.h> for prototypes of various string functions.
Approved by:	das (mentor)
2004-05-24 12:44:00 +00:00
Stefan Farfeleder
40905e9049 Include <netinet/in.h> for ntoh*() and hton*() prototypes.
Approved by:	das (mentor)
2004-05-24 11:59:17 +00:00
Josef El-Rayes
df38fbe11f Add localized calendar file for holidays in Austria.
Approved by:	le
2004-05-23 13:22:01 +00:00
Tim Kientzle
26eddc7f41 Add --no-same-owner as a synonym for -o.
Note that bsdtar's -o (which follows SUSv2) is not the same as GNU tar's -o.
In GNU tar, -o and --no-same-owner are not synonyms.

Pointed out by: Kris Kennaway (required by xpenguins port)
2004-05-22 17:49:54 +00:00
Robert Watson
7d8c7fe102 Add a "-r" flag to ktrdump(1) to print relative timestamps when used
with "-t" rather than absolute timestamps.  This allows the reader
to get a better sense of latency between events, such as time to
schedule an interrupt thread from time the interrupt occurred.  Assert
a copyright on ktrdump.c since I seem to be modifying it more than I
thought.
2004-05-22 08:26:10 +00:00
Robert Watson
7ddc893717 Add a quiet mode to ktrdump(1): if the "-q" flag is used, don't print
the pretty text header on top of the output.  Simplifies feeding the
results of tracing into a script for mechanical processing.
2004-05-21 21:24:58 +00:00
Robert Watson
dd6cf019f3 When the 'f' flag is passed to ktrdump(1), use 40 characters for the
"file and line" field consistently; previously, a 32-character field
length was used for the table header, which resulted in the header
not lining up with the table.
2004-05-21 21:15:48 +00:00
Tim Kientzle
c5ce4977e6 Add --dereference as a synonym for -H
Pointed out by: Kris Kennaway (unbreaks nspr port build)
2004-05-21 18:40:32 +00:00
Hiten Pandya
151e36fc65 Remove unneeded lseek(2) hack to position past the 2GB point,
use fseeko(3) instead.

This commit fixes breakage when `lastcomm matchstring` is run.

PR:          	bin/66765, bin/64568
Submitted by:	Dan Nelson <dnelson at allantgroup.com>
2004-05-20 19:25:27 +00:00
David Malone
838c00236b Fix a couple of warnings:
1) Missing include for declaration of time conversion functions.
2) Avoid a couple of alignment warnings on 64 bit arches by memcpying the
   things pointed to by caddrs into variables of the right type.

Bump WARNS to 6 while I'm here.
2004-05-19 21:34:52 +00:00
David Malone
f2ab33b6eb Add missing %s so that all of the usage message gets printed.
Bump WARNS to 6 while I'm here.
2004-05-19 21:06:36 +00:00
Lukas Ertl
be28a6af38 Fix integer overflow in the file size output when dealing with
large files (i.e. DVD images).

Reviewed by:  des@
2004-05-19 11:07:30 +00:00
Ruslan Ermilov
a12d0a1aee Added pgrep to the SYNOPSIS.
Fixed SYNOPSIS.
Fixed markup nits.
2004-05-19 10:46:56 +00:00
Ruslan Ermilov
fdc1ec368d Clean up language and markup. 2004-05-19 10:45:40 +00:00
Ruslan Ermilov
607e48e7b5 Language and markup polishing. 2004-05-19 10:44:24 +00:00
Ruslan Ermilov
79e447559c Bumped the document date. 2004-05-19 09:54:14 +00:00
Ruslan Ermilov
47a49bc2b5 Bumped the document date.
Fixed the grammar nit.
2004-05-19 09:53:41 +00:00
Ruslan Ermilov
c548db0353 Bumped document date.
Fixed markup nit.
2004-05-19 09:53:03 +00:00
Ruslan Ermilov
0d25a5d896 Bumped document date.
Fixed the grammar nit.
2004-05-19 09:52:40 +00:00
Ruslan Ermilov
af52678ebd Markup nits. 2004-05-19 09:51:58 +00:00
Ruslan Ermilov
032a157f2b Bumped document date.
Dealt with hard sentence breaks and whitespace at EOL.
2004-05-19 09:51:31 +00:00
Ruslan Ermilov
fc7589061d Fixed document date. 2004-05-19 09:49:54 +00:00
Ruslan Ermilov
54874bb6b9 Bumped document date.
Fixed a bunch of hyphen misspellings.
Fixed one warning.
2004-05-19 09:49:37 +00:00
Ruslan Ermilov
4bdd89ba98 Restore part of the word that got (accidentally) removed.
Removed whitespace at EOL.
2004-05-19 09:46:37 +00:00
Ruslan Ermilov
3c12a2e0d2 Markup nits. 2004-05-19 09:45:46 +00:00
Ruslan Ermilov
6f9c5e40fa Bumped document date.
Removed hard sentence break.
2004-05-19 09:44:31 +00:00
Tim Kientzle
04e2d02e20 Default is to restore timestamps, even when operating as root. <sigh> 2004-05-19 01:21:11 +00:00
Tim Kientzle
873e38290a Fix a segfault when looking up a non-existent group. 2004-05-18 23:40:25 +00:00
Ruslan Ermilov
aa588a66d1 Bump document date on behalf of the -e option.
Spell "ID" correctly.
2004-05-18 20:45:32 +00:00
Ruslan Ermilov
b388c4ac50 Bump document date on behalf of the -E option. 2004-05-18 20:42:36 +00:00
Ruslan Ermilov
f18a58b589 Added -u to the SYNOPSIS. 2004-05-18 20:40:37 +00:00
Ruslan Ermilov
f0085ed625 Bump document date on behalf of the -u option. 2004-05-18 20:38:43 +00:00
Ruslan Ermilov
c9a74f6a2b Bump document date on behalf of the -M option. 2004-05-18 20:36:54 +00:00
Peter Wemm
f7dd47a8d1 Build/install gprof on amd64 as well, after repocopying the MD bits.
Not that it has anything to process yet, but that comes next.
2004-05-18 18:05:19 +00:00
Tim Kientzle
656e70b49a Accept (but ignore) GNU tar's -B option. bsdtar never
needs it, but it does no harm for people to specify it.
2004-05-18 17:16:55 +00:00
Stefan Farfeleder
ec18ee18ad Don't depend on NULL's expansion being a pointer, cast it before it is passed
to variadic functions.

Approved by:	das (mentor)
2004-05-18 15:53:58 +00:00
Tim Kientzle
a25502627d Set errno to 0 before calling getpwuid/getgrgid, so that error
messages will be displayed only when there is, in fact, an error.
2004-05-17 18:29:12 +00:00
Tim Kientzle
9d77c5f29c Speed up safe_fprintf by copying to a temp buffer, then writing
blocks at a time, rather than using putc().
2004-05-17 07:35:52 +00:00
Tim Kientzle
088bdb251d Propagate struct bsdtar down into a lot more places.
Move global progname variable into struct bsdtar.
2004-05-17 05:44:53 +00:00
Tim Kientzle
7283cd6959 Refactor name caching to use a common piece of code for uname_cache and
gname_cache.  Cache negative lookups to dramatically improve performance
building archives containing nonexistent uid/gid.
2004-05-17 05:02:39 +00:00
Tim Kientzle
4a07f42b98 Make symlink protection a bit more useful:
* Remove terminal symlinks so they can be replaced.
  * If -U, remove intermediate symlinks as well
  * Otherwise, refuse the extraction
2004-05-17 03:33:06 +00:00
Tim Kientzle
dcec34670d Update manpage to track new security features. 2004-05-17 03:19:31 +00:00
Stefan Farfeleder
a752604477 Remove spurious semicolons. Outside of functions they are actually errors but
GCC doesn't warn about them without -pedantic.

Approved by:	das (mentor)
PR:		56649
Reviewed by:	md5
2004-05-16 22:08:17 +00:00
Oliver Eikemeier
9c61111db8 snafu, exchanged the descriptions of -maxdepth and -mindepth.
Noticed by:	ru
2004-05-16 10:35:14 +00:00
Olivier Houchard
bb52bd2f06 Insert "arm" between "amd64" and "powerpc"
Requested by:	bde
2004-05-14 23:08:52 +00:00
Bruce Evans
6ff9ebfdc9 Fixed total disorder of MD includes.
Disorder buffer overflowed by:	arm commit
2004-05-14 21:05:35 +00:00
Joerg Wunsch
482b206bf5 Bump the .Dd value.
Update xrefs to more contemporary items.

Requested by:	ru, green
MFC after:	1 week
2004-05-14 19:29:39 +00:00
Joerg Wunsch
be06d37c18 When I wrote this man page more than 5 years ago, I simply didn't
understand the true symmetric nature of Enigma, so my description of
``automatically detects that the input is encrypted'' was simply
wrong.  Replace that by a more accurate description of why feeding the
ciphertext again into the engine will decrypt it.

MFC after:	1 week
2004-05-14 18:46:16 +00:00
Olivier Houchard
63b689127c Use four spaces instead of tab for second level indentation.
Requested by:	ru
2004-05-14 14:50:55 +00:00
Olivier Houchard
bc67fdeab2 Define PTRDIFF_IS_LONG and SIZEOF_IS_ULONG for arm. 2004-05-14 13:44:36 +00:00
Olivier Houchard
361af5b54b Some arm bits for gprof. 2004-05-14 13:44:04 +00:00