Commit Graph

9871 Commits

Author SHA1 Message Date
Maxim Konovalov
50ca181e5d o Fix -u flag description: it takes a username as an argument.
PR:		docs/153416
Submitted by:	Eitan Adler
MFC after:	1 week
2010-12-25 17:35:30 +00:00
Sergey A. Osokin
f6db469642 Fix typo (Pashka -> Paskha). 2010-12-25 11:52:04 +00:00
Ed Schouten
2d491fabff Slightly improve output of lock(1).
- Remove the /dev/ portion of the TTY name.
- In case we use lock -p, print the username that was used to obtain the
  password hash.
2010-12-25 11:24:27 +00:00
Jilles Tjoelker
6a6760db7f sh: Make warnings in the printf builtin non-fatal, like in the program.
The #define for warnx now behaves much like the libc function (except that
it uses sh command name and output).

Also, it now uses C99 __VA_ARGS__ so there is no need for three different
macros for 0, 1 or 2 parameters.
2010-12-20 23:06:57 +00:00
Philippe Charnier
0fe7f010e4 Add __unused 2010-12-20 08:47:43 +00:00
Philippe Charnier
6d8484b0d0 Add __unused. Ansi prototypes. 2010-12-19 16:25:23 +00:00
Philippe Charnier
640e31deaf Add __unused. Ansi prototypes. 2010-12-19 14:18:07 +00:00
Ulf Lilleengen
de956290ba - Signal that data should not be modified. 2010-12-18 20:43:18 +00:00
Doug Barton
34aba78b16 Bring in the relevant changes from NetBSD's 1.31:
"Use strlcpy, not strncpy, when the desired semantics are strlcpy's
rather than strncpy's."

Note: NetBSD's 1.32 is their adoption of our r216206

Obtained from:	dholland@NetBSD.org
2010-12-18 00:30:52 +00:00
Xin LI
de46de4dd1 Revert r216423 per request from Jilles.
The new behavior prevents us from being able to bail out explicitly
on unknown options that we have not implemented.  BASH for instance
have introduced a '-v' for printf(1) builtin and it seems to be bad
to pretend that we supported it and have a script break silently.
2010-12-14 20:35:08 +00:00
Xin LI
5eccc0009b When printf is being used as a sh(1) builtin, it can not call
exit(3) as pointed out by jilles@ so revert to using return(),
also change the return value back to 1 as requested by bde@.

This is logically a revert of revision 216422.
2010-12-14 18:23:15 +00:00
Gordon Tetlow
82db8a5e35 Move sysctl invocation to using a variable that's fully pathed.
This prevents errors for users that don't have /sbin in their PATH.

Submitted by:	Max Boyarov
Approved by:	mentor (wes@ implicit)
2010-12-14 06:07:18 +00:00
Xin LI
69be0c5ea2 We work on ctype's and not only on numbers so set LC_ALL instead of
LC_NUMERIC.

PR:		bin/152934
Submitted by:	Pedro F. Giffuni <giffunip tutopia.com>
Obtained from:	Illumos
2010-12-14 01:28:33 +00:00
Xin LI
02a4a3f56c IEEE Std 1003.1-2008, Section 1.4, Utility Description Defaults says
that when the options section is listed as "None", utility shall
recognize "--" as a first argument to be discarded.

This implementation is largely based on OpenBSD implementation but
we do slightly differently:

a) We skip argv[0] as the first step;
b) We test whether the next argument is "--" and ignore it.

With this change one will get:

%printf
usage: printf format [arguments ...]
%printf -v
-v%printf -- -v
-v%
%printf --
usage: printf format [arguments ...]

Which matches the behavior observed on a Debian system but different
from the Illumos change.
2010-12-14 01:16:56 +00:00
Xin LI
6715165066 Make use of EX_USAGE for usage(). 2010-12-14 00:21:34 +00:00
Xin LI
9180853b89 The only caller of mknum() provides a char instead of an int, so make it
match the definition.

PR:		bin/152934
Submitted by:	Pedro F. Giffuni <giffunip tutopia.com>
Obtained from:	Illumos
2010-12-13 19:54:42 +00:00
Xin LI
c9aca921b8 Move locale.h include to the beginning header section as pointed out by
style(9)

Submitted by:	Pedro F. Giffuni <giffunip tutopia.com>
2010-12-13 19:50:12 +00:00
Warner Losh
cab6e6e1fb FreeBSD committer Dan Moschuk has passed away. Here is his death notice:
http://www.lifenews.ca/thespec/profile/98251--moschuk-daniel

PR:		147479
2010-12-13 16:23:02 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Doug Barton
de28c1d699 Bring in the change from OpenBSD's 1.14:
"synchronize synopsis and usage; "-l", "-r", "-s" and "-x" are mutually
exclusive; while here, slightly improve spacing in the source code
so it fits on a 80-column display again.

diff greatly improved by martynas@"

Obtained from:	sobrado@OpenBSD.org
2010-12-09 23:57:23 +00:00
Jilles Tjoelker
1866e8abab printf: Remove support for building as a csh builtin.
The #define BUILTIN was for building as a csh (not tcsh) builtin.
Given that csh was replaced by tcsh years ago there is no point in keeping
this.

The #define SHELL is for building as an sh builtin and is in active use.

This commit does not change the /bin/sh and /usr/bin/printf binaries.
2010-12-08 22:13:27 +00:00
Florian Smeets
f9cd2d0a8d Add myself to calendar.freebsd and committers-ports.dot
Approved by:	fjoe (mentor)
2010-12-07 23:56:51 +00:00
Jaakko Heinonen
cdfc719c2e Don't write the terminating NUL past end of buffer.
PR:		bin/152345
Submitted by:	Mateusz Guzik
2010-12-06 09:18:11 +00:00
Doug Barton
4221d3eb78 Bring in the change from NetBSD 1.28:
"\\ -> \e"

Obtained from:	joerg@NetBSD.org

Bump .Dd because we're now up to date with the latest NetBSD version
2010-12-05 22:47:08 +00:00
Doug Barton
c6281ac026 Bring in the following changes from NetBSD:
1.21
"Document the flags displayed by the default format, and mention their short
names. From espie@openbsd via jmc@openbsd."

1.24
"Fix three variable names.
From Todd T. Fries via Jason McIntyre."

Obtained from:	wiz@NetBSD.org (previous 2)

1.25
"Be consistent: document the birthtime field of struct stat for
the "B" field specifier."

Obtained from:	reed@NetBSD.org

1.26
"Drop trailing space."

Obtained from:	wiz@NetBSD.org

1.27
"Since we have st_birthtime in struct stat, it is in default display."

Obtained from:	enami@NetBSD.org

Purposely skipping the following revisions:
1.22	NetBSD-specific change
1.23	Removal of license clauses 3 and 4, already handled by imp
	in our r203971
2010-12-05 22:41:58 +00:00
Doug Barton
dc5e1d528e Bring in the change from NetBSD 1.20:
"Make sentence easier to parse. From jsing@openbsd via jmc@openbsd."

Obtained from:	wiz@NetBSD.org
2010-12-05 22:24:34 +00:00
Doug Barton
7c304a3b0f Bring in the changes from NetBSD 1.16 that we did not already have.
"Some fixes from jmc@openbsd."

Obtained from:	wiz@NetBSD.org
2010-12-05 22:20:08 +00:00
Doug Barton
d127a98c99 Bring in the changes from NetBSD 1.13 that we did not already have, with
some differences.

"Sort options. Use more mdoc macros. Some nit fixes. Bump date."

Obtained from:	wiz@NetBSD.org
2010-12-05 22:16:51 +00:00
Doug Barton
1c40e1f66c Bring in the change from NetBSD 1.12:
"document default format."

Obtained from:	yamt@NetBSD.org
2010-12-05 22:01:01 +00:00
Doug Barton
da78facc72 Bring in the following changes from NetBSD. See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44128

1.29
"Don't printf time_t with %d; fixes PR 44128 from yamt. With this change it
successfully prints mtimes after 2038."

1.30
"Improve previous with comments."

Obtained from:	dholland@NetBSD.org (both)
2010-12-05 21:53:12 +00:00
Doug Barton
d7233fd615 Fix an "unused variable" error that gets us all the way to WARNS=6 2010-12-05 21:33:05 +00:00
Doug Barton
9b3f439482 Bring in the update from NetBSD 1.28:
"Fix WARNS=4 issues (-Wcast-qual -Wsign-compare)"

Because of code differences I had to hand-apply parts of the patch,
so responsibility for errors goes to me.

Obtained from:	lukem@NetBSD.org
2010-12-05 21:29:20 +00:00
Doug Barton
d29003e79e Bring in the update from NetBSD 1.19, the documentation of readlink -f
"PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from:	elad@NetBSD.org
2010-12-05 21:17:02 +00:00
Doug Barton
b9f9338ea8 Bring in a new feature, adding a -f option to readlink to print the path
of the target, similar to realpath(1). See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=34662

This brings in the following changes:
1.24
"PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from:	elad@NetBSD.org

1.25
"Fix a segfault when doing 'stat -f %R' on the stdin file handle, instead
fake the filename '(stdin)' like the %N format."

Obtained from:	mlelstv@NetBSD.org

1.27
"The ofmt variable is actually a bit mask (not the character that was
in the format string) so that we can "or" it with the bits in the
formats variable.  This fixes the missing " -> " in front of the real
path (when you use %SR).

Also, the ?: needs another space."

Obtained from:	atatat@NetBSD.org

I am purposely omitting the following changes:
1.23	A humanize_number(3) clone that should better be implemented by
	actually using humanize_number(3)
1.26	This is the removal of license clause 3 and 4, already handled
	by imp in r203971
2010-12-05 21:11:45 +00:00
Doug Barton
578800b575 Bring in the change from NetBSD 1.22:
"Fix a trivial truncation case, and eliminate a corner case that might
print a nul character."

I am purposely bypassing the following versions:
1.19	A build infrastructure change that does not apply to us
1.20	A feature I am not interested in, but don't object if someone else
	wants to pick it up
1.21	A build infrastructure change that does not apply to us

Obtained from:	atatat@NetBSD.org
2010-12-05 20:47:53 +00:00
Doug Barton
5c06c8a134 Add my own documentation for the change in our r216196, aka NetBSD's 1.18
For -L if stat(2) fails, fall back to lstat(2).

.Dd purposely not bumped because more changes are coming.
2010-12-05 09:35:07 +00:00
Doug Barton
ccdbe8ce16 Bring in the change from NetBSD 1.18:
"If using stat (the -L flag) and it fails, fall back to lstat().  It
may be the case that we're examining a broken symlink, and anything is
better than nothing."

The changes in 1.14 through 1.17 were not relevant to us.

Obtained from:	atatat@NetBSD.org
2010-12-05 09:33:04 +00:00
Ulrich Spörlein
cded07a878 Move most of the remaining USD/PSD/SMM papers into share/doc 2010-12-04 10:11:20 +00:00
Gordon Tetlow
57cd97175a Add ability to decompress different format manual pages.
Add support for .so directive in manual pages.

Approved by:	mentor (wes@)
2010-12-03 02:07:34 +00:00
Xin LI
706d26a4a4 Decode IPC_CREAT and IPC_EXCL for semget(2).
PR:		bin/152781
Submitted by:	Anton Yuzhaninov <citrin citrin ru>
MFC after:	2 weeks
2010-12-02 18:24:22 +00:00
Kevin Lo
e66a677b27 Don't error out while searching for empty directories.
Submitted by:	Bakul Shah <bakul at bitblocks dot com>
2010-12-02 01:46:06 +00:00
Kai Wang
773810fb45 Add option -D for ranlib(1). When -D is speicified, ranlib(1) will generate
a deterministic archive symbol table (i.e. timestamp for the symbol table
member header is set to 0).

Submitted by: 	 Erik Cederstrand
2010-11-28 18:53:57 +00:00
Rebecca Cran
a709913fdd Fix typo. 2010-11-27 21:35:16 +00:00
Ulrich Spörlein
9c4bab2ddc Pet make checkdpadd. 2010-11-25 19:22:24 +00:00
Nathan Whitehorn
b396ac3d0f Properly use SCHAR_MAX instead of CHAR_MAX for 0x7f. This fixes operation
of locate(1) on systems on which char is unsigned by default (ARM and
PowerPC).

Reported by:	Paul Mather
MFC after:	4 days
2010-11-23 15:08:56 +00:00
George V. Neville-Neil
b205d03d78 Restore the (state) and \n printout when not using -T.
Pointed out by:	brucec@
MFC after:	3 weeks
2010-11-22 22:55:43 +00:00
Rebecca Cran
70557f4f83 hdr.elf.e_ident[EI_OSABI] is not a bitmask so '==' should been used.
Reported by: Artem Belevich <fbsdlist at src.cx>
2010-11-22 20:18:46 +00:00
Rebecca Cran
1161d4202c Fix some more warnings found by clang. 2010-11-22 20:10:48 +00:00
Attilio Rao
7f08176ee8 Add the ability for GDB to printout the thread name along with other
thread specific informations.

In order to do that, and in order to avoid KBI breakage with existing
infrastructure the following semantic is implemented:
- For live programs, a new member to the PT_LWPINFO is added (pl_tdname)
- For cores, a new ELF note is added (NT_THRMISC) that can be used for
  storing thread specific, miscellaneous, informations. Right now it is
  just popluated with a thread name.

GDB, then, retrieves the correct informations from the corefile via the
BFD interface, as it groks the ELF notes and create appropriate
pseudo-sections.

Sponsored by:	Sandvine Incorporated
Tested by:	gianni
Discussed with:	dim, kan, kib
MFC after:	2 weeks
2010-11-22 14:42:13 +00:00
Rebecca Cran
e267ef95d5 Don't generate input() since it's not used. 2010-11-22 14:16:22 +00:00
Stephen McKay
29afe03fd1 Various syntactic tweaks to satisfy style(9). No change to execution.
Submitted by:	gcooper@
2010-11-21 21:31:29 +00:00
Stephen McKay
92095ab601 xargs can be fooled by exiting children that it did not start, causing
it to kick off a new command before the previous has finished, resulting
in corrupted (interleaved) output.  It is also fooled by non-exiting
children it did not start, failing to exit until all extraneous children
have exited.

This patch makes xargs keep track of children it starts, ignoring
pre-existing ones.
2010-11-21 10:55:16 +00:00
Kevin Lo
a48551fac2 Remove unused variable 2010-11-20 15:22:16 +00:00
Jilles Tjoelker
9897c45f31 sh: Add printf builtin.
This was removed in 2001 but I think it is appropriate to add it back:
* I do not want to encourage people to write fragile and non-portable echo
  commands by making printf much slower than echo.
* Recent versions of Autoconf use it a lot.
* Almost no software still wants to support systems that do not have
  printf(1) at all.
* In many other shells printf is already a builtin.

Side effect: printf is now always the builtin version (which behaves
identically to /usr/bin/printf) and cannot be overridden via PATH (except
via the undocumented %builtin mechanism).

Code size increases about 5K on i386. Embedded folks might want to replace
/usr/bin/printf with a hard link to /usr/bin/alias.
2010-11-19 12:56:13 +00:00
Kevin Lo
b00f982843 Fix fd leak
MFC after:	3 days
2010-11-19 10:18:58 +00:00
Kevin Lo
f9af8a7b9c Close file and directory descriptors
MFC after:	3 days
2010-11-19 10:15:29 +00:00
Ryan Stone
3c578b2a05 When netstat was run with -i/-I and -w1 to produce running counters, the idrop
field printed an absolute value rather than the delta from the last value

Approved by:	emaste (mentor)
MFC after:	1 week
2010-11-18 23:46:55 +00:00
George V. Neville-Neil
f5d34df525 Add new, per connection, statistics for TCP, including:
Retransmitted Packets
Zero Window Advertisements
Out of Order Receives

These statistics are available via the -T argument to
netstat(1).
MFC after:	2 weeks
2010-11-17 18:55:12 +00:00
Rebecca Cran
4784a27247 Memory stats are reported in bytes, not pages.
PR:	docs/151283
Submitted by:	Bas Smeelen <b.smeelen at ose.nl>
MFC after: 3 days
2010-11-13 11:43:20 +00:00
Jaakko Heinonen
e04c378683 Set FD_CLOEXEC for the output file only when the file has been specified
with the -o option. Setting the flag for stderr (the default) could
cause the traced process to redirect stderr to a random file.

PR:		bin/152151
Submitted by:	ashish
MFC after:	5 days
2010-11-13 09:28:49 +00:00
Zack Kirsch
88d196db30 Add my birthday to the calendar so everyone can send me presents.
Approved by: zml (mentor)
2010-11-10 18:45:32 +00:00
Ulrich Spörlein
91109a91ba Unbreak the test target by re-generating the initial scanner
using an updated flex(1) binary.

Also ignore the changing $FreeBSD$ ID lines when doing the diff.
This needs additional obfuscation, to not upset the svn precommit
hooks :/
2010-11-09 18:28:11 +00:00
Rebecca Cran
b1ce21c6ef Fix typos.
PR:	bin/148894
Submitted by:	olgeni
2010-11-09 10:59:09 +00:00
David E. O'Brien
6d4a0c96d3 Fix the build on 64-bit hosts. WARNS=6 fails on them. 2010-11-09 02:51:38 +00:00
David E. O'Brien
2d15e75781 Back out r214961 for skeleton.c -- it broke the groff build. 2010-11-08 19:00:22 +00:00
Ruslan Ermilov
ecfd40f14d Add/expand country/state. 2010-11-08 09:50:47 +00:00
Ruslan Ermilov
2a000d9c8c A traditional (once per three years) sort by month/day/year/login.
While here, fixed badly formatted lines.
2010-11-08 09:26:56 +00:00
David E. O'Brien
7846096d2b Add '-y' for bison compatibility.
Obtained from:	http://invisible-island.net
2010-11-07 23:44:40 +00:00
David E. O'Brien
c81609f43f Inherit WARNS from parent directory.
Submitted by:	marius
2010-11-07 23:34:05 +00:00
David E. O'Brien
92a010d28b Directly use memory allocation functions and remove needless casts in
their usage.  Also use associated modern types instead of k&r ones.
2010-11-07 23:22:42 +00:00
David E. O'Brien
f5015507b0 Change to ANSI-C function definitions. 2010-11-07 22:51:54 +00:00
Ulrich Spörlein
446c7ab86a Retire objformat(1), take two.
It's been almost four years, and this placeholder has not been needed.
2010-11-07 10:49:40 +00:00
Jean-Sébastien Pédron
76423301d3 Fix a segmentation fault in argument processing.
The crash was caused by a command line such as this one:
# foldl -b1

PR:		bin/151592
Reported by:	Marcus Reid <marcus@blazingdot.com>
Tested by:	Marcus Reid <marcus@blazingdot.com>
MFC after:	3 days
2010-11-06 17:48:46 +00:00
Ulrich Spörlein
9283118f01 Apply style(9) and unbreak build.
This went unnoticed during the WARNS bump, as this tool is not connected
to the build.
2010-11-06 15:04:56 +00:00
Ulrich Spörlein
9e411c4821 Fix manpage markup. 2010-11-06 10:54:33 +00:00
John Baldwin
c23d84a86b Correct the abbreviations for general I/O and signal traces.
PR:		docs/151854
Submitted by:	Stephen Veiss  stephen of brokenbottle net
MFC after:	3 days
2010-11-01 15:18:57 +00:00
Garrett Wollman
ab10162f86 Style cleanup: make this look more like a 21st-century shell script
and not something out of the early 1980s.  Make sure all error
messages go to stderr, not stdout.  Since there's error-handling code
to handle empty SEARCHPATHS and FILESYSTEMS, use the initialization
form that allows this error to be diagnosed.  (hat tip: jilles@)
2010-11-01 02:20:18 +00:00
Garrett Wollman
bf59c7bab7 jilles@ pointed out that using ${PRUNEDIRS:=".zfs"} in updatedb.sh
made it impossible to override PRUNEDIRS to make it empty.  Use the
non-colon form to only set PRUNEDIRS if it is completely unset.  (For
parallelism, the other configuration defaults here could be done the
same way, but that could be more obviously accomplished by disabling
updatedb in periodic.conf, so leave them alone for now.)
2010-11-01 01:51:47 +00:00
Garrett Wollman
6f8b6f9469 Make it possible to exclude directories by name no matter where they
are in the filesystem from the locate database.  By default, exclude
".zfs" directories, as users who who have set snapdir=visible and are
taking frequent snapshots most likely do not want the snapshots
included in the locate database.
2010-10-31 02:36:05 +00:00
Ulrich Spörlein
16dc6e122a flex: add missing ifdef magic to create/hide prototypes
This unbreaks build for some software with higher WARNS flags.

Reviewed by:	rpaulo
PR:		bin/139319 (parts already committed in previous revision)
2010-10-24 15:31:41 +00:00
Gleb Smirnoff
283e21dd32 Fix typo in last commit.
Submitted by:	bcr
2010-10-21 20:22:00 +00:00
Gleb Smirnoff
f3d45e1409 Document possibility to read from stdin. 2010-10-21 17:23:09 +00:00
Gleb Smirnoff
85080d2d68 Make it possible to read input from stdin.
Without this change I don't see a way to
unpack a multivolume archive without wasting
disk space for a temporary file.
2010-10-21 17:05:15 +00:00
Ulrich Spörlein
2914feeb7e mdoc: make pages render with mandoc
It's a bit more pedantic regarding .Bl list elements. This has an added
benefit of unbreaking the ipfw(8) manpage, where groff was silently
skipping one list element.
2010-10-21 12:27:13 +00:00
Ed Schouten
587250b286 Get rid of hand-rolled closefrom(3). 2010-10-20 19:53:29 +00:00
Ed Schouten
a2995e0d9b Remove setpgid() call before executing child process.
Using a separate process group here is bad, since (for example) job
control in the TTY layer prevents interaction with the TTY, causing the
child process to hang.

Mentioned on:	current@
MFC after:	2 weeks
2010-10-20 09:35:20 +00:00
Xin LI
4f2bbc00f2 MFV: nc(1) from OpenBSD 4.8.
While I'm there, bump WARNS level to 2 as the vendor
have the right printf format string now.

MFC after:	1 month
Obtained from:	OpenBSD
2010-10-19 00:01:53 +00:00
Frederic Culot
62778483f7 Replace spaces by a tab after the date.
Reported by:	gavin@, brucec@
Approved by:	sahil@ (mentor)
2010-10-18 19:14:59 +00:00
Edwin Groothuis
2d2d15a964 "b64decode -r" did not handle arbitary breaks in base64 encoded
data. White space should be accepted anywhere in a base64 encoded
stream, not just after every chunk (4 characters).

Test-scenario:

VmVsb2NpdHkgUmV3YXJkcw==

and

VmVsb2NpdHkgUmV3YXJkcw
==

should both produce "Velocity Rewards"

PR:		bin/124739
Submitted by:	Mark Andrews <marka@isc.org>
MFC after:	2 weeks
2010-10-18 05:44:11 +00:00
Edwin Groothuis
4b26f3413e Stylify of uudecode(1)
Part of PR bin/124739.

PR:		bin/124739
Submitted by:	Mark Andrews <marka@isc.org>
2010-10-18 03:59:55 +00:00
Frederic Culot
d688106259 Add myself to calendar.freebsd.
Approved by:	sahil@ (mentor)
2010-10-17 19:02:42 +00:00
Benedict Reuschling
c4fadc2b78 Correct some typos in comments, no functional changes. 2010-10-16 15:24:04 +00:00
Edwin Groothuis
9a865043bb Update manual with regarding to the status of calendars/calendar.judaic. 2010-10-14 21:53:25 +00:00
Benedict Reuschling
05844c563e s/sytem/system in comments, no functional changes.
Reviewed by:    alfred@
2010-10-13 20:08:02 +00:00
Rui Paulo
60982546cd Don't define the input() function ifdef YY_NO_INPUT.
This was previously done for the input() function.

Submitted by:	Norberto Lopes <nblopes.ml at gmail.com>
2010-10-13 10:31:32 +00:00
Martin Matuska
e0f0e66dfe Upgrade xz to git snapshot as of 20101010
Approved by:	delphij (mentor)
MFC after:	1 month
2010-10-11 21:16:50 +00:00
Tim Kientzle
0e479ac8f7 Add -D (deterministic) option to ar.
When set, it forces all timestamps and owners to zero and
modes to 0644.  Useful for producing libraries that are
bitwise identical across multiple build runs.

Submitted by:	Erik Cederstrand
Reviewed by:	Kai Wang
2010-10-09 05:31:08 +00:00
Dimitry Andric
93f8854c00 Remove superfluous cast in usr.bin/netstat/sctp.c.
Found by:	clang
Submitted by:	Norberto Lopes, nlopes dot ml at gmail dot com
Approved by:	rpaulo (mentor)
2010-10-08 20:40:05 +00:00
Ulrich Spörlein
0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Gordon Tetlow
3d9127f1bc Add the ability to display specific manual pages if passed on the
commandline. This mirrors the old (undocumented) GNU man functionality.
Also document this feature in the implementation notes section of
the manpage.

Submitted by:	arundel
Approved by:	wes (mentor implicit)
2010-10-07 06:34:47 +00:00
Warner Losh
9a6945bc4a Remove hack needed by 6.x machines and older machines to run newer
makes on FreeBSD/pc98.  The need for this hack has passed.  If you are
one of the rare people that may need this, then you should setenv
MACHINE=pc98 as a workaround.
2010-10-06 20:54:17 +00:00
Warner Losh
2a13464829 Use more portable errx instead of errc. The latter doesn't buy us
anyting anyway, since the error EAGAIN's error message doesn't add
anything to the error strings that are there now.
2010-10-06 20:49:45 +00:00
Sergey Kandaurov
b44f9e2fc0 Add myself to calendar.freebsd and committers-src.dot.
Approved by:	avg (mentor)
2010-10-06 14:43:37 +00:00
Alexander Leidinger
57db56459a Fix regex for some socket- and acl-related syscall values.
Submitted by:	Mikhail <hidden.node@gmail.com>
PR:		149295
MFC-after:	2 weeks
2010-10-06 12:41:42 +00:00
Gordon Tetlow
1d7c660a13 If LANG/LC_CTYPE/LC_ALL is set and the localized man page contains a page
also in the base set, the man utility when invoked with -a would display
pages for each locale in the same tree:

$ LANG=en_GB.ISO8859-15 man -wa man
/usr/share/man/en.ISO8859-15/man1/man.1.gz
/usr/share/man/man1/man.1.gz
/usr/share/man/en.ISO8859-15/man7/man.7.gz
/usr/share/man/man7/man.7.gz

Use continue to break out of the loop for the current locale. This results
in behavior more closely matching the old GNU man implementation:

$ LANG=en_GB.ISO8859-15 man -wa man
/usr/share/man/en.ISO8859-15/man1/man.1.gz
/usr/share/man/en.ISO8859-15/man7/man.7.gz

This will still search for a copy of the file in other manual path
locations. If there was a /usr/local/man/man1/man.1.gz file, it would still
be displayed. This is also consistent with the GNU man implementation.

Submitted by:	arundel
Approved by:	wes (mentor implicit)
2010-10-06 07:22:56 +00:00
Tim Kientzle
80f68bebbd Recognize both ! and ^ as markers for negated character classes.
Submitted by:	Mykola Dzham
2010-10-06 04:30:40 +00:00
Christian Brueffer
e809783da2 SEE ALSO should sorted by manpage section first. 2010-10-05 20:39:36 +00:00
Gordon Tetlow
7230d5e626 Add reference to intro(1) in SEE ALSO section.
PR:		docs/151216
Approved by:	wes (mentor, implicit)
2010-10-05 16:14:08 +00:00
Ruslan Ermilov
699ef999ee Show hostcache statistics.
Submitted by:	Maxim Dounin
2010-10-05 05:15:27 +00:00
Gordon Tetlow
023f0373a1 Retire GNU man in favor of the newly written BSDL version.
Approved by:	wes (mentor)
2010-10-03 22:24:14 +00:00
Gordon Tetlow
00e05e697e Fix up whatis/apropos issue displaying all output on a single due to
forgotten quotes.

Submitted by:	Brandon Gooch
Approved by:	wes (mentor, implicit)
2010-10-02 06:55:04 +00:00
Gordon Tetlow
c535eb59d1 Implementaiton of man, manpath, whatis, and apropos written entirely in sh.
Features of this new version in favor of the old one:
BSD licensed -- old one is GPL.
Imports configuration from /etc/man.conf and LOCALBASE/etc/man.d/*.conf
allowing ports to extend the base functionality. The pluggable
configuration can supplement the manual search path (retiring use.perl),
add locales, and override language specific toolsets (attempt to merge
the japanese/man port into the base system as much as possible).

Much effort has been made to make this version mirror the functionality
of the existing implementation. For 99% of users, it should be a drop in
replacement.

PR:		gnu/143271, gnu/4419
Reviewed by:	dougb (previous versions)
Approved by:	wes (mentor)
2010-10-01 03:59:18 +00:00
John Baldwin
6d6bc99ad2 If an RCS file is truncated, rcsfile_getdelta() will return NULL. Instead
of faulting, check for NULL.  However, returning an error would cause csup
to just abort the entire update.  Instead, break out of the loop and
return ok.  The attempts to update the file will trigger a MD5 failure which
will cause csup to download the entire file as a fixup.

Reviewed by:	lulf
MFC after:	1 week
2010-09-30 14:28:48 +00:00
Jilles Tjoelker
88deede54a tr: Fix '[=]=]' equivalence class.
A closing bracket immediately after '[=' should not be treated as special.

Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.

PR:		bin/150384
Submitted by:	Richard Lowe
MFC after:	2 weeks
2010-09-29 22:24:18 +00:00
Ed Maste
905571c031 Remove copyright strings printed at login time via login(1) or sshd(8).
It is not clear to what this copyright should apply, and this is in line
with what other operating systems do.

For ssh specifically, printing of the copyright string is not in the
upstream version so this reduces our FreeBSD-local diffs.

Approved by:	core, des (ssh)
2010-09-28 20:57:14 +00:00
Dimitry Andric
0d2d8fab68 Add manpages for clang and tblgen. These were generated from upstream's
tools/clang/docs/tools/clang.pod and docs/CommandGuide/tblgen.pod,
respectively.

Approved-by:	rpaulo (mentor)
2010-09-27 19:03:18 +00:00
Marius Strobl
04ebad3842 Make WARNS=6 clean.
MFC after:	1 week
2010-09-24 10:40:17 +00:00
Marius Strobl
e865ab086c Try to adhere to style.Makefile(5).
MFC after:	3 days
2010-09-23 14:06:15 +00:00
Marius Strobl
ce7704b610 Remove an explicit assignment of the CFLAGS variable intended for
debugging purposes only.

MFC after:	3 days
2010-09-23 10:03:03 +00:00
Xin LI
fb2924e4ac In the past gunzip(1) write()'s after each inflate return. This is
not optimal from a performance standpoint since the write buffer is
not necessarily be filled up when the inflate rountine reached the
end of input buffer and it's not the end of file.

This problem gets uncovered by trying to pipe gunzip -c output to
a GEOM device directly, which enforces the writes be multiple of
sector size.

Sponsored by:	iXsystems, Inc.
Reported by:	jpaetzel
MFC after:	2 weeks
2010-09-23 01:24:33 +00:00
Edwin Groothuis
e160180ef7 And now the 2nd part of the patch: Also fix the year.
PR:		150504
Submitted by:	Douglas Berry <bitnix@bitnix.ca>
2010-09-22 21:14:18 +00:00
Edwin Groothuis
778efe6079 Fix location of the Battle of the Plains of Abraham
PR:		150504
Submitted by:	Douglas Berry <bitnix@bitnix.ca>
MFC after:	1 week
2010-09-22 21:10:45 +00:00
Sunpoet Po-Chuan Hsieh
e5d8eb431b Add myself as a ports committer
Approved by:	pgollucci (mentor)
2010-09-22 16:54:22 +00:00
Xin LI
f7482a2568 Add Simplified Chinese messages for BSD grep. 2010-09-20 19:42:52 +00:00
Dimitry Andric
e580952d8a Upgrade our Clang in base to r114020, from upstream's release_28 branch.
Approved-by:	rpaulo (mentor)
2010-09-20 16:43:17 +00:00
David E. O'Brien
aa2e033466 Fix the grammar after I added a second environmental variable.
Submitted by:	wxs
2010-09-19 00:36:26 +00:00
David E. O'Brien
e5bc6d56e8 Increase the hostname display width. Many machines are named
with >12 characters.  This still allows for 80 column output
with load averages of 99.99, 99.99, 99.99.
2010-09-16 22:38:27 +00:00
David E. O'Brien
9b91846ce4 + Add the SCRIPT environmental variable to the sub-shell. Its value is
the name of the typescript file.
+ Add the 'command' argument (if supplied on the command line) to the
typescript file.  This creates a more complete typescript when invoked
this way - more equal to invoking script without supplying the 'command'
argument.
2010-09-16 22:31:03 +00:00
Rui Paulo
bd0f1ee24f Fix indenting of the previous commit. 2010-09-16 11:40:41 +00:00
Rui Paulo
836450ab23 When generating functions to print the arguments of system calls with
bitwise parameters (e.g. mmap), print the syscall parameter value first.
The resulting output looks like the %b specifier of printf(9).

Before:
mmap(0,0x8000,PROT_READ|PROT_WRITE,...
After:
mmap(0,0x8000,0x3<PROT_READ|PROT_WRITE>,...

Submitted by:	Norberto Lopes <nlopes.ml at gmail.com>
Idea from:	freebsd-arch/2006-April/005116.html
2010-09-16 11:33:31 +00:00
Ed Maste
b3f4d7e17c Remove extra ; 2010-09-14 01:33:21 +00:00
Warner Losh
8cfc82586e Move to using Makefile.arch to include the proper target-specific programs. 2010-09-13 15:30:09 +00:00
Warner Losh
336c4b45ea Doh! two last second refactoring typos crept in. Fix. 2010-09-13 06:50:07 +00:00
Warner Losh
d2fb1699ac Revert r212513 and reimplement the search order to be ARCH, CPUARCH 2010-09-13 06:35:35 +00:00
Warner Losh
22e2f727d0 Merge from tbemd: Move to using Makefile.arch to control what's build.
Reviewed by:	(arch@, no objection)
2010-09-13 02:23:03 +00:00
Warner Losh
9cbda5febf merge powerpc and powerpc64 now that we use TARGET_CPUARCH 2010-09-13 01:20:53 +00:00
Warner Losh
1136c95ff4 Move to using TARGET_CPUARCH instead of TARGET_ARCH. 2010-09-13 01:00:48 +00:00
David E. O'Brien
4b2f915321 Note bug in trying to printf(1) things like: '-%s\n' "foo" 2010-09-09 19:27:40 +00:00
Alexander Motin
4b06d6510d For total interrupt count on -vm screen count all interrupts, but not only
those which fit the screen.
2010-09-08 07:30:46 +00:00
Glen Barber
58175a74fc Fix typo in bsdcpio manual:
s/libarchive_formats/libarchive-formats

PR:		150300
Submitted by:	Kurt Jaeger <fbsd-pr at opsec dot eu>
Patch by:	Kurt Jaeger
Approved by:	keramida (mentor)
MFC after:	1 week
2010-09-06 20:40:38 +00:00
Andreas Tobler
33eb2576c1 Add myself to calendar.freebsd and committers-src.dot.
Approved by:	nwhitehorn	(mentor)
2010-09-06 19:00:00 +00:00
Jilles Tjoelker
3cf53e8550 printf(1): Clarify that \OOO produces a byte, different %b escape sequences.
Octal escape sequences are expanded to bytes, not characters, and multiple
are required for a multibyte character.

The valid escape sequences in %b strings are slightly different from the
escape sequences in the format string.
2010-09-05 21:44:50 +00:00
Steve Wills
58ab8e3f66 Add myself to calendar.freebsd
Approved By: pgollucci (co-mentor)
2010-09-05 01:57:25 +00:00
Edwin Groothuis
287cf3e528 Adding a missing firstname (Monique)
PR:		conf/150049
Submitted by:	Thierry Thomas <thierry@pompo.net>
2010-09-02 21:48:35 +00:00
Gavin Atkinson
f806ea8af1 Correct spelling mistake, int -> into
MFC after:	3 days
2010-09-02 21:29:50 +00:00
Kevin Lo
34759932a8 For consistency, cast result of getpid() to long 2010-08-31 07:19:10 +00:00
Edwin Groothuis
c31776f0f8 For calendars which don't match the solar-based Gregorian calendar,
be able to specify a year string in an entry.
2010-08-30 22:45:32 +00:00
Edwin Groothuis
746b67cdfa Use basename(3) to determine the name of the program.
Submitted by:	Alexander Best <arundel@>
2010-08-30 22:24:26 +00:00
Dimitry Andric
a4703857ff Add myself to calendars.freebsd.
Approved by:	rpaulo (mentor)
2010-08-30 21:20:24 +00:00
Nathan Whitehorn
4e5833219a Fix breakage introduced in r211725 and improve functionality of truss on
64-bit powerpc by adding 32-bit compatibility features.
2010-08-28 15:04:53 +00:00