Commit Graph

7989 Commits

Author SHA1 Message Date
Robert Watson
df0c8868b1 Add "-s" argument to kdump to suppress the display of I/O data.
MFC after:	1 week
2005-11-12 14:21:48 +00:00
Greg Lehey
b2f9e51241 Look through ext2fs file systems as well as ufs.
This should almost certainly be extended to other local file systems
as well (ntfs springs to mind), but I don't have the ability to test
it.
2005-11-12 12:45:08 +00:00
Ruslan Ermilov
b5f6749117 Align output. 2005-11-09 15:12:57 +00:00
Tim Kientzle
b3d17b1474 Edit pathnames for -x but not for -t. Otherwise, people get confused
when list the archive contents, then try to extract selected files
(file selection always works against unedited pathnames).  With this change,
-t always shows the pathnames as they appear in the archive.

Thanks to: Robert Watson
2005-11-06 22:53:51 +00:00
Christian S.J. Peron
997591ca96 Un-break processing of device major/minor values with fstat -n. We do
this by accessing the cdev_priv element of the cdev structure. Looking
forward we need a better way to handle this, as this structure shouldn't
be frobbed by userspace.

Submitted by:	Doug Steinwand
PR:		bin/88203
MFC after:	1 week
Discussed with:	phk
2005-11-05 23:38:08 +00:00
Maxim Konovalov
f1621f9999 o Update list of holidays in Russia.
Submitted by:	osa
MFC after:	1 week
2005-11-02 09:22:28 +00:00
John Polstra
dd6dea0974 Fix an erroneous description of the file descriptor assignments for
the "~C" command.

MFC After:	1 week
2005-11-02 05:47:49 +00:00
Tom Rhodes
cc22380491 Xref setlocale(3), bump document date. 2005-11-01 19:36:17 +00:00
Robert Watson
a9ac598b36 Add a "-H" argument to kdump, which causes kdump to print an additional
field holding the threadid.  This is more useful for libthr than
libpthread, but still quite useful in libpthread as it can be used to
process interlaced records from multiple threads over the course of a
system call.

Detect old ktr_buffer values using the heuristic "if it's negative,
then it must not be a valid threadid".  This may leave something to be
desired.

MFC after:	1 month
Reviewed by:	davidxu
2005-11-01 14:48:23 +00:00
Tim Kientzle
5df2705458 In mode 'u', check for an error return from archive_read_open.
This causes attempts to update a non-existent file to report
an actual error instead of triggering an assertion failure.

PR: bin/87911
Thanks to: roemer.ulrich
MFC after: 3 days

Note: This does not entirely fix bin/87911.  I need to decide on
the "correct" response when someone tries to update a non-existent
archive file.
2005-11-01 06:41:05 +00:00
Tim Kientzle
e8e12ab4e1 Include <sys/param.h> in order to get current __FreeBSD_version
in order to properly set HAVE_NL_LANGINFO.  <whew!>

Thanks to: Andrey Chernov
PR: bin/88013
MFC after: 3 days
2005-11-01 05:53:16 +00:00
Tim Kientzle
a6afb4f5dc Spell "--format" correctly in error message. (It hasn't been
called "-F" for a very long time.)

PR: bin/86915
Thanks to: Gary W. Swearingen
MFC after: 3 days
2005-11-01 05:48:02 +00:00
Aaron Dalton
5fd18d706e new committer: added my birthday to the calendar
Approved by: tobez
2005-10-30 21:02:09 +00:00
Ruslan Ermilov
2ad08c56d8 Add some significant Ukrainian dates.
PR:		88076
Submitted by:	Andriy Gapon
2005-10-28 21:25:28 +00:00
John Baldwin
444ec0d5f5 Fix misspelled 'argument' and try to make the sentence into English.
Submitted by:	Andre Guibert de Bruet andy at siliconlandmark dot com
2005-10-26 17:37:54 +00:00
Colin Percival
923e7a09b0 Use the "builtin" shell function to make sure that the requested
command is handled as a shell function.  This avoids the following
peculiar behaviour when /usr/bin is on a case-insensitive filesystem:
    # READ foo
(... long pause, depending upon the amount of swap space available ...)
    sh: Resource temporarily unavailable.

Reported by:	I can't remember; someone on IRC.
MFC after:	1 week
2005-10-24 22:32:19 +00:00
Tim J. Robbins
e21dde7b1d Document incorrect handling of multibyte characters.
PR:		87724
2005-10-23 01:37:25 +00:00
Max Laier
e5134d2e82 Fix obvious copy'n'paste-O in rev.1.36 While here nit style.
PR:		bin/87783
Submitted by:	Mats Palmgren
MFC after:	1 week
2005-10-22 17:50:45 +00:00
Stefan Farfeleder
2110d9c31a Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR:	86355
2005-10-19 15:37:43 +00:00
Ruslan Ermilov
fd9070970c Make sure that files included using ".include <foo>" are really
looked for in the system make file directory or in the specified
-m paths instead of always looking in the other -I and .PATH
specified paths.  (Commit log shamelessly stolen from NetBSD.)

Reviewed by:	yar
2005-10-17 15:56:26 +00:00
Andre Oppermann
a21cbcb876 Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)
instead of subtracting 'bootime' from 'now'.

Sponsored by:	TCP/IP Optimization Fundraise 2005
2005-10-17 15:37:22 +00:00
Alfred Perlstein
6a6567612d The kernel accepts sockaddrs with len set to zero for sockaddr_in
types, so refactor the code here to grab them when length is zero.
2005-10-15 06:17:29 +00:00
Yaroslav Tykhiy
aeb2a851ad Revise the manpage to a certain extent, mostly with respect to
make's processing of top-level and included makefiles.  Point
out at make.conf(5) and __MAKE_CONF when telling about sys.mk.

Reviewed by:	ru
2005-10-14 23:54:20 +00:00
Ruslan Ermilov
f329a1513a Style: move .PATH to where it belongs. 2005-10-14 15:50:22 +00:00
Yaroslav Tykhiy
9c4e83a46c __MAKE_CONF doesn't really belong here because it is
a FreeBSD extension of sys.mk.  A xref to make.conf(5)
will be enough here.

Requested by:	ru
2005-10-12 10:09:36 +00:00
Yaroslav Tykhiy
253c3c7312 Clarify the usage and effects of sys.mk, make.conf(5), and __MAKE_CONF.
MFC after:	2 weeks
2005-10-10 14:49:55 +00:00
Scott Long
1030a78a12 Make sure that the created fifo gets deleted if the top level make instance
exits due to a signal.
2005-10-09 06:36:51 +00:00
Christian S.J. Peron
cc2a9f52a7 Finish off style(9) fixes which I started two revisions ago. This basically
changes the indentation style from 4 spaces to 8 spaces which we expect to
see in other FreeBSD source files.
2005-10-09 04:45:41 +00:00
Bruce Evans
762116ae25 Catch up with increasing the resolution suitable for high-res kernel
profiling from microseconds to nanoseconds in 1996.  Picoseconds are
already needed.

Describe the choice of units for the per-call times in detail.
2005-10-07 11:58:46 +00:00
Christian S.J. Peron
45edbdccd7 Do not ignore ENOENT
Pointed out by:	Amir Shalem
2005-10-07 11:49:27 +00:00
Bruce Evans
0b146898f0 Improve printing of self times in the flat profile for functions that
appear to be never called:

(1) If a function is never called according to its call count but it
    must have been called because its child time is nonzero, then print
    it in the flat profile.  Previously, if its call count was zero
    then we only printed it in the flat profile if its self time was
    nonzero.

(2) If a function has a zero call count but has a nonzero self or child
    time, then print its total self time in the self time per call
    column as a percentage of the total (self + child) time.  It is
    not possible to print the times per call in this case because the
    call count is zero.  Previously, this was handled by leaving both
    per-call columns blank.  The self time is printed in another column
    but there was no way to recover the total time.

(1) partially fixes the case of the "never called" function main() and
prepares for (2) to apply to main() and other functions.  Profiling
of main() was lost in the conversion from a.out to ELF, so main()'s
call count has always been zero for many years; then in the common
case where main() is a tiny function, it gets no profiling ticks, so
main() was completely lost in the flat profile.

(2) improves mainly cases like kernel threads.  Most kernel threads
appear to be never called because they are always started before
userland can run to turn on profiling.  As for main(), the fact that
they are called is not very interesting and their callers are
uninteresting, but their relative self time is interesting since they
are long-running.

Almost always printing percentages in the per-call columns would be
more useful than almost always printing 0.0ms.  0.1ms is now a long
time, so only very large functions take that long per call.  The accuracy
per call can approach 1-10 nsec provided programs are run for about
100000 times as long as is necessary to get this accuracy with high
resolution kernel profiling.
2005-10-07 10:59:41 +00:00
Yaroslav Tykhiy
e53e5e56d9 Sync usage screen with manpage.
MFC after:	5 days
2005-10-07 10:18:44 +00:00
Yaroslav Tykhiy
6fcf85bc95 Document the -d flag to mail(1) better, which comes handy when
you want to see, e.g., sendmail arguments mail(1) will use.

-H is not an independent flag, it's a modifier.  Also explicitly
say that -H will cause mail(1) to exit as soon as it prints the headers.

MFC after:	5 days
2005-10-07 10:16:41 +00:00
Emanuel Haupt
b8b9c6fe06 Adding myself to calendar.freebsd
Approved by:	novel (mentor)
2005-10-06 19:16:55 +00:00
Christian S.J. Peron
4ccbe0c50d Un-break handling of -t 0 which was broken in my previous commit.
Add a flags argument to wait_for_lock so that O_NONBLOCK can be
passed to open if a user doesn't want the open to sleep until the
lock becomes available.

Submitted by:	Amir Shalem (partially modified)
2005-10-05 22:02:07 +00:00
Christian S.J. Peron
031469eb27 Fix long standing race condition associated with how lockf uses open(2)
for mutual exclusion:

A brief description of the problem:

	1) Proc A picks up non-blocking lock on file X
	2) Proc B attempts to pickup lock, fails then waits
	3) Proc C attempts to pickup lock, fails then waits
	4) Proc A releases lock
	5) Proc B acquires lock, release it to pickup a non-blocking version
	6) Proc C acquires lock, release it to pickup a non-blocking version
	7) Both process B and C race each other to pickup lock again

This occurs mainly because the processes do not keep the lock after they have
been waiting on it. They drop it, attempt to re-acquire it. (They use the wait
to notify when the lock has become available then race to pick it up). This
results in additional CPU utilization during the race, and can also result
in processes picking locks up out of order.

This change attempts to correct this problem by eliminating the test/acquire
race and having the operating system handle it.

Reported by:	kris
Tested by:	kris
MFC after:	1 week
2005-10-05 17:39:15 +00:00
Gary W. Swearingen
f0ab9f7b39 A minor overhaul: added comments, split cmds in 2, changed synopsis.
Split commands into two groups: one with optional count and one with
required argument.  Changed synopsis line accordingly.

Added some hopefully-helpful comments based on experiments, knowing
that not all hardware works the same.

PR:             docs/84101
Approved by:    keramida
MFC after:      3 days
2005-09-30 17:31:39 +00:00
Ruslan Ermilov
7fc550064a Oops, revert last commit (the manpage is still built in objdir). 2005-09-28 07:54:18 +00:00
Ruslan Ermilov
ec2cc32689 Add NO_OBJ. 2005-09-28 07:49:30 +00:00
Max Laier
b6de9e91bd Remove bridge(4) from the tree. if_bridge(4) is a full functional
replacement and has additional features which make it superior.

Discussed on:	-arch
Reviewed by:	thompsa
X-MFC-after:	never (RELENG_6 as transition period)
2005-09-27 18:10:43 +00:00
Gleb Smirnoff
7c23a867f7 - Print space character in show_stat(). Remove a lot of priuntf(" ").
- Utilize show_stat() in sidewaysintpr() loop. This makes periodic
  statistics to honor -h flag.
2005-09-27 10:42:02 +00:00
Ruslan Ermilov
762fcdcf7d Remove redundant `\&' escapes. 2005-09-27 08:06:21 +00:00
Ruslan Ermilov
0b13db0306 Fixup previous commit. 2005-09-27 08:02:03 +00:00
Poul-Henning Kamp
1b56a319fe Please ship the pointy hat to its home position. 2005-09-26 22:07:59 +00:00
Poul-Henning Kamp
c711b5fe88 Update coordinates for "mph" hash generator now that it lives in ports. 2005-09-26 20:34:21 +00:00
Poul-Henning Kamp
2e5ee2bfac Add a .sinclude directive which does the exact same as .include, except
whine when the file cannot be found and opened.
2005-09-26 20:31:00 +00:00
Tim Kientzle
512c45ef6c Fix -u with absolute paths (e.g., "tar -uf foo.tar /bar") by handling
pathname edits before comparing pathnames on disk to those in the archive.

Thanks to: Gareth Bailey, Lowell Gilbert
2005-09-24 21:19:57 +00:00
Tim Kientzle
2f3b67647f Detect Mac OS X's broken ACL library.
Thanks to: Diego "Flameeyes" Petten?
2005-09-24 21:17:47 +00:00
Stefan Farfeleder
7c4847b792 The function inplace_edit() doesn't exist anymore, remove the prototype.
Submitted by:	Leonardo Chiquitto Filho
2005-09-24 13:18:30 +00:00
Marcus Alves Grando
8008bfe18b Add myself to FreeBSD calendar
Approved by:	pav (mentor)
2005-09-23 13:06:23 +00:00
Ruslan Ermilov
05248e759b Fix vgrind(1) indexing I broke in previous revision.
PR:		bin/86343
Submitted by:	Matej Vela <vela@debian.org>
2005-09-23 12:55:22 +00:00
Kirill Ponomarev
4e099ef9d9 Frank Lloyd Wright birth year is 1867, not 1869.
PR:		conf/82051
Submitted by:	Derek Jones <derek at wahila dot com>
2005-09-23 12:02:27 +00:00
Kirill Ponomarev
bb569d6301 Fix typo, FRG and GDR became UNO members in 1973, not in 1993.
PR:		conf/86193
Submitted by:	Matthias Buelow <mkb at incubus dot de>
2005-09-23 11:58:16 +00:00
Tim Kientzle
c114cc6c3f Style fix: Correct a compiler warning from GCC 4
Thanks to: Divacky Roman
PR: bin/84993
2005-09-21 03:21:35 +00:00
Diomidis Spinellis
d2e4ea2a51 Setting .nofinger will not hide you from root. 2005-09-19 10:11:47 +00:00
R. Imura
59fa708298 Connect smbfs build on powerpc. 2005-09-19 08:13:43 +00:00
Christian S.J. Peron
8729849a45 Use is '-' to imply that the flag is not set, rather than '.'. 2005-09-15 16:09:24 +00:00
Christian S.J. Peron
6f798df578 Print a warning if we fail to retrieve the process name for any reason. 2005-09-13 23:11:16 +00:00
Christian S.J. Peron
15f3d81f9c If there are'nt any bpf descriptors to process than dont bother attempting to
retrieve statistic information for them.

Pointed out by:	Pawel Worach < pawel.worach at gmail.com >
2005-09-13 22:13:01 +00:00
Christian S.J. Peron
48d91509de Free the bpf descriptor array after we are done with it. This probably isnt
that critical as the program exits after this point anyway, but this may
not always be the case.
2005-09-07 19:28:01 +00:00
Christian S.J. Peron
5dbd2da153 Update usage to reflect the new option.
Pointed out by:	ru
2005-09-07 19:15:43 +00:00
Gary W. Swearingen
25b20fc0b2 Several changes: Added a BUGS section with several bugs. And
--  Made the synopses more precise.
--  Added argument to flag in option description.
--  Moved -b default and limits to option description (to un-hide).
--  Noted several behaviors that were not mentioned.
--  A few more trivial changes.

PR:             docs/46787
Approved by:    keramida
MFC after:      3 days
2005-09-07 18:40:09 +00:00
Christian S.J. Peron
6b463eed3a Merge bpfstat's functionality into the netstat(1) utility. This adds
a -B option which causes bpf peers to be printed. This option can be
used in conjunction with -I if information about specific interfaces
is desired. This is similar to what NetBSD added to their version of
netstat.

$ netstat -B
  Pid  Netif  Flags      Recv      Drop     Match Sblen Hblen Command
 1137    lo0 p--s--         0         0         0     0     0 tcpdump
  205   sis0 -ifs-l     37331         0         1     0     0 dhclient
$

$ netstat -I lo0 -B
  Pid  Netif  Flags      Recv      Drop     Match Sblen Hblen Command
 1174    lo0 p--s--         0         0         0     0     0 tcpdump
$

-Add bpf.c which stores all the code for retrieving and parsing bpf
 related statistics.
-Modify main.c to add support for the -B option and hook it into the
 program logic.
-Add bpf.c to the build.
-Document this new functionality in the man page and bump the revision
 date.
-Add prototype for bpf_stats function.
2005-09-07 17:35:16 +00:00
Ralf S. Engelschall
60fc1eb79c Mention that uuidgen(1) generates DCE version 1 UUIDs only 2005-09-07 07:49:21 +00:00
Hartmut Brandt
724b6284e3 Fix the type of the variable 'debug'. It is used as a bitmap, so the
type should be int rather than Boolean.

PR:		bin/84528
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
MFC after:	3 weeks
2005-09-07 07:34:24 +00:00
Stefan Farfeleder
848b3d0fd7 In version 1.8 I botched findval()'s type, fix. 2005-09-02 21:51:18 +00:00
Stefan Farfeleder
1e72f11f56 Use socklen_t variables when passing sizes to getsockname() and
getsockopt().
2005-09-02 19:33:50 +00:00
Stefan Farfeleder
b702f91df9 The appropriate argument is -K -1, not -k -1. 2005-09-02 18:37:34 +00:00
Stefan Farfeleder
adcd73865c Fix a syntax error in the generated code when invoked with -P. Note that
the generated code still doesn't compile as we lack tinfo, t_getinfo and
friends.
2005-09-02 18:20:47 +00:00
Suleiman Souhlal
02dfd2b299 - Do not allocate memory to entries in /var/rwho which have been down for
more than 4 days - waste of memory.

Obtained from:	DragonFlyBSD (liamfoy)
MFC after:	3 days
2005-09-02 14:58:26 +00:00
Stefan Farfeleder
896cdc310c Stop generating the `register' keyword. 2005-09-02 10:32:05 +00:00
Stefan Farfeleder
15df5e2d43 Don't generate K&R C code. The -C flag is kept for backwards compatibility.
Also remove the SIG_PF macro, there is no need to cast closedown.
2005-09-02 10:23:26 +00:00
Stefan Farfeleder
ec06b5e868 Only write the dispatch table function prototypes to the header if the -h
flag was specified.  If all files are generated at once, those functions are
static and shouldn't appear in the header.

PR:		84450
Reviewed by:	alfred
2005-09-01 19:16:25 +00:00
Stefan Farfeleder
d0cc804bba - Use prototypes in headers.
- Include rpc_scan.h before rpc_util.h for the tok_kind enum.
- Nuke unused declarations.
2005-08-31 20:45:15 +00:00
Stefan Farfeleder
122562cd2b Rename the variable inline' to inline_size'. 2005-08-31 19:44:40 +00:00
Tim J. Robbins
33eafb83b7 Include option-argument names in the list in the DESCRIPTION section.
Remove a non-bug from the BUGS section.
2005-08-30 12:48:28 +00:00
Tim J. Robbins
bb78dba49b Remove undocumented historic support for treating "-" as an option
instead of a file operand; this is not compatible with POSIX.
2005-08-30 12:32:18 +00:00
Paul Saab
13829828e7 Unbreak tail -f on non-local filesystems. 2005-08-26 08:15:57 +00:00
Pawel Jakub Dawidek
70ffddc463 Revert previous behaviour of '-F' option and add '-L' option, which will
tell pkill(1)/pgrep(1) to try to flock(2) pidfile before reading PID from
there.

Discussed with:	jhb, gad
2005-08-25 20:10:47 +00:00
Ollivier Robert
2fa9dad0ef Fixes for gcc 4.x.
PR:             bin/84995
Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
2005-08-25 14:09:35 +00:00
Ollivier Robert
8a0a76b862 Fixes for gcc4.x.
Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
PR:             bin/84991
2005-08-25 13:44:02 +00:00
Pawel Jakub Dawidek
712bf6af16 Modify '-F' option to work nicely with pidfile(3) - a pidfile given as
an argument has to be locked.
2005-08-24 19:38:28 +00:00
Yaroslav Tykhiy
b7cc036298 List -W as one of the meaningful options to the -i (interfaces)
display of netstat(1).

MFC after:	3 days
2005-08-24 12:21:34 +00:00
Brian Somers
e1bfde1b04 Add a -h option to tell cmp not to follow symbolic links.
MFC after:	3 weeks
Sponsored by:	Sophos/ActiveState
2005-08-23 13:13:13 +00:00
Colin Percival
f46417c577 Most users probably aren't interested in locating 13000+ files named
[0-9a-f]{64}, so exclude portsnap's compressed snapshots from locate's
indexing.

Suggested by:	silby
MFC after:	3 days
2005-08-22 08:22:48 +00:00
Tim J. Robbins
e93586df9d Remove the hack that varied the first character of the output file name
if none was specified on the command line. This is not permitted by
POSIX, and no longer needed now that we have the -a option.

PR:		85099
Submitted by:	Toby Peterson (Apple Computer)
2005-08-21 06:35:02 +00:00
Ruslan Ermilov
c6358a5e6f Bail if interface is misspelled instead of falling out into the
"all interfaces" mode.  (Only works with -w, but still better
than nothing.)
2005-08-20 08:34:21 +00:00
Murray Stokely
053018f6ea Correct typos found by ispell. 2005-08-19 00:05:58 +00:00
Gleb Smirnoff
c2dfd19ff0 Add a new switch -h for interface stats mode, which prints all interface
statistics in human readable form.

In collaboration with:	vsevolod
Reviewed by:		cperciva
2005-08-18 21:04:12 +00:00
Stefan Farfeleder
4ed7018006 While revision 1.26 fixed the code to really subtract 3600 due to
daylight-saving, this was actually wrong because mktime() already does that for
us.
2005-08-18 08:18:02 +00:00
Colin Percival
816e551836 Remove the dates from these files. They serve no purpose and result in
these files spuriously changing each time they are built.

Also, add $FreeBSD$ tags, because cvs is unhappy otherwise.
2005-08-17 15:56:04 +00:00
Murray Stokely
103d2a4254 Correct birthdate for Meriwether Lewis. He was born before the
declaration of independence, not after the first world war.
2005-08-17 13:32:18 +00:00
Suleiman Souhlal
639d7cbad1 It's actually 11 minutes when the machine is assumed to be down and removed
from the output.

Obtained from:	DragonFlyBSD
2005-08-07 11:48:44 +00:00
Robert Watson
768528adf6 Use libmemstat(3)'s kvm support for malloc(9) rather than hand-extracting
this information from the core dump.
2005-08-06 13:56:21 +00:00
Poul-Henning Kamp
e73643becb Old habits die hard: Make that .if defined(YES_HESIOD) not .if !defined 2005-08-06 07:41:36 +00:00
Christian S.J. Peron
9baea4b4b4 Change the data type of the upper shared memory limits from a signed
integer to an unsigned long. This lifts variables like the maximum
number of pages available for shared memory from 2^31 to 2^32 on 32
bit architectures, and from 2^31 to 2^64 on 64 bit architectures.

It should be noted that this changes breaks ABI on 64 bit architectures
because the size of the shmmax, shmmin, shmmni, shmseg and shmall members
of the shminfo structure has changed.

Silence on:	current@
2005-08-06 07:20:18 +00:00
Poul-Henning Kamp
f7ab1209d3 Put hesinfo(1) under buildoption "YES_HESIOD" 2005-08-06 06:56:39 +00:00
Colin Percival
9857d3addb Include ../Makefile.inc, since without it programs get installed in the
wrong place.

Pointy hat to:	cperciva
2005-08-06 02:37:21 +00:00
Colin Percival
ba10db9984 Add bsdiff and bspatch to the base system. These are tools for
constructing and applying binary patches; in particular, they perform
well (in the sense of constructing small patches) for executable code.
Both portsnap (coming to the base system Real Soon Now) and FreeBSD
Update (coming to the base system a bit later) use bspatch.

This is the same code as the bsdiff-4.2 which has been in the ports
tree (misc/bsdiff) for the past year, with the following exceptions:
1. The license is now the traditional 2-clause BSD;
2. Instead of forking and execing bzip2, the code now uses libbz2; and
3. Some minor changes have been made to fit this code into the base
system (adding $FreeBSD$ tags, putting bsdiff and bspatch into separate
directories, etc.)

This code is rather ugly and has lots of style bugs (mostly because I
wrote it before I had ever heard of style(9)).  Some day I'll come
back and clean it up.

Discussed on:	freebsd-arch
MFC before:	5.5-RELEASE
Tested by:	Several million users (earlier version).
2005-08-06 01:59:06 +00:00
Poul-Henning Kamp
a00553b3d3 Don't include -lipx twice. 2005-08-05 20:13:09 +00:00
Poul-Henning Kamp
9cc22e5c89 Make IPX support depend on NO_IPX 2005-08-05 18:45:49 +00:00
Poul-Henning Kamp
5a4d78a1f6 Let NO_MAN control catman 2005-08-05 16:09:34 +00:00
Stefan Farfeleder
a3ae5e4ede Use socklen_t where appropriate. 2005-08-05 09:58:49 +00:00
Stefan Farfeleder
4ac45ec4cc Include <err.h> where needed. Add $FreeBSD$ where missing. 2005-08-05 09:07:42 +00:00
Stefan Farfeleder
d41d23e1cd Prefer {u,}intmax_t over the deprecated {u_,}quad_t. 2005-08-05 08:18:00 +00:00
Stefan Farfeleder
3dc44a8992 Don't throw away the adjusted `runtimer' value. 2005-08-05 08:07:02 +00:00
Juli Mallett
dfaacec6ff Call usage() instead of being insolent. 2005-08-05 01:04:36 +00:00
Diomidis Spinellis
d432588e78 Bug fix: a numeric flag specification in the substitute command would
cause the next substitute flag to be ignored.
While working at it, detect and report overflows.

Reported by:	Jingsong Liu
MFC after:	1 week
2005-08-04 10:05:12 +00:00
Poul-Henning Kamp
642268f44a Add NO_CALENDAR 2005-08-03 09:27:01 +00:00
Sean Chittenden
71997d4be4 Cross-reference pw(8) into chpass(1), passwd(1), and vipw(8). 2005-08-02 21:38:03 +00:00
Tim Kientzle
5d596ecb25 The bsdtar_warnc() reporting function requires the program name to be
set up before it is called, so move the progname initialization before
the first possible call to bsdtar_warnc().

Thanks to: Stanislav Sedov
PR: bin/83366
MFC after: 7 days
2005-08-02 03:02:55 +00:00
Robert Watson
c753d56b39 Teach vmstat's domemstat_zone() to use memstat_kvm_uma() when the kvm
descriptor is non-NULL, restoring vmstat -z support for core dumps and
kmem access.  These were broken with the introduction of UMA.
2005-08-01 21:33:17 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Christian S.J. Peron
a4cdc0452a Introduce kdevtoname, which when given the kernel address of a
cdev structure, returns the device name associated with it through
the __si_namebuf member. This un-breaks the processing of devices.

This is a RELENG_6 candidate.

Reviewed by:	phk
2005-07-30 20:00:13 +00:00
Robert Watson
b9dc1340d2 Minor syntax tweaks:
- Remove some extra blank lines.
- Remove comments that don't contribute to understanding.
- Remove additional blank lines in output added to maximize compatibility
  with older vmstat output, but that is actually somewhat gratuitous.

Submitted by:	bde
MFC with:	other vmstat libmemstat(3) changes
2005-07-28 09:45:08 +00:00
Robert Watson
8e73022dda Teach vmstat -m and vmstat -z to use libmemstat(3). Certain
statistics from -z are now a bit different due to changes in the
way statistics are now measured.  Reproduce with some amount of
accuracy the slightly obscure layouts adopted by the two kernel
sysctls.  In the future, we might want to normalize them.

GC dosysctl(), which is now no longer used.

MFC after:	1 week
2005-07-25 22:35:10 +00:00
Dag-Erling Smørgrav
c9275efacc Disable thread support in BIND. It appears to reduce performance rather
than increase it, and seems to be the cause of the memory leaks which some
users have reported.

Requested by:	dougb
MFC after:	5 days
2005-07-25 14:44:11 +00:00
Robert Watson
4f7ac59b50 Since libmemstat(3) now supports its own error management mechanism,
use that instead of trying to use errno, in order to produce a
sensible error message.

MFC after:	1 day
2005-07-24 01:42:42 +00:00
Poul-Henning Kamp
4a7f3dcea5 In 2003, a -s flag was added to ministat to separate the
avg/median/stddev bars onto separate lines for readability if the
ranges overlapped.  In 2005, ministat was extended to support more than
2 datasets, but the -s code was not updated.  It will coredump if run
with -s and >2 sets.

PR:	82909
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
2005-07-21 08:32:56 +00:00
Hartmut Brandt
bc7ab08ab3 Fix the "..." special command. If this command is found all further
commands for this target are appended to the .END target instead
of beeing executed now. They are executed when the graph is finished.
There was a bug with executing the .END target which came in when
doing conversion to LST_FOREACH() which caused make to dump core.

PR:		bin/83698
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
MFC after:	3 days
2005-07-19 07:03:26 +00:00
Garance A Drosehn
9afe6a5bf9 Fix minor memory leak when expanding ${variable}s
Noticed by:	Dave Hart
MFC plans:	after checking with re@
2005-07-18 22:18:16 +00:00
Robert Watson
c8e6b6899a Modify "netstat -mb" to use libmemstat(3) when acting on a live system,
with a number of positive benefits:

- Start using UMA(9) statistics for mbufs and clusters, which avoids
  using the mbuf allocator statistics which suffer from races under
  load on SMP.  This should eliminate "negative" mbuf counts in
  netstat -mb.

- We are now able to track cached (free) mbufs and clusters and count
  it towards memory allocated by the network stack.

- We are now also able to track memory allocated to mbuf tags since
  libmemstat(3) can also query malloc(9).  We don't print this except
  as part of the total (for now - #if 0).

- We are now able to track mbuf/cluster/packet allocation failures,
  although they are not currently printed (#if 0).

- Don't print out sfbuf statistics when running on a kernel core, as
  currently that code is able only to query sysctl for statistics.

MFC after:	1 week
2005-07-18 08:34:15 +00:00
Wolfram Schneider
f7070a400c remove myself as maintainer 2005-07-17 21:19:28 +00:00
Ceri Davies
dd0433a9b7 Note the events of 0707, lest we forget. 2005-07-15 20:11:39 +00:00
Ruslan Ermilov
e46be7ffad Fix loder(1) to work with libraries. This can be useful to
sort long DPADD lists automatically.  While here, recognize
`W' as the global symbol.  This has been tested since 2004.
2005-07-15 15:21:12 +00:00
Renato Botelho
93ed10e7f9 Add myself to FreeBSD calendar
Approved by:	flz (mentor), Ken Smith (re)
2005-07-15 14:38:01 +00:00
Max Laier
2e37c5a333 Print newly exported pfsync statistics with netstat(8).
Requested by:	glebius
MFC after:	1 week
2005-07-14 22:42:35 +00:00
Christian Brueffer
f0ea72a038 - Remove MLINKS to nonexistant manpages
- Change some section numbers to match reality
- For MLINKS to manpages from ports, mention which port installs them

MFC after:	3 days
2005-07-14 20:29:08 +00:00
Garance A Drosehn
b5418f5134 Fix two minor parsing bugs in -S processing:
1) An unquoted space is always a separator, even when not "in_arg".
 2) When a new destination buffer must be allocated during variable
    substitution, only copy data from the active buffer to the new
    one when we *are* "in_arg".
These were noticed when testing variable-substitution of variables
which have null values, and are not inside quoted strings...

MFC plans:	after a few days, and re@ approval...
2005-07-13 15:56:30 +00:00
Jung-uk Kim
f8b12dd293 add myself as a new committer
Reviewed by:	anholt (mentor)
Approved by:	re (scottl)
2005-07-07 05:48:37 +00:00
Johan Karlsson
5ceb03e494 Our bsd.*.mk only supports 6 WARNS levels and we should not use higher values
until it does.

Approved by:	re (dwhite)
2005-06-30 11:56:31 +00:00
Ruslan Ermilov
ceeb3b43de Fixed troff warnings.
Approved by:	re (blanket manpages)
2005-06-27 07:37:01 +00:00
Ruslan Ermilov
5dea8a444f Tidy up the markup.
Approved by:	re (blanket)
OK'ed by:	gad
2005-06-22 19:04:07 +00:00
Garance A Drosehn
530aafd4d0 Fix a bug where the value of ${SOMEVAR} would simply disappear if there
was a separator character immediately before it.  This wasn't likely to
happen in #-lines, but we might as well get it right.  Also fix it so
that "" and "" will create a zero-length argument.

Approved by:	re (blanket `env')
2005-06-21 21:37:53 +00:00
Garance A Drosehn
68ef20722d Put in a more descriptive heading for the `env' command.
Noticed by:	Matthew D Fuller
Approved by:	re (blanket `env')
2005-06-21 19:45:02 +00:00
Garance A Drosehn
2f739d3c1a Undo r1.14 to env.c. While it is unusual for environment variables to
start with a '/', they are more supported (by POSIX and SUSv3) than
filenames which have an '=' in them.

Noticed by:	tjr
Approved by:	re (blanket `env')
2005-06-21 19:38:26 +00:00
Garance A Drosehn
8fbe7ebf7d Add the '-S' and '-P' options. The '-S' option can be used to split
apart a string, and supports some text substitutions.  This can be
used to provide all the flexibility (and more!) that was lost by recent
changes to how the kernel parses #!-lines in shell scripts.

The '-P' option provides a way to specify an alternate set of directories
to use when searching for the 'utility' program to run.  This way you can
be sure what directories are used for that search, without changing the
value of PATH that the user has set.  Note that on FreeBSD 6.0, this
option is worthless unless the '-S' option is also used.

Approved by:	re (blanket `env')
2005-06-20 03:43:25 +00:00
Garance A Drosehn
6dcd6cac03 If the `utility' specified starts with a '/' character, then execute it
without checking it for an equals-sign.  If it starts with a slash, then
it cannot be a request to set the value of a valid environment variable.

Approved by:	re (blanket `env')
2005-06-20 03:14:29 +00:00
Garance A Drosehn
212274c3b6 Move the code that clears the environment when `-i' is specified, so it that
it does not happen until all single-letter options are processed.  This will
be important for the -S option, which will be coming soon.

Approved by:	re (blanket `env')
2005-06-20 03:09:49 +00:00
Garance A Drosehn
f66e378b5e Add a '-v' option to `env', to make it easier to discover exactly what steps
it is doing, and what order it does them.  This will be much more useful as
more options are added.

Approved by:	re (blanket `env')
2005-06-20 03:06:54 +00:00
Alfred Perlstein
3969f0fa13 Decode chroot(2) args.
Approved by: re
2005-06-14 21:51:08 +00:00
Ruslan Ermilov
39c59153e9 Markup and wording fixes.
Approved by:	re (blanket)
2005-06-14 11:50:53 +00:00
Dag-Erling Smørgrav
fd0cba238e Don't free(sock) before it's even allocated.
Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
MFC after:	1 week
2005-06-10 06:36:03 +00:00
Dag-Erling Smørgrav
ee66677a7a Remove kludges intended to support src trees with partial obj trees.
Discussed with:	ru
2005-06-10 06:12:53 +00:00
Christian S.J. Peron
671cff5aec Append a newline character to the usage string.
MFC after:	3 days
2005-06-05 23:49:35 +00:00
Garance A Drosehn
b8eb1eccee Use the ki_udata field that was recently-added to kinfo_proc, instead of
stealing ki_spare[0] to hold a pointer.
2005-06-04 23:40:09 +00:00
Eivind Eklund
e1d27f08f1 Back out revision 1.19 and 1.20 until I find mental clarity to deal with
issues bde pointed out.
2005-06-01 20:34:06 +00:00
Brad Davis
e8a296f5e5 Add myself as a new committer.
Approved by:	ceri (mentor)
2005-06-01 18:29:50 +00:00
Maxim Konovalov
42dc3715bb o Teach login(1) to respect "hushlogin" and "nocheckmail" attributes
defined in user's $HOME/.login_conf.

PR:		bin/75001
Submitted by:	Rostislav Krasny
MFC after:	2 weeks
2005-06-01 12:23:06 +00:00
David E. O'Brien
9703393611 Don't use a patch w/in /usr/src. Programmatically change files when needed. 2005-05-31 22:16:49 +00:00