Commit Graph

9504 Commits

Author SHA1 Message Date
Jilles Tjoelker
8f3bd46654 pathchk(1): Fix the example so it allows arbitrary pathnames.
Spaces and various other characters in pathnames are not passed through
literally by xargs in its default mode. Instead, use find . -exec ... {} +

Although the -- argument is not strictly required here, add it anyway to
avoid surprises when modifying the code to find -f -somedir ...

MFC after:	1 week
2010-05-01 22:10:45 +00:00
Jilles Tjoelker
da21952559 pathchk: Add the new POSIX -P option.
This option checks for empty pathnames and components starting with '-'.
Our -p option also checks for the latter, which remains the case.

MFC after:	1 week
2010-05-01 22:00:28 +00:00
Ed Schouten
e1e9ba3370 Remove WNOHANG flag from wait3().
Because script(1) now reliably terminates when the TTY is closed, it may
be the case that the call to wait3() occurs just before the child
process exits. This causes error codes to be ignored.

Just change script(1) to use waitpid() instead of wait3(). This makes it
more portable and prevents the need for a loop, since waitpid() only
returns a specified process.

PR:		bin/146189
Tested by:	amdmi3@, older version
MFC after:	2 weeks
2010-04-30 22:33:49 +00:00
Xin LI
637bfa488b Use _exit(2) system call directly instead of using exit(3) in signal
handler, as the latter is not guaranteed to be signal safe, and we
do not really care about flushing the stream during SIGINT.

Suggested by:	Maxim Konovalov <maxim.konovalov gmail com>
MFC after:	13 days
2010-04-27 17:57:04 +00:00
Xin LI
1edd4fcd23 Language improvements to make the BUGS section easier to read.
Reviewed by:	Alexander Best <alexbestms wwu de>
MFC after:	13 days
2010-04-27 17:50:43 +00:00
Xin LI
18333f544e Add a signal handler for SIGINT which removes output file when necessary.
While I'm there, move unlink_input() slightly down to after closing the
output file, in uncompression path.

MFC after:	2 weeks
2010-04-26 20:05:48 +00:00
Jilles Tjoelker
36f8c7ebef Make hash, type and ulimit available via execve().
These are specified by POSIX but are not special builtins, and therefore
need to be available via execve() and utilities like time, nohup, xargs.
(Note that hash was moved from the XSI option to the base in the 2008
standard.)

Like most of the POSIX "regular builtin commands", these need to be executed
in a shell environment for full functionality, although they may still be of
some use outside one.

Unlike the POSIX special and regular builtin commands, POSIX does not
require these to be found before a PATH search, although that could be an
oversight.

Like some of the utilities already provided by usr.bin/alias, these may lead
to confusing results when invoked from csh(1).
2010-04-25 17:38:53 +00:00
Jilles Tjoelker
24d9be57ae stat: Allow -f %Sf to display the file flags symbolically.
I have changed the patch slightly to show '-' if there are no flags just
like ls -ldo does.

PR:		124349
Submitted by:	Ighighi
MFC after:	1 week
2010-04-24 13:53:12 +00:00
Andriy Gapon
c27b391b3f indent(1): don't treat bare '_t' as a type name when -ta is used
It seems that identifier "_t" is sometimes used as a variable name,
even in our tree.  Not that I endorse that, but still it's better
to require at least one character before _t suffix to consider
an identifier to be a type name.

Reported by:	Alex Vasylenko <lxv@omut.org>
MFC after:	1 week
2010-04-15 21:41:07 +00:00
Ulrich Spörlein
aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
Ulrich Spörlein
c5ff2cdb99 Add and expand $FreeBSD$ keyword to allow committing to this file. 2010-04-14 19:06:39 +00:00
Edwin Groothuis
22f456b409 Allerheilingen -> Allerheiligen
Submitted by:	Ronald Klop <ronald at realworks dot nl>
2010-04-13 20:50:59 +00:00
Tim Kientzle
37ba5a9b14 If a file is specifically both included and excluded, then:
* It is not extracted (because it is excluded)
 * If it's not present in the archive, then an error is
   reported (because the file was requested and not found)
 * If it is present in the archive, no error is reported.
Previously, this would always report an error because the
exclusion prevented the entry from matching the inclusion.

Also, tar is now more reluctant to report unmatched inclusions.
Previously, "tar x file1 'file*'" against an archive that contained a
single entry "file1" would match file1 and then report an error for
the second pattern because it wasn't matched.  It now considers both
inclusions to be matched and reports no error.
2010-04-11 18:44:42 +00:00
Tim Kientzle
43c3bf3cc6 Diff reduction against bsdtar 2.8.3 2010-04-11 16:28:10 +00:00
Tim Kientzle
7620c81bc7 Diff reduction against bsdtar 2.8.3 2010-04-11 16:27:38 +00:00
Tim Kientzle
086b6e8e54 Fix -X. 2010-04-11 01:36:10 +00:00
Tim Kientzle
f5f9acdd61 Consistently specify O_BINARY when opening files. 2010-04-11 01:32:30 +00:00
Tim Kientzle
408af9ef60 Remove an unnecessary include and conditionalize some code. 2010-04-11 01:31:50 +00:00
Tim Kientzle
5ff156d14e Correct the markup for the -s option,
document the iso9660:rockridge and mtree:indent options
2010-04-11 01:30:15 +00:00
Roman Divacky
7f18fc27cd Rename the ALIGN macro to LINT_ALIGN so it does not clash with machine/param.h
Bump the alignment to 16bytes because lint1 memory allocator is used for
objects that require 16bytes alignment on amd64 (ie. val_t). This makes
lint1 work when compiled with compiler(s) that use SSE for memcpy on amd64.
(e.g. clang).

Approved by:	ed (mentor)
2010-04-09 15:21:11 +00:00
Xin LI
feeb03b2c8 Diff reduction against NetBSD and add myself to AUTHORS section of the
manual page as I wrote the unpack functionality.  No actual executable
code change verified with md5(1).
2010-04-07 22:54:53 +00:00
Warner Losh
83d90bb1dd Remove yet another vestage of alpha support. 2010-04-06 02:48:59 +00:00
Ed Schouten
93ce19df3a Change how getent utmpx works.
- Always require active, log or lastlogin to be provided.
- Allow the user to provide custom filenames.
2010-04-02 11:05:59 +00:00
Bernhard Froehlich
4e50c2a20d - Add my birthday to the calendar
Approved by:	miwi (mentor), beat (co-mentor)
2010-04-01 12:26:29 +00:00
Warner Losh
701d73b65c Make -r mean exactly the same thing as -E for increased compatibility
with GNU sed.

MFC after:	7 days
2010-03-31 17:40:13 +00:00
Andriy Gapon
c58c7416c7 indent(1): add a new option, -ta, to treat all *_t identifiers as types
Submitted by:	Hans Petter Selasky
Discussed with:	bde
MFC after:	10 days
2010-03-31 17:05:30 +00:00
Andriy Gapon
6953f51a9d indent(1): correctly handle case/label at the very start of a function
Obtained from:	NetBSD (rev. 1.11 of indent.c)
MFC after:	1 week
2010-03-31 16:55:47 +00:00
Edwin Groothuis
7cff1bc329 For where possible, make the dates of the Tasmanian holidays properly
variable. The leftover ones are the Thursday before the Fourth
Saturday of October (Oct/SatFourth-2) which is not possible yet.
2010-03-30 21:11:16 +00:00
Maxim Konovalov
09bbda2122 o Make sockstat -6 output more readable for long ipv6
addresses (most of them apart from ::1): put a whitespace
between local and remote address:port pairs.

PR:		bin/145194
Submitted by:	Fedor Dikarev
MFC after:	2 weeks
2010-03-30 09:58:21 +00:00
Edwin Groothuis
bb06482c77 On request of joel@:
- Remove the 3rd clause of the UC Berkeley copyrighted files.
- For the files added copyrighted by me, move the "All rights
  reserved" to the next line.
2010-03-30 06:42:01 +00:00
Edwin Groothuis
418d2c7643 Update the Australian calendar WRT DST.
Layout changes.
2010-03-29 21:17:03 +00:00
Andriy Gapon
34a78aafcb calendar.freebsd: add my entry
MFC after:	4 days
2010-03-29 20:04:01 +00:00
Edward Tomasz Napierala
ea609672f8 Add myself.
MFC after:	2 weeks
2010-03-29 19:52:36 +00:00
Dag-Erling Smørgrav
9d5d3712db size_t is not equivalent to int on 64-bit platforms.
Pointy hat to:	edwin@
2010-03-29 13:20:52 +00:00
Edwin Groothuis
7ab07ec89c Use new syntax for the dutch calendar: Use local month names instead
of english ones.
2010-03-29 07:09:27 +00:00
Edwin Groothuis
0b0b030bc6 Bump WARNS to 7 2010-03-29 07:08:47 +00:00
Edwin Groothuis
2b84020d5c Long awaited update to the calendar system:
- Repeating events which span multiple years (because of -A, -B or
  just the three days before the end of the year).

- Support for lunar events (full moon, new moon) and solar events
  (equinox and solstice, chinese new year). Because of this, the
  options -U (UTC offset) and -l (longitude) are available to
  compensate if reality doesn't match the calculated values.

MFC after:	1 month
2010-03-29 06:49:20 +00:00
Ed Schouten
99742a231f Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
2010-03-28 13:16:08 +00:00
Xin LI
36e60cda45 Remove GNU cpio after fix of CVE-2010-0624.
Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.

Blessed by:	kientzle
With hat:	secteam
MFC after:	3 days
2010-03-26 17:02:32 +00:00
Xin LI
ae91fee256 Enable mmap for minigzip(1). 2010-03-22 21:19:17 +00:00
Edwin Groothuis
531a1a4b2c Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage.
Update regression test for the new parameters.
2010-03-21 21:33:21 +00:00
Gavin Atkinson
b01647a864 Fix command example, presumed leftovers of old markup.
MFC after:	1 week
2010-03-20 16:34:51 +00:00
Pawel Jakub Dawidek
d740b7c7e8 Better way to find out available file system types is to use lsvfs(1).
Using 'sysctl vfs' is not only ugly, but is also not reliable - not all
file system types create entries in vfs sysctl tree.

Reviewed by:	imp
MFC after:	1 week
2010-03-16 23:19:55 +00:00
Tony Finch
3548be4a24 Update to upstream version 2.3
Add -V (display version) and -S (list controlling symbols per #if
with nesting information) options, and improve unifdefall debug output.
Done committing 0 revisions to SVN

Obtained from: http://dotat.at/prog/unifdef
2010-03-12 17:55:29 +00:00
Gleb Smirnoff
c1b90938b1 Now fix functionality of 'netstat -f netgraph' that hasn't worked
starting from netgraph import in 1999.

netstat(8) used pointer to node as node address, oops. That didn't
work, we need the node ID in brackets to successfully address a node.
We can't look into ng_node, due to inability to include netgraph/netgraph.h
in userland code. So let the node make a hint for a userland, storing
the node ID in its private data.

MFC after:	2 weeks
2010-03-12 15:04:59 +00:00
Ulrich Spörlein
63d46d1d5e Fix several typos in macros or macro misusage.
Found by:	make manlint
Reviewed by:	ru
Approved by:	philip (mentor)
2010-03-12 10:01:06 +00:00
Edwin Groothuis
4af997a87f - With the introduction of -A, -B and -3, not all combinations of
arguments makes sense anymore. For example, what would a combination
  of -3 (show three months) and -y (show the whole year) do?
  We will abort on these cases.
- Move the debug option -d to -H (from highlight), while -d is now
  used for setting the day of "today" so that -y and friends can
  be tested.
2010-03-12 06:57:53 +00:00
Joerg Wunsch
14f24fb3a4 The number after the command is *not* optional.
MFC after:	1 day
2010-03-11 12:18:52 +00:00
Ed Schouten
e8b9127d7e Improve the change made in the previous commit.
doshell() never returns, so there is no need to see whether we are the
parent process.
2010-03-11 11:28:29 +00:00
Ed Schouten
8d5e4a1416 Make script(1) a little less broken.
Close the file descriptor to the TTY. There is no reason why the parent
process should keep track of the descriptor. This ensures that the
application inside properly drains the TTY during exit(2).

Reported by:	alfred
MFC after:	2 weeks
2010-03-11 11:09:58 +00:00