Commit Graph

8494 Commits

Author SHA1 Message Date
Giorgos Keramidas
42aff2e46d Remove duplicate ' 2' manpage section number.
Submitted by:	 Rui Paulo
MFC after:	 3 days
2007-05-21 20:33:51 +00:00
Tim Kientzle
3b0e49fad9 Mention the formats supported by bsdtar; include an
example that shows how to work with an ISO 9660 image.
2007-05-20 18:23:39 +00:00
Juli Mallett
26cfaf71bb Fix typo. 2007-05-17 00:19:56 +00:00
Juli Mallett
36c5e18daa o) Correct for missing whitespace.
o) We don't need to check if ifp == stdin to give the filename, since we already
   know that ifn will be "stdin" if it is.
2007-05-17 00:18:01 +00:00
Juli Mallett
2fdb65fd82 Fix confusing misindentation of a closing-brace. (It goes with the switch, not
with the while.)
2007-05-17 00:11:58 +00:00
Diomidis Spinellis
e91843d40a Backout revisions 1.16-1.14.
Backwards compatibility with the new acct(5) format will be
implemented through the explicit versioning of acct records,
not through an export/import procedure.
2007-05-14 09:05:22 +00:00
Andre Oppermann
612d21296c 'netstat -A -p tcp' doesn't print the Socket but the Tcpcb pointer in the
first column.
2007-05-13 22:32:32 +00:00
Pav Lucistnik
67a09fffe1 Replace rev. 1.9 with patch from OpenBSD.
Submitted by:	Ray Lai <ray@cyth.net>
Obtained from:	http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/tip/acu.c.diff?r1=1.13&r2=1.14
MFC after:	1 week
2007-05-12 23:29:33 +00:00
Pav Lucistnik
bae1345b9d Fix crash when using 'du' capability: NULL return of strpbrk was not handled
PR:		bin/108368
Reported by:	Ivo Hazmuk <ivo@vutbr.cz>
Submitted by:	rdivacky
MFC after:	2 weeks
2007-05-12 13:36:13 +00:00
Pav Lucistnik
0e2dd92370 Expand documentation of -f option
PR:		docs/66265
Submitted by:	Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after:	1 week
2007-05-12 12:23:40 +00:00
Tim Kientzle
6a955a7506 Set the program return value non-zero if we enounter
an error while skipping the body of an entry during
"tar -t" processing.

Thanks to: Spencer Minear
PR: misc/112521
2007-05-08 15:22:21 +00:00
David Malone
61d8eede29 Cast to intmax_t to print tv_sec in struct timeval.
Avoid shadowing a global variable with a function argument.
Set WARNS to 6.
2007-05-07 12:23:23 +00:00
David Malone
2ffe6bbf0f Use [u]intmax_t to printf unknown integer types.
Make timeprt always allocate memory, to make things a little simpler.
Remove an unused variable.
2007-05-07 12:10:06 +00:00
David Malone
6f62d86388 Make logmsg take const char * arguments.
Set WARNS to 6.
2007-05-07 11:28:01 +00:00
David Malone
e4cedda807 ANSIfy function definitions.
Move some extern declarations to a header file.
Remove an unneeded extern declaration for optarg.
2007-05-07 11:18:30 +00:00
David Malone
bc7e443092 Fix some warnings by making things const, adding missing headers,
removing some unused variables and making a variable unsigned.

MFC after:	3 weeks
2007-05-07 11:01:36 +00:00
David Malone
61f31ed6cf Initialise variable size so that reading stdin works deterministically.
Add missing include.

Default to WARNS=6.
2007-05-03 13:57:19 +00:00
Benjamin Close
d7a1f74bec Add myself
Approved by:	mlaier (mentor)
2007-05-03 11:34:36 +00:00
Colin Percival
c85ac10468 If lstat(2) fails, have bsdtar return a non-zero exit code if the
failed path is one which was specified on the command line.

This is a compromise between the situation prior to revision 1.57
(where a race between tar(1) and rm(1) could cause tar(1) to
spuriously report an error) and the situation after revision 1.57
(where "tar -c /no/such/path" prints a warning but returns with
an exit code of zero).

Inspired by:	rafan
MFC after:	1 week
2007-05-03 04:33:11 +00:00
Andrey A. Chernov
ba174a5e38 Back out all POSIXified *env() changes.
Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.

Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.
2007-05-01 16:02:44 +00:00
Andrey A. Chernov
35e4f24d23 limits calls setenv("name=value", "value", 1); which violates POSIX:
"The setenv( ) function shall fail if:
[EINVAL] The name argument is a null pointer, points to an empty string,
or points to a string containing an '=' character."
The fix (like all others in this subject) is backward-compatible.
2007-04-30 20:10:10 +00:00
Andrey A. Chernov
ed4bcacfde env calls setenv("name=value", "value", 1); which violates POSIX:
"The setenv( ) function shall fail if:
[EINVAL] The name argument is a null pointer, points to an empty string,
or points to a string containing an '=' character."
The fix (like all others in this subject) is backward-compatible.
2007-04-30 19:25:00 +00:00
Andrey A. Chernov
8673ed1565 Slightly tune previous fix: free memory if !export 2007-04-30 12:54:02 +00:00
Andrey A. Chernov
9e461e53cc Prepare for upcoming POSIXed putenv() rewrite:
don't free memory after putenv()
2007-04-30 12:51:02 +00:00
Andrey A. Chernov
2efaac818f Prepare for upcoming POSIXed putenv() rewrite:
don't free memory after putenv()
2007-04-30 12:44:04 +00:00
Maxim Konovalov
4063583a62 o Fill the list of icmp types; make its size depend on ICMP_MAXTYPE.
o Print "unknown ICMP" instead of "(null)" if we don't have a description         for a icmp type.

Based on code

Submitted by:	Christoph Weber-Fahr
PR:		misc/112126
MFC after:	2 weeks
2007-04-30 12:27:04 +00:00
Andrey A. Chernov
97e49dd4b5 Eliminate error with -W* strict flags and make putenv() calls conforming to
standard and portable in the same way as f.e. gcc internal portable code does.
2007-04-30 05:14:29 +00:00
David Malone
3e6dcadf52 Change the date for Daylight Savings in the US.
PR:		111102
Submitted by:	Sean Farley <sean-freebsd@farley.org>
Obtained from:	OpenBSD
2007-04-29 20:03:06 +00:00
Brian Somers
2e7b6bff38 Add some more examples. It always takes me a long time to find the S
modifier (-t is ignored without it).

MFC after:	1 week
2007-04-27 18:23:32 +00:00
Marcelo Araujo
e27c581538 - Added entry for Marcelo S. Araujo.
Approved by:	itetcu (comentor)
2007-04-27 18:17:41 +00:00
Tong LIU
e5b725c271 add myself.
Approved by:	delphij (mentor)
2007-04-25 11:59:10 +00:00
Yaroslav Tykhiy
f3aad16b88 Insert explicit space between the output fields to prevent them
from running together when a field overflows.

MFC after:	1 week
2007-04-23 11:43:22 +00:00
Yaroslav Tykhiy
70b36fc0c8 Don't forget to bump document date after changing the content. 2007-04-21 01:22:51 +00:00
Yaroslav Tykhiy
f6703c9c0a Change the semantics of -i (in-place editing) so that it treats
each file independently from other files.  The new semantics are
desired in the most of practical cases, e.g.: delete lines 5-9
from each file.

Keep the previous semantics of -i under a new option, -I, which
uses a single continuous address space covering all files to edit
in-place -- they are too cool to just drop them.

Add regression tests for -i and -I.

Approved by:	dds
Compared with:	GNU sed
Discussed on:	-hackers
MFC after:	2 weeks
2007-04-21 01:21:36 +00:00
Max Khon
45352bae07 Improve logging when -dm is specified: if the node is considered
out-of-date print not only "modified before source" message
but also the path of youngest source.
2007-04-20 06:33:25 +00:00
Max Khon
bc5748e31f When remaking makefiles check that mtime has actually changed.
This fixes infinite restart in the following case:

Makefile: foo

foo: bar
	do-something

Unlike GNU make, BSD make considers "Makefile" node as remade even
if "foo" is up-to-date and was not actually rebuilt.
GNU make does not consider nodes without commands as remade if child nodes
were not actually rebuilt.

Most probably, more proper fix would be to bring BSD make behaviour in-line
with GNU make but this would be more intrusive change.
2007-04-20 06:25:45 +00:00
Diomidis Spinellis
b7dd80b843 Change the export option from -w (write) to -X.
While implementing import it became apparent that write as a mnemonic
is ambiguous and confusing.

MFC after:	8 days
2007-04-18 16:43:21 +00:00
Diomidis Spinellis
3f863a9ae4 Complain on write errors.
Use correct type for write_text.

MFC after:	8 days
2007-04-18 09:39:47 +00:00
Diomidis Spinellis
947ef7f187 Add export capability through the new -w flag.
Discussed in: -arch
MFC after:	8 days
2007-04-18 08:55:54 +00:00
Tim Kientzle
8d36aa79ef Ignore trailing '/' when comparing pathnames, so that
"tar -u" works again.  Otherwise, "tar -u" wants to
treat every dir as new and re-adds it.
2007-04-18 04:36:11 +00:00
Tim Kientzle
007c50304b When testing basic functionality, strip trailing '/' from
dir names, so they match the names generated by 'find'.
2007-04-18 04:35:17 +00:00
Rong-En Fan
6000ced11b - Add a new 'j' switch and runtime option to toggle display jail id for
each process.
- While I'm here, keep help message sorted by keys

PR:		98489, 98975
Submitted by:	clsung
Approved by:	delphij (mentor)
MFC after:	2 weeks
2007-04-17 03:12:39 +00:00
Colin Percival
6fc0ea8474 In libarchive: Downgrade ARCHIVE_FATAL and ARCHIVE_FAILED errors which
occur on the write side of extracting a file to ARCHIVE_WARN errors
when returning them from archive_read_extract.

In bsdtar: Use the return code from archive_read_data_into_fd and
archive_read_extract to determine whether we should continue trying to
extract an archive after one of the entries fails.

This commit makes extracting a truncated tarball complain once about
the archive being truncated, instead of complaining twice (once when
trying to extract an entry, and once when trying to seek to the next
entry).

Discussed with:	kientzle
2007-04-16 04:04:50 +00:00
Andrey A. Chernov
b79aefd3e9 Use proper type cast for ctype macro 2007-04-14 14:32:48 +00:00
Stanislav Sedov
faac60c8fc - Add new 'a' switch and runtime option that allows 'top' to display process
titles extracted from argv vector instead of the real executable names.
  This is useful when you want to watch applications that set their status
  information via setproctitle(3).

Approved by:	alfred
MFC after:	2 weeks
2007-04-14 10:16:52 +00:00
Tim Kientzle
94a2a4ad3d Portability.
Thanks to: Martin Koeppe for testing on Interix
2007-04-13 16:08:23 +00:00
Ruslan Ermilov
edd57853f5 In .error and .warning, prefer command-line variables
to globals, as per documentation.

Nudged by:	Jeremie Le Hen
2007-04-12 18:14:00 +00:00
Ruslan Ermilov
1e5f1c29ea Restore the ".Sh BUGS" line that was accidentally removed
in the previous commit.
2007-04-12 08:22:49 +00:00
Tim Kientzle
f6df491097 Make it easier to support more platforms.
Thanks to: Joerg Sonnenberger for pointing out the need and the technique.
2007-04-12 04:45:32 +00:00
Dag-Erling Smørgrav
ae16dc8817 Remove irrelevant comment about T/TCP in BUGS.
Spotted by:	ru@
2007-04-11 20:32:59 +00:00