Commit Graph

9938 Commits

Author SHA1 Message Date
Xin LI
fc26891004 Match symbolic link handling behavior with GNU gzip, bzip2 and xz:
When we are operating on a symbolic link pointing to an existing
file, bail out by default, but go ahead if -f is specified.

Submitted by:	arundel
MFC after:	2 weeks
2011-05-23 09:40:21 +00:00
Xin LI
be07528c53 Diff reduction against NetBSD. The most notable change is to zdiff(1) to
handle more file formats including bzip2 and xz.

MFC after:	2 weeks
2011-05-23 09:02:44 +00:00
Sergey Kandaurov
d9b2153b4e Add missing header file.
MFC after:	1 week
2011-05-20 17:03:23 +00:00
Benedict Reuschling
6bef5d2865 Correct typos in comments, no functional changes.
Found by:	codespell
Reviewed by:	kaiw
MFC after:	1 week
2011-05-20 11:29:09 +00:00
Benedict Reuschling
b2bf146e3e Fix typos in comments, no functional changes.
Found by:       codespell
Reviewed by:    alfred
MFC after:      1 week
2011-05-19 20:35:40 +00:00
Ben Laurie
9bde021a87 Fix clang warnings.
Note: these were actually bugs (printf with no format string).

Approved by: philip (mentor)
2011-05-18 20:52:52 +00:00
Rick Macklem
1f3765902c Change the sysctl naming for the old and new NFS clients
to vfs.oldnfs.xxx and vfs.nfs.xxx respectively. This makes
the default nfs client use vfs.nfs.xxx after r221124.
2011-05-15 20:52:43 +00:00
Stanislav Sedov
0d1d6d589b - Fix several typos [1]
- fuser(1) writes usernames to stderr, not stdout [1]
- Add history section.

Submitted by: Pieter de Goeje <pieter@degoeje.nl> [1]
2011-05-14 04:02:56 +00:00
Xin LI
61382374d1 Constify a few string variables. While I'm there, also convert usage() to
use a prototype.

MFC after:	2 weeks
2011-05-13 22:35:06 +00:00
Ruslan Ermilov
22a2d42fa3 Fixed an embedded shell script.
Reviewed by:	sobomax
2011-05-13 09:55:48 +00:00
Warner Losh
8d917b4b49 uintmax_t is a better type here...
Submitted by:	avg@
2011-05-12 19:10:00 +00:00
Warner Losh
76db9ccfbe Fix printf int mismatch on 32-bit architectures... 2011-05-12 17:02:56 +00:00
Stanislav Sedov
0daf62d9f5 - Commit work from libprocstat project. These patches add support for runtime
file and processes information retrieval from the running kernel via sysctl
  in the form of new library, libprocstat.  The library also supports KVM backend
  for analyzing memory crash dumps.  Both procstat(1) and fstat(1) utilities have
  been modified to take advantage of the library (as the bonus point the fstat(1)
  utility no longer need superuser privileges to operate), and the procstat(1)
  utility is now able to display information from memory dumps as well.

  The newly introduced fuser(1) utility also uses this library and able to operate
  via sysctl and kvm backends.

  The library is by no means complete (e.g. KVM backend is missing vnode name
  resolution routines, and there're no manpages for the library itself) so I
  plan to improve it further.  I'm commiting it so it will get wider exposure
  and review.

  We won't be able to MFC this work as it relies on changes in HEAD, which
  was introduced some time ago, that break kernel ABI.  OTOH we may be able
  to merge the library with KVM backend if we really need it there.

Discussed with:	rwatson
2011-05-12 10:11:39 +00:00
Poul-Henning Kamp
9fc9ddee09 Flush the scriptfile whenever we see a non-graphical character to get
more real-time logging, without forcing a write(2) on every single
character.
2011-05-10 10:58:57 +00:00
Xin LI
5187751e00 Regenerated with latest configure script.
MFC after:	1 month
2011-05-10 01:05:41 +00:00
Ruslan Ermilov
6d0d87ca78 - Add a forgotten -o to usage().
- Sync usage() with manpage's SYNOPSIS.
2011-05-05 10:17:49 +00:00
Ruslan Ermilov
fe3ea03ad2 [mdoc] remove a hard sentence break. 2011-05-05 10:17:08 +00:00
Rick Macklem
f90f8f0098 Update nfsstat.1 to reflect the changes done to nfsstat(1)
by r221455. This includes a new "-o" option for displaying
statistics from the old NFS client/server and a slightly
different description for the "-e" option.
This is a content change.
2011-05-04 20:28:06 +00:00
Rick Macklem
e85b7d75a4 Modify nfsstat(1) so that it reports statistics for the
new NFS client/server by default, in a format compatible
with the old NFS client/server. Also add a "-o" flag that
forces nfsstat(1) to get statistics for the old NFS
client/server.
2011-05-04 20:13:26 +00:00
Rick Macklem
c01be3b713 Modify nfsstat(1) so that it prints out the buffer cache
stats in the same way for the new client as the old one.

MFC after:	2 weeks
2011-05-04 19:28:44 +00:00
Rick Macklem
0e8f7d1995 Fix nfsstat.c so that the "-z" option works for the new
NFS subsystem.

MFC after:	2 weeks
2011-05-04 13:50:37 +00:00
Rick Macklem
785b257239 Revert r221308, since it incorrectly zero'd both client and
server stats when "-c" or "-s" was specified.
2011-05-04 13:20:44 +00:00
Ruslan Ermilov
41af50287c Fixed bad format and misorder. 2011-05-03 12:29:03 +00:00
Doug Rabson
ba675b4176 Call pam_setcred() before login_getpwclass to support home directories
on GSS-API authenticated NFS where the kerberos credentials need to be
saved so that the kernel can authenticate to the NFS server.
2011-05-03 10:18:27 +00:00
Edward Tomasz Napierala
a7ad07bff3 Change the way rctl interfaces with jails by introducing prison_racct
structure, which acts as a proxy between them.  This makes jail rules
persistent, i.e. they can be added before jail gets created, and they
don't disappear when the jail gets destroyed.
2011-05-03 07:32:58 +00:00
Dimitry Andric
565a812648 Minor updates to the clang and tblgen manpages. 2011-05-02 21:10:13 +00:00
Dimitry Andric
3b0f406639 Upgrade our copy of llvm/clang to r130700, from upstream's trunk. 2011-05-02 21:04:37 +00:00
Rick Macklem
dd831c63e0 Fix nfsstat.1 to indicate that "-z" now works for
the new NFS subsystems after r221308.
This is a content change.

MFC after:	2 weeks
2011-05-01 23:55:56 +00:00
Rick Macklem
d380a59d3d Fix nfsstat so that the "-z" option works for the
new NFS subsystem.

MFC after:	2 weeks
2011-05-01 23:41:35 +00:00
Ulrich Spörlein
aeea395e35 Let users' PATH decide which groff suite to pick up.
Let groff pass the -c flag to grotty, which will turn off ANSI
sequences. While these are not a problem for our more/less, they get
mangled by col(1) and this will result in garbage output.

This makes man(1) work together with textproc/groff, in case the
user decided to delete the old groff from base (-DWITHOUT_GROFF).
2011-05-01 19:47:34 +00:00
John Baldwin
a011c62e8b Raise rlogin back to a WARNS level of 6.
Tested by:	make universe
2011-04-27 17:36:37 +00:00
Doug Barton
46dccdb284 Revert r221053 by replacing WARNS?= 3 since it's breaking the build on
several arches.
2011-04-26 22:02:51 +00:00
John Baldwin
dc0a06319e Generate the network byte order version of the window size structure in a
temporary variable on the stack and then copy that into the output buffer
so that the htons() conversions use aligned accesses.

MFC after:	1 month
2011-04-26 20:14:29 +00:00
David E. O'Brien
37508ef3eb This builds OK using the parent dir's WARNS=6.
[built on both AMD64 and i386]
2011-04-26 04:09:20 +00:00
David E. O'Brien
5d46cc89b9 Catch up with r57841 which removed the possible linking against libutil
by not bothering to include its API.
2011-04-26 04:01:08 +00:00
Jilles Tjoelker
1792d820be printf(1): Move non-bugs from the BUGS section to a new section CAVEATS. 2011-04-25 19:15:58 +00:00
Jilles Tjoelker
8a906b236a printf(1): Mention effect of '#' modifier on other conversions. 2011-04-25 12:36:29 +00:00
Simon L. B. Nielsen
6e46c1cc7d Check return code of setuid() and setgid() in finger.
While they will not fail in normal circumstances, better safe than
sorry.

MFC after:	1 week
2011-04-23 14:19:26 +00:00
Jilles Tjoelker
a4a1c5b11e kdump: Show code for signals where the default action was taken.
This information is available as of kernel r220740. Trace files from older
kernels will always have 0.

MFC after:	1 week
2011-04-17 21:11:55 +00:00
Edward Tomasz Napierala
ee2509d1a2 Add manual page for rctl.conf(5). 2011-04-14 18:37:27 +00:00
Ruslan Ermilov
4898f742c7 Show client's access cache statistics. 2011-04-13 13:05:48 +00:00
Edward Tomasz Napierala
ae1fdbee9e Add link to rctl(8). 2011-04-10 10:17:01 +00:00
Edwin Groothuis
8128094045 When specifying the -t option (send tag in front of message), this tag
should also be forwarded to the remote logging host, not only when the
logging is done locally.

PR:		bin/154324
Submitted by:	Callum Gibson <callumgibson@optusnet.com.au>
MFC after:	1 week
2011-04-08 12:33:07 +00:00
Gabor Kovesdan
b66a823be8 - Adjust a comment to actual behaviour
- Makefile nit
- Add more CVS/SVN keywords to make it easier to track changes from NetBSD
  in case they add further improvements

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
2011-04-07 13:03:35 +00:00
Gabor Kovesdan
d841ecb30d - Simplify the fixed string pattern preprocessing code
- Improve readability

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
2011-04-07 13:01:03 +00:00
Gabor Kovesdan
acac8baf59 - Replace some strcpy()-family functions with memcpy() ones. It has been
discussed earlier that the extra safeness is not required in these
  cases and we can avoid the overhead by using the more general
  memory copy functions.

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
2011-04-07 12:52:46 +00:00
Sergey Kandaurov
89b13f486a Document -w for swapuse.
PR:		docs/156089
Submitted by:	Andrey Ignatov <rdna att rdna.ru>
MFC after:	1 week
2011-04-05 07:56:40 +00:00
Gordon Tetlow
deeff310cc Overhaul locale handling.
Use locale(1) to determine the locale instead of trying to hand roll it.
Correctly construct groff call based on charset and locale independently,
not the mix between the two.

Submitted by:	uqs@
2011-04-02 05:01:09 +00:00
Ed Maste
41aebe5fc9 Remove $Log$ keyword, which can cause annoyance in diffs in some cases.
Revision control tools have a history command to obtain this information.
2011-03-31 14:35:33 +00:00
Edward Tomasz Napierala
20d3bac00f Fix grammar and bump date.
Submitted by:	trociny
2011-03-30 20:13:55 +00:00
Edward Tomasz Napierala
6ec54a57b4 Add rctl(8), the utility to manage rctl rules.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib (earlier version)
2011-03-30 18:27:52 +00:00
Ganael LAPLANCHE
8321d59192 Add myself 2011-03-28 08:37:48 +00:00
Hajimu UMEMOTO
3db78cf013 getpwnam(3) may return NULL.
Requested by:   nork
Reviewed by:    Takeharu KATO <takeharu1219__at__ybb.ne.jp>, nork
MFC after:      1 week
2011-03-27 12:53:20 +00:00
Ruslan Ermilov
afc7401525 Fixed sockets display somewhat (-L, -T, -x, -Lx, with and without -A).
(I didn't try to fix negative TCP timers with -x.)

MFC after:	3 days
2011-03-26 19:09:28 +00:00
Ruslan Ermilov
97b0bfc2e9 Discourage from using "cp -r". 2011-03-24 13:52:59 +00:00
Edwin Groothuis
8f056e41f7 Please welcome the Brazilian calendar in the FreeBSD base.
For now, calendar.brazilian points to pt_BR.ISO8859-1

Submitted by:	Renato Tambellini <rtsanch@gmail.com>
MFC after:	1 week
2011-03-23 21:22:03 +00:00
Jeff Roberson
aa0a1e58f0 - Merge in OFED 1.5.3 from projects/ofed/head 2011-03-21 09:58:24 +00:00
Sofian Brabez
f14368513d Add myself to calendar.freebsd.
Approved by:	miwi@ (mentor)
2011-03-18 09:06:06 +00:00
Ed Maste
ea9827d3be Remove uptime validity check that hasn't been necessary since r151417
switched to clock_gettime.  vmstat will now not exit with an error
if run on a system with 10 years of uptime.
2011-03-17 01:05:54 +00:00
Dmitry Chagin
28e5e0bf4c Add my birthday to the freebsd calendar. 2011-03-14 13:02:12 +00:00
Rebecca Cran
e17c4d4eb8 Fix typo. 2011-03-13 16:47:21 +00:00
Mikolaj Golub
b95f402d56 Add myself to calendar.freebsd and committers-src.dot.
Approved by:	pjd (mentor)
2011-03-11 10:11:22 +00:00
Glen Barber
be2cad28b3 Move the explanation of using arguments for the PRIMARIES above
the list of PRIMARIES.

PR:		151812
Submitted by:	Jay (jouellette of gmail com)
Patch by:	eadler
MFC after:	1 week
2011-03-10 18:00:47 +00:00
Jilles Tjoelker
de55508483 Simplify various code that allowed for sys_signame being lower case.
This was changed in r218285.
2011-03-06 19:50:47 +00:00
Edward Tomasz Napierala
2bfc50bc4f Add two new system calls, setloginclass(2) and getloginclass(2). This makes
it possible for the kernel to track login class the process is assigned to,
which is required for RCTL.  This change also make setusercontext(3) call
setloginclass(2) and makes it possible to retrieve current login class using
id(1).

Reviewed by:	kib (as part of a larger patch)
2011-03-05 12:40:35 +00:00
Sergey A. Osokin
7b9758e308 Expand the name of Palm Sunday holiday with more canonical Entry of the
Lord into Jerusalem.
Merge the Pentecost and Trinity Sunday holidays, they are synonyms.
Remove Body of Christ day, nonexistent holiday for Orthodox Church.
Fix typo in the name of Ioann The Baptist, introduced in previous commit.
2011-03-02 11:09:34 +00:00
Sergey A. Osokin
a4c7e084c9 Fix beginning day of the Carnival. it starts 2011-03-02 11:04:50 +00:00
Jilles Tjoelker
77fae5c16d printf: Note that this is used both as a normal program and a shell builtin. 2011-03-01 21:47:06 +00:00
Dmitry Chagin
dde5f9b938 Teach kdump to decode linux syscalls names too.
Fix bug introduced in my previous commit: the kernel always dump native
signal numbers, so no need to check the ABI in ktrpsig().

Suggested by:	jhb
MFC after:	1 Month.
2011-03-01 16:42:28 +00:00
Rebecca Cran
ac095af538 Remove duplicate "in".
Suggested by:	Rob Farmer <rfarmer at predatorlabs.net>
MFC after:	3 days
2011-03-01 11:47:51 +00:00
Rebecca Cran
b633aa9451 Revert some of r177626. "in in" is valid in certain sentences.
PR:		121490
MFC after:	3 days
2011-02-28 10:03:48 +00:00
Pawel Jakub Dawidek
10b9d77bf1 Finally... Import the latest open-source ZFS version - (SPA) 28.
Few new things available from now on:

- Data deduplication.
- Triple parity RAIDZ (RAIDZ3).
- zfs diff.
- zpool split.
- Snapshot holds.
- zpool import -F. Allows to rewind corrupted pool to earlier
  transaction group.
- Possibility to import pool in read-only mode.

MFC after:	1 month
2011-02-27 19:41:40 +00:00
Dimitry Andric
9190ccb851 Regenerate clang and tblgen manpages; the clang manpage has some minor
updates.
2011-02-27 01:45:36 +00:00
Remko Lodder
6bf23913c2 Not only had I included a syntax / style error, nice.3 is also
deprecated.
2011-02-26 11:20:51 +00:00
Dmitry Chagin
a30c325c64 Update manual page to reflect latest changes of ABI description support.
MFC after:	1 Month.
2011-02-25 22:14:12 +00:00
Dmitry Chagin
7144d36fab Teach kdump to understand sv_flags records in the trace files.
MFC after:	1 Month.
2011-02-25 22:07:23 +00:00
Remko Lodder
f0d789acde Revert the commit that I made, there is a lot of discussion
and it's not accurate anyway

Requested by:	jb, bde
2011-02-25 19:38:42 +00:00
Jaakko Heinonen
c23211e97e Document the input line length limit.
Submitted by:	Dominic Fandrey (original version)
2011-02-25 19:10:19 +00:00
Gabor Kovesdan
ad30f8e79b Add the BSD-licensed Citrus iconv to the base system with default off
setting. It can be built by setting the WITH_ICONV knob. While this
knob is unset, the library part, the binaries, the header file and
the metadata files will not be built or installed so it makes no impact
on the system if left turned off.

This work is based on the iconv implementation in NetBSD but a great
number of improvements and feature additions have been included:

- Some utilities have been added. There is a conversion table generator,
  which can compare conversion tables to reference data generated by
  GNU libiconv. This helps ensuring conversion compatibility.
- UTF-16 surrogate support and some endianness issues have been fixed.
- The rather chaotic Makefiles to build metadata have been refactored
  and cleaned up, now it is easy to read and it is also easier to add
  support for new encodings.
- A bunch of new encodings and encoding aliases have been added.
- Support for 1->2, 1->3 and 1->4 mappings, which is needed for
  transliterating with flying accents as GNU does, like "u.
- Lots of warnings have been fixed, the major part of the code is
  now WARNS=6 clean.
- New section 1 and section 5 manual pages have been added.
- Some GNU-specific calls have been implemented:
  iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into()
- Support for GNU's //IGNORE suffix has been added.
- The "-" argument for stdin is now recognized in iconv(1) as per POSIX.
- The Big5 conversion module has been fixed.
- The iconv.h header files is supposed to be compatible with the
  GNU version, i.e. sources should build with base iconv.h and
  GNU libiconv. It also includes a macro magic to deal with the
  char ** and const char ** incompatibility.
- GNU compatibility: "" or "char" means the current local
  encoding in use
- Various cleanups and style(9) fixes.

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
Sponsored by:	Google Summer of Code 2009
2011-02-25 00:04:39 +00:00
Remko Lodder
71e4f6595b Add wording about the priority range and
mention what effect this has at certain
values.

PR:		124469
Obtained from:	NetBSD nice.1 v1.14
MFC after:	1 week
2011-02-24 16:13:33 +00:00
Rebecca Cran
974206cf70 Fix typos - remove duplicate "is".
PR:		docs/154934
Submitted by:	Eitan Adler <lists at eitanadler.com>
MFC after:	3 days
2011-02-23 09:22:33 +00:00
Ulrich Spörlein
423102c6fa Flesh out WITHOUT_GROFF support to DTRT.
A full featured groff is required during buildworld, so build it always
and don't rely on it being present on the host system.

vgrind(1) is tightly coupled to a roff processor and will not be
built/installed when groff is disabled. Also much of the roff'ed
documentation under share/doc will not be built/installed when
WITHOUT_GROFF is defined.

Reviewed by:	ru (partial)
2011-02-22 08:13:49 +00:00
Ulrich Spörlein
3dfe8ce942 Teach tools/install.sh the -d directory mode.
Sync up with flags understood by install(1) [1], and make install(1)'s
usage output not hide the clearly documented -M flag.

PR:		misc/154739 [1]
Submitted by:	arundel
2011-02-22 08:07:17 +00:00
Rebecca Cran
6bccea7c2b Fix typos - remove duplicate "the".
PR:	bin/154928
Submitted by:	Eitan Adler <lists at eitanadler.com>
MFC after: 	3 days
2011-02-21 09:01:34 +00:00
Dimitry Andric
2754fe609d Upgrade our copy of llvm/clang to r126079, from upstream's trunk.
This contains many improvements, primarily better C++ support, an
integrated assembler for x86 and support for -pg.
2011-02-20 19:33:47 +00:00
Sergey A. Osokin
11b3cbc224 Replace hard-coded value by Julian2Gregorian converter function. 2011-02-18 13:41:45 +00:00
Sergey A. Osokin
49540251bd Fix the beginning day of the Great Lent, it starts on Monday for 7 weeks before Paskha.
Fix the Exaltation of the Holy Cross day.
Add more Twelve holidays (dvunadesyatye prazdniki).
2011-02-17 12:21:14 +00:00
John Baldwin
ad01891403 Properly check for errors from waitpid().
Submitted by:	gcooper
MFC after:	1 week
2011-02-15 12:42:18 +00:00
Doug Barton
4939927762 Synthesize the change from NetBSD's 1.33:
"Do not crash if a date cannot be represented (localtime returning
NULL), use the Epoch value instead."

Obtained from:  njoly@NetBSD.org
2011-02-11 05:33:35 +00:00
Sergey A. Osokin
b24cc00190 Always convert Paskha day from Julian (old) to Gregorian (new) style by
adding 13 days.  Bug introduced in 1.13 revision.
2011-02-09 06:38:32 +00:00
Sergey A. Osokin
2aa2451972 Fix Paskha and Paskha-specific holidays. 2011-02-09 05:30:38 +00:00
Glen Barber
252b39bfa2 Update manpage to remove CRT reference.
PR:		154441
Submitted by:	Ben Haga (bhaga of absoludicrous com)
Suggestion by:	pluknet
Approved by:	keramida (mentor)
MFC after:	3 days
2011-02-07 22:33:39 +00:00
Jaakko Heinonen
96a7586b7d - Use LINE_MAX from limits.h as the maximum line length instead of
BUFSIZ. Use LINE_MAX * 2 as the buffer size (BSIZE).
- Error out if we encounter a line longer than LINE_MAX. The previous
  behavior was to silently split long lines and produce corrupted
  output.

PR:		bin/151384
2011-02-07 18:10:18 +00:00
Jaakko Heinonen
a373cd6a6f Handle EOF when skipping lines. 2011-02-07 18:05:56 +00:00
Jilles Tjoelker
12dacf622b Make sys_signame upper case.
This matches the constants from <signal.h> with 'SIG' removed, which POSIX
requires kill and trap to accept and 'kill -l' to write.

'kill -l', 'trap', 'trap -l' output is now upper case.

In Turkish locales, signal names with an upper case 'I' are now accepted,
while signal names with a lower case 'i' are no longer accepted, and the
output of 'killall -l' now contains proper capital 'I' without dot instead
of a dotted capital 'I'.
2011-02-04 16:40:50 +00:00
Ulrich Spörlein
200520dfce Fix typo in example getopt(1) script: $i vs $1 [1]
While here apply style hammer.

PR:		docs/154289 [1]
Submitted by:	Jamie Landeg Jones <jamie@bishopston.net>
MFC after:	1 week
2011-01-26 18:43:15 +00:00
Dmitry Chagin
718f2aed09 Add -H flag to print thread id. 2011-01-26 06:36:14 +00:00
John Baldwin
c06b9dd0c0 Remove dead code.
MFC after:	2 weeks
2011-01-25 22:21:05 +00:00
Ulrich Spörlein
9b61837ada Use test(1) operators and test for the catpage not being older than the
manpage.

Identical mtimes (as generated by buildworld for these files) precluded
catpages from working.

Approved by:	gordon
2011-01-25 18:32:21 +00:00
Robert Watson
bc211d112d While printing out the WSID and CPU ID only the first time it appears for
each workstream, rather than on every protocol, is prettier, it makes
machine-parsing of netstat -Q output a lot harder.  Repeat the information
and hope that the user forgives us slightly dense formatting.

MFC after:	3 days
Reported by:	bz
Sponsored by:	Juniper Networks
2011-01-24 10:58:36 +00:00