Commit Graph

10017 Commits

Author SHA1 Message Date
Attilio Rao
521ea19d1c - Remove the eintrcnt/eintrnames usage and introduce the concept of
sintrcnt/sintrnames which are symbols containing the size of the 2
  tables.
- For amd64/i386 remove the storage of intr* stuff from assembly files.
  This area can be widely improved by applying the same to other
  architectures and likely finding an unified approach among them and
  move the whole code to be MI. More work in this area is expected to
  happen fairly soon.

No MFC is previewed for this patch.

Tested by:	pluknet
Reviewed by:	jhb
Approved by:	re (kib)
2011-07-18 15:19:40 +00:00
Martin Matuska
f5f8627da8 Fix accidential commit part:
Include "bsdtar_platform.h" instead of "lafe_platform.h"

MFC after:	2 weeks
2011-07-17 21:57:10 +00:00
Martin Matuska
1d9b2fdb21 Append to CPIO_SRCS instead of using TAR_SRCS,
the variable name is misleading

MFC after:	2 weeks
2011-07-17 21:52:55 +00:00
Martin Matuska
f305d4bef7 Update bsdcpio to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by:	kientzle
MFC after:	2 weeks
2011-07-17 21:42:22 +00:00
Martin Matuska
2ad1419f1b Update bsdtar to 2.8.4
Use common code from lib/libarchive/libarchive_fe

Approved by:	kientzle
MFC after:	2 weeks
2011-07-17 21:33:15 +00:00
Dimitry Andric
17a519f92f Upgrade our copy of llvm/clang to r135360, from upstream's trunk. 2011-07-17 19:51:40 +00:00
Doug Barton
25630ba729 bmake and other updates necessary for the BIND 9.8.x upgrade.
This includes a structural change regarding atomic ops. Previously they
were enabled on all platforms unless we had knowledge that they did not
work. However both work performed by marius@ on sparc64 and the fact that
the 9.8.x branch is fussier in this area has demonstrated that this is
not a safe approach. So I've modified a patch provided by marius to
enable them for i386, amd64, and ia64 only.
2011-07-16 11:20:54 +00:00
John Baldwin
b225f36e26 Revert 130163 and let top use KERN_PROC_PROC when individual threads are
not displayed.  The KERN_PROC_PROC sysctl was fixed in 188764.
2011-07-15 17:23:45 +00:00
Edward Tomasz Napierala
85a2f1b4f2 Rename resource names to match these in login.conf. 2011-07-14 19:18:17 +00:00
Bjoern A. Zeeb
1080a2c85d Remove semaphore map entry count "semmap" field and its tuning
option that is highly recommended to be adjusted in too much
documentation while doing nothing in FreeBSD since r2729 (rev 1.1).

ipcs(1) needs to be recompiled as it is accessing _KERNEL private
variables.

Reviewed by:	jhb (before comment change on linux code)
Sponsored by:	Sandvine Incorporated
2011-07-14 14:18:14 +00:00
Bjoern A. Zeeb
f4dad666e3 Fix indentation.
Obtained from:	Ed Maste at Sandvine Incorporated
Sponsored by:	Sandvine Incorporated
MFC after:	3 days
2011-07-14 13:47:42 +00:00
Michael Tuexen
62372898d6 Truncate link addresses like it is done for any
other address type.

MFC after: 4 weeks
2011-07-12 11:47:08 +00:00
David E. O'Brien
b0023655af If one's message is longer than the buffer size, then we reset 'cnt' at the
wrong point and the actual column # get out of sync across the buffer size.
2011-07-12 00:31:11 +00:00
Edwin Groothuis
fcc2fa496d Fix run-time breakage when encoutering invalid input-data.
PR:		bin/157718
2011-07-11 22:01:39 +00:00
John Baldwin
51f202e9ed Allow per-CPU statistics to be toggled at runtime via the 'P' key.
While here, make -P a toggle similar to other options such as -I.

Reviewed by:	arundel
MFC after:	1 week
2011-07-11 16:48:52 +00:00
Edwin Groothuis
608be0d0ba Fix typo in order of markup and text. 2011-07-11 10:42:36 +00:00
Edwin Groothuis
f379d691e5 ncal(1) highlights the current date (or a date provided via parameter)
even if stdout is not a tty. If stdout is not a tty the data is
normally processed by other tools and no control sequences are
expected.

PR:		bin/158580
MFC after:	1 week
2011-07-11 10:41:08 +00:00
Edwin Groothuis
5a5bcf88e4 Fix the interpreter for:
Jul/Sat+3       Every third saturday of July - Jul/Sat+3

which was able to be done via:

Jul/SatThird	Every third saturday of July - Jul/SatThird

Add interpreters for:

SatFourth	Every third saturday of each month - SatFourth
Sat+4           Every third saturday of each month - Sat+4
Sat 		Every saturday of each month - Sat

MFC after:	2 weeks
2011-07-11 08:24:36 +00:00
Xin LI
7c9acc776a peeraddr is only used in sizeof() evaluations, so instead of declaring it
a variable, use typedef.

MFC after:	1 month
2011-07-11 05:57:49 +00:00
Xin LI
8dc79f22fa Use %zu when printing size_t.
MFC after:	1 month
2011-07-11 05:50:24 +00:00
Xin LI
d1d6559b08 Match size_t and ssize_t by using %zu and %zd instead of %d.
MFC after:	1 month
2011-07-11 05:46:15 +00:00
Xin LI
a2d5d610cb Use a pair of parentheses to ensure right evaluation order. 2011-07-11 05:40:46 +00:00
Xin LI
682b64839a Use strlcpy().
MFC after:	1 month
2011-07-11 05:31:52 +00:00
John Baldwin
034b7b80b2 Always skip the kernel idle process if requested, it is not specific to
the 'CPU' mode.

PR:		bin/158677
Reported by:	arundel
MFC after:	3 days
2011-07-07 13:37:46 +00:00
Ed Schouten
21632754d6 Only print entries for which ut_host points to a character device.
Now that we use utmpx, we more often have entries for which the ut_line
is left blank. To prevent us from returning struct stat for "/dev/",
check that the resulting stat structure belongs to a character device.
2011-07-05 14:12:48 +00:00
Sergey Kandaurov
2f39985f00 Fix quota(1) output.
- Fix calculation of 1024-byte sized blocks from disk blocks shown when -h
option isn't specified. It was broken with quota64 integration.
- In prthumanval(): limit the size of a buffer passed to humanize_number()
to a width of 5 bytes but allow a shorter length if requested. That's what
users expect.

PR:		bin/150151
Reviewed by:	Kirk McKusick
2011-06-30 09:20:26 +00:00
Sergey A. Osokin
877854f667 Remove needless file due to Russia scraps DST in 2011. 2011-06-28 12:32:24 +00:00
Tim Kientzle
79f67f37a7 The --newer-than test should descend into old
directories to look for new files.

PR:		bin/150890
Submitted by:	Tobias Herre
MFC after:	3 weeks
2011-06-26 17:54:11 +00:00
Joel Dahl
afd03ac8b0 More accurate birthplace. 2011-06-25 19:21:54 +00:00
Tim Kientzle
674e7c4cfd If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

PR:		bin/154407
2011-06-25 16:27:49 +00:00
Kevin Lo
aa7e4bb466 Remove duplicated header files 2011-06-24 07:18:44 +00:00
Craig Rodrigues
f6c506d9cf Acknowledge Edwin Groothuis for the major rewrite he
did of the tftpd and tftp code to support TFTP blocksize.
2011-06-24 05:41:38 +00:00
Craig Rodrigues
fcaab598e0 Update references to RFC's that the newer TFTP implementation supports. 2011-06-22 23:26:04 +00:00
Craig Rodrigues
b68628c826 Bump date.
Document the following commands which were added in the new TFTP implementation:
blocksize, blocksize2, packetdrop, options, rollover
2011-06-22 22:55:51 +00:00
Xin LI
71024a974d Eliminate unneeded headers. 2011-06-21 20:44:06 +00:00
Xin LI
b561579962 Remove unneeded headers.
MFC after:	2 weeks
2011-06-21 20:36:10 +00:00
Xin LI
cde9717b67 Staticify cleanup() which is not referenced in other places.
MFC after:	2 weeks
2011-06-21 20:33:55 +00:00
Gavin Atkinson
cc361f6598 Merge tnftp-20100108 from the vendor branch into head.
PR:		bin/112288 bin/120256 bin/129014 bin/145528
MFC after:	1 month
2011-06-20 08:00:32 +00:00
Jilles Tjoelker
1696274411 fuser: Fix skipping "SIG" on signal names (-s).
The code did  !strncasecmp(str, "sig", 4)  which is not useful.

Also change "sig" to "SIG" matching the uppercase signal names as of
r218285. This has little effect because fuser does not enable locale.
2011-06-18 21:53:36 +00:00
Ben Laurie
5f301949ef Fix clang warnings.
Approved by:	philip (mentor)
2011-06-18 13:56:33 +00:00
Ed Schouten
c3f1b3ae09 Let the size of the namebuf depend on the size of the ut_user field. 2011-06-18 07:47:15 +00:00
Ed Schouten
9f0c9022c2 Add WITHOUT_UTMPX switch to the build system.
This knob removes the tools that are exclusively used to view and
maintain the databases maintained by utmpx, namely last, users, who,
wtmpcvt, ac, lastlogin and utxrm.

The tool w is not in this list, because it has some other functionality
which is unrelated to utmpx; it is hardlinked to the uptime tool.
2011-06-17 21:30:21 +00:00
Alexander Leidinger
b66e74b695 Add 2-clause BSD license.
Approved by:	David Kirchner <dpk@dpk.net> (initial author)
Requested by:	Otto Moerbeek <otto@drijf.net>
MFC after:	1 week
2011-06-17 06:12:28 +00:00
Craig Rodrigues
e5660633d3 Clarify that the TFTP blocksize (RFC2348) or non-standard
TFTP rollover option can be used to transfer larger files.
2011-06-16 02:27:05 +00:00
Craig Rodrigues
f4b7e64d7a Specify correct RFC2347 for TFTP options in diagnostic message. 2011-06-16 02:16:53 +00:00
Tai-hwa Liang
6ab780e5f0 Using statfs.f_fstypename rather than statfs.f_type whilst performing fstype
comparsion as nullfs will copy f_type from underlayer FS.

PR:		bin/156258
Submitted by:	Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
MFC after:	1 month
2011-06-13 05:22:07 +00:00
Dimitry Andric
bd5abe1968 Upgrade our copy of llvm/clang to r132879, from upstream's trunk. 2011-06-12 18:01:31 +00:00
Gabor Kovesdan
69a6d1985d - Use REG_NOSUB to bypass submatch counting when not necessary. This may
yield in somewhat better performance in a few cases.

Approved by:	delphij (mentor)
2011-06-12 12:51:58 +00:00
Gabor Kovesdan
cbe6b9e50f - Fix -w behavior
- Make -F and -w work together
- Fix --color to colorize all of the matches

PR:		bin/156826
Submitted by:	Yuri Pankov <yuri.pankov@gmail.com>
Approved by:	delphij (mentor)
2011-06-12 12:44:02 +00:00
Chris Rees
63ddf8edfe Add self to calendar
Approved by:	rene (mentor)
2011-06-11 21:26:12 +00:00
Julien Laffaye
d3edd193e0 - Add myself to calendar.freebsd
- Add the forgotten relation to mentors in committers-ports.dot

Approved by:	bapt@ (mentor)
2011-06-07 09:06:15 +00:00
Ed Schouten
48a16a34d8 Remove redundant assignments to WARNS.
For these directories, WARNS is already implied to be 6.
2011-06-06 20:24:17 +00:00
Glen Barber
b6654957c3 Attempt to clear up some confusion in the following example, by stating
the '-c' argument is passed to the shell, not to su(1), which would
indicate the login class.

	'su -m <user> -c <command>'

Submitted by:	Warren Block <wblock@wonkity.com> (followup to 157078)
MFC after:	5 days
2011-06-06 19:33:19 +00:00
Dmitry Chagin
27242311a3 Fix regex for ptraceopname().
PR:		bin/157663
Submitted by:	jason wright <jason@thought.net>
MFC after:	10 days
2011-06-06 19:00:38 +00:00
Glen Barber
a53dafae57 Bump date from previous commit. :(
MFC after:	5 days
2011-06-06 15:21:53 +00:00
Glen Barber
4af4a110a7 Document that when running 'su -m <user> -c <command>', <command> is run
within a shell as <user>.

PR:		157078
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	5 days
2011-06-06 15:17:55 +00:00
Jaakko Heinonen
0aa7541b66 Pass correct size to write(2).
PR:		bin/155915
Submitted by:	John Levine
MFC after:	2 weeks
2011-06-06 13:50:29 +00:00
Jilles Tjoelker
535d7745a8 find: Exit if there is an unknown option.
Ignoring the parameter with the unknown options is unlikely to be what was
intended.

Example:
  find -n .

Note that things like
  find -n
already caused an exit, equivalent to "find" by itself.
2011-06-04 21:59:55 +00:00
Ruslan Ermilov
a6a3e8561d When MANCOLOR environment variable is set, enable ANSI color escapes
in grotty(1).  This makes it possible to view colorized manpages in
color.

When MANPAGER environment variable is set, use it instead of PAGER.

Why another environment variable, one might ask?  With color output
enabled, both a terminal and a pager should support the ANSI color
escapes.  On a supporting terminal, less(1) with option -R would be
such a pager, while "more -s" (the current default pager for man(1))
will show garbage.  It means a different default pager is needed when
color output is enabled, but many people have PAGER set customary,
and it's unlikely to support ANSI color escapes, so introducing yet
another variable (MANPAGER) seemed like a good option to me:

- if MANPAGER is set, use that unconditionally;

- if you disable color support (it is by default), and don't set
  MANPAGER, you get an old behavior: -P pager, $PAGER, "more -s",
  in that order;

- if you enable color support (by setting MANCOLOR), and don't set
  MANPAGER, we ignore PAGER which is unlikely to support ANSI color
  escapes, and you get: -P pager, "less -Rs", in that order;

- you might have good reasons for different man(1) and general
  purpose pagers;

- later versions of GNU man(1) support MANPAGER.
2011-06-03 14:34:38 +00:00
Ruslan Ermilov
b70e20257c Don't use col(1) since grotty(1) never outputs reverse line feeds,
and because col(1) mangles ANSI color escapes if enabled.  Spaces
to tabs compression is now done by passing -h to grotty(1).

Discussed with:	uqs
2011-06-03 13:45:11 +00:00
Ruslan Ermilov
a1528c80a5 Trim more when parsing MANCONFIG directive. 2011-06-03 05:56:52 +00:00
Ruslan Ermilov
1030a67f5b Typo. 2011-06-03 05:16:54 +00:00
Ruslan Ermilov
a00944499f Added support for the MANWIDTH environment variable:
If set to a numeric value, used as the width manpages should be
displayed.  Otherwise, if set to a special value ``tty'', and
output is to a terminal, the pages may be displayed over the
whole width of the screen.
2011-06-03 05:16:33 +00:00
Ulrich Spörlein
3d12096812 Fix man -t by not passing grotty flags to groff when grotty is not
involved.

This fixes a regression introduced with r221303.

Noticed by:	jilles
2011-06-02 10:18:49 +00:00
Ulrich Spörlein
135bce2a9e mdoc: reorder sections consistently 2011-06-02 09:56:53 +00:00
Ulrich Spörlein
b2e52ced25 mdoc: fix markup 2011-06-02 09:56:42 +00:00
Warner Losh
f471745a98 Fix a couple of spelling errors.
Submitted by:	bcr@
2011-05-31 16:59:14 +00:00
John Baldwin
35b23f5d86 - Document the -H option and 'H' key alongside other options and keys
rather than at the bottom of the manpage.
- Remove an obsolete comment about SWAIT being a stale state.  It was
  resurrected for a different purpose in FreeBSD 5 to mark idle ithreads.
- Add a comment documenting that the SLEEP and LOCK states typically
  display the name of the event being waited on with lock names being
  prefixed with an asterisk and sleep event names not having a prefix.

MFC after:	1 week
2011-05-31 15:41:10 +00:00
John Baldwin
c9385548e7 Add a new option to toggle the display of the system idle process (per-CPU
idle threads).  The process is displayed by default (subject to whether or
not system processes are displayed) to preserve existing behavior.  The
system idle process can be hidden via the '-z' command line argument or the
'z' key while top is running.  When it is hidden, top more closely matches
the behavior of FreeBSD <= 4.x where idle time was not accounted to any
process.

MFC after:	2 weeks
2011-05-31 15:11:23 +00:00
Jilles Tjoelker
27a43b2e51 printf(1): Document that %c and precision for %b/%s use bytes, not chars.
This means these features do not work as expected with multibyte characters.

This perhaps less than ideal behaviour matches printf(3) and is specified by
POSIX.
2011-05-28 14:32:47 +00:00
Jilles Tjoelker
98102dabd3 printf: Allow multibyte characters for '<char> form, avoid negative codes.
Examples:
  LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
  LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.

Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.

Note that there is no general way to go back from the character code to the
character.
2011-05-28 11:37:47 +00:00
Jilles Tjoelker
702b4f04ea find: If a part of an expression is unknown, do not call it an option.
Although most of the primaries and operators start with "-", they are not
options.

Examples:
  find . -xyz
  find . -name xyz -or bad

MFC after:	1 week
2011-05-27 22:14:49 +00:00
Edward Tomasz Napierala
7e2548ae0a Remove definitions for RACCT_FSIZE and RACCT_SBSIZE - these two are rather
performance-sensitive and not that useful, so I won't be merging them
before 9.0.
2011-05-27 19:57:58 +00:00
Aleksandr Rybalko
141fa00b5f Added myself as src committer.
Approved by: adrian (mentor)
2011-05-26 13:54:07 +00:00
Xin LI
5106ce89d0 Fix a regression introduced with previous changeset: if output is stdout,
do not check for symbolic link.
2011-05-25 18:04:11 +00:00
Ruslan Ermilov
a6d11f7139 [mdoc] Fixed .Dt call. 2011-05-25 14:13:53 +00:00
David E. O'Brien
a23d1c70b3 Build and install a BSD licensed grep.
If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be
'[ef]grep'.  Otherwise, BSD-grep will be the grep family, and GNUgrep
will be 'gnugrep'.

Discussed with: brooks
2011-05-25 01:04:12 +00:00
Robert Watson
8f092df025 Teach netstat(1) about the new global netisr policy sysctl,
net.isr.dispatch, and about per-protocol dispatch policies.

MFC after:	3 weeks
Reviewed by:	bz
Sponsored by:	Juniper Networks, Inc.
2011-05-24 12:38:00 +00:00
Ruslan Ermilov
71737f5a06 Ensure there is a whitespace after a mount point.
PR:		157286
Submitted by:	Marcus Reid
MFC after:	3 days
2011-05-24 06:56:40 +00:00
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