Commit Graph

8475 Commits

Author SHA1 Message Date
Ruslan Ermilov
0414904d4c - Document all character classes our tr(1) supports. [1]
- Mention that some of them are POSIX extensions.  [2]

PR:		docs/85062 [1]
Submitted by:	Toby Peterson [1]
Obtained from:	wctype(3) [2]
MFC after:	3 days
2006-10-13 16:13:45 +00:00
Ruslan Ermilov
82a6e39b28 At least one argument is required. 2006-10-12 21:10:55 +00:00
Ceri Davies
1abf0e15d5 Saint George replaced Saint Edward as the patron Saint of England
somewhere around 1348.

The revision log doesn't seem to go back quite that far, but I assume
that the update to this file was forgotten in the celebrations.

While, here, note which countries the other UK patron Saints hold
patronage of.

Sources include http://www.novareinna.com/festive/georgeday.html and
http://www.newadvent.org/cathen/
2006-10-12 11:08:29 +00:00
Ruslan Ermilov
c01e1768d9 Memory utilization subscreen in "vmstat" display lists numbers in KB,
not in number of pages.

PR:		docs/71690
Submitted by:	Jan Srzednicki

(A patch is only partially merged, the rest was already fixed by bde@
in rev. 1.51.)
2006-10-12 10:54:34 +00:00
Ruslan Ermilov
93f4bf61d4 Don't go beyond the provided string when parsing the `\' character.
PR:		bin/99985
Submitted by:	Nate Eldredge
MFC after:	3 days
2006-10-09 19:37:26 +00:00
Ceri Davies
659a728e18 Update the list of POSIX extensions.
PR:		docs/103859
Submitted by:	shaun
MFC after:	1 week
2006-10-08 10:31:44 +00:00
Florent Thoumie
a6a5a8f2e6 Add a missing new line at the end of the australian calendar file to
suppress and error message.

PR:		conf/99490
Submitted by:	Shaun Branden <shaun@pcuse.com>
Approved by:	cperciva (mentor)
MFC after:	1 day
Sponsored by:	FreeBSD Test-Bugathon
2006-10-06 23:20:01 +00:00
Soeren Straarup
457ce4c37b Adding my birthday
Approved by:	tmclaugh
2006-10-01 16:17:10 +00:00
Maxim Konovalov
b12f653e35 o Remove an obsoleted (and commented out) entry.
PR:		conf/85143
Submitted by:	Helge Oldach
2006-10-01 09:22:05 +00:00
Maxim Konovalov
e854ae2d06 o Strip eol w/spaces. 2006-10-01 06:30:51 +00:00
Maxim Konovalov
aa137175c2 o Add a Gedenktag.
PR:		conf/85143
Submitted by:	Helge Oldach
MFC after:	1 weeks
2006-10-01 06:29:35 +00:00
Ruslan Ermilov
e9aa046ba9 Revise markup. 2006-09-30 17:27:50 +00:00
Ruslan Ermilov
c4baa2453c Markup nit. 2006-09-29 21:17:10 +00:00
Bruce M Simpson
910e1364b6 Nits.
Submitted by:	ru
2006-09-29 16:16:41 +00:00
Bruce M Simpson
2d20d32344 Push removal of mrouted down to the rest of the tree. 2006-09-29 15:45:11 +00:00
Ruslan Ermilov
cb29445a92 Markup fixes. 2006-09-29 15:20:48 +00:00
Luoqi Chen
5a8e64ee60 Do not chdir(2) until after setuid(2), otherwise "su - username" would fail
when root doesn't have the permission to enter target user's home directory.
If set, PAM environment variable HOME will be used in chdir(2) instead of
pwd->pw_dir, this allows pam_chroot module to continue to function.
2006-09-29 04:41:37 +00:00
Matteo Riondato
9e0573fdc2 Set txrx_error to 1 when we reach abort. This makes the program correctly set the exit code.
The PR has further details on this.

PR:		bin/103206
Submitted by:	John Hickey <jjh-freebsd@daedalian.us>
MFC after:	3 days
2006-09-28 21:22:21 +00:00
Stanislav Sedov
af159726bc - Add my birthday entry to the chronicle.
Approved by:	sem (mentor)
2006-09-27 08:25:53 +00:00
Ceri Davies
de5e5e6ead Add a -a option as a no-op for Solaris compatibility, as briefly
discussed on src-committers.  This is intentionally not included in the
usage() function as it would confuse the output too much.

Approved by:	jhb
MFC after:	1 week
2006-09-26 22:28:12 +00:00
Ruslan Ermilov
acc17cb5a5 Fix both arguments to err(). 2006-09-26 05:46:55 +00:00
Dmitry Morozovsky
50789a2f3a Fix bug introduced in rev 1.23:
pw_equal does not check crypted password field, so one cannot change
crypted password keeping other fields intact.

Approved by:	des
MCF after:	3 days
2006-09-25 15:06:24 +00:00
Robert Watson
f4882b24fd Rename "-a" flag to "-A" in order to avoid conflicting with the "-a" flag
as found on Solaris.

Requested by:	ceri
MFC after:	3 days
2006-09-23 15:43:29 +00:00
Robert Watson
5bae3124ab Add a -a argument to id(1), which causes id(1) to print out process
audit properties, including the audit user id.  This can be quite
helpful in debugging audit problems.

Obtained from:	TrustedBSD Project
MFC after:	3 days
2006-09-23 12:30:31 +00:00
Alexander Kabaev
f340c84ebe Pass "-Wtraditional -Wno-system-headers" to compiler as two separate
arguments. GCC4 was unhappy with them combined, while GCC 3.4 did
not care.
2006-09-21 02:05:38 +00:00
Wojciech A. Koszek
60e15662e1 Export tcps_rcvmemdrop available in 'struct tcpstat' with netstat(1).
Requested by:	Tomasz Pilat <tomasz.pilat (at) axelspringer.pl>
Approved by:	andre
2006-09-20 12:29:12 +00:00
Ian Dowse
6508a1ecdc Add missing parentheses to fix a segmentation fault that is easily
reproducable with `jot -s " " 400 1 | column -t'. The bug was present
in the the original CSRG 'column -t' added in 1989.
2006-09-19 22:11:43 +00:00
Maxim Konovalov
a39846b5e4 o Don't leak fd on error.
o parselength() returns 0 or -1 so int is enough for its return type.

Submitted by:	Ighighi Ighighi, sheldonh
MFC after:	3 weeks
2006-09-18 16:39:23 +00:00
Maxim Konovalov
f45b405f7a o optname, the third {set,get}sockopt(2) argument, is an enum, not a bitmap.
Treat it accordingly.

PR:		bin/101642
MFC after:	3 weeks
2006-09-18 13:49:57 +00:00
Ruslan Ermilov
b43d227cab Update manpages for FILE 4.17. 2006-09-17 18:42:35 +00:00
Ruslan Ermilov
8a70619712 Initial memory allocation for fields was off-by-one.
PR:		bin/100443
MFC after:	3 days
2006-09-15 13:33:32 +00:00
Ruslan Ermilov
1007c98db6 Don't require a space between -[fv] and its argument.
PR:		bin/86514
MFC after:	3 days
2006-09-15 13:28:10 +00:00
Joel Dahl
3e1f331553 Remove references to the pam(8) manual page. It does not exist.
Requested by:	novel
Discussed with:	brueffer, simon
2006-09-13 17:46:20 +00:00
Philippe Charnier
488633c7f4 initialize variable (WARNS=6) 2006-09-13 05:06:12 +00:00
Alexander Botero-Lowry
4f9019bb29 Add my birthday to the calendar, sadly I am only the fifth youngest.
Approved by:	novel
2006-09-12 09:05:00 +00:00
Philippe Charnier
b2eeeae049 WARNS=6 chocked on unitialized variable. 2006-09-12 05:08:36 +00:00
Erwin Lansing
890fdf8de1 Update some of the bulgarian holidays since it no longer
is a socialist state.

Submitted by:	Shteryana Shopova <shteryana@FreeBSD.org>
2006-09-08 09:45:06 +00:00
Ruslan Ermilov
2aebb8bcb4 Fixed the -# option to work as documented in a manpage. 2006-09-07 19:48:52 +00:00
Ceri Davies
0033dba88b Chase revision 1.10 in usage string and a comment. 2006-09-07 17:10:26 +00:00
Ruslan Ermilov
934464be64 Bump WARNS level to 3.
OK'ed by:	make universe
2006-09-01 17:09:09 +00:00
Christian S.J. Peron
6319ad282f Integrate audit_submit(3) bits into su. This means that records for
successful and failed su attempts will be recorded using the AUE_su
event type (login or lo class) if auditing is present in the system.
Currently, the records will have a header, subject, text (with the
actual diagnostics), a return and trailer token.

See audit_submit(3) for more information.

Reviewed by:	rwatson
Obtained from:	TrustedBSD Project
2006-09-01 13:39:02 +00:00
Ruslan Ermilov
763e2b058d Fix markup (in the same way as it was fixed in tip.1) and thus
make the diffs against tip.1 minimal (as in OpenBSD).
2006-08-31 20:44:59 +00:00
Ruslan Ermilov
07bb01e3d4 Fix compilation warnings (up to level 3). 2006-08-31 19:19:44 +00:00
Ruslan Ermilov
bfad8c3c1c Document the undocumented change in OpenBSD: the ${raisechar}
is no longer set to ^A by default, it's unset.

Reported by:	imp, sam
2006-08-31 16:40:30 +00:00
Ruslan Ermilov
a9f118adfd Actually merge OpenBSD changes and local changes (a diff should
be viewed relative to revision 1.24).
2006-08-31 16:26:50 +00:00
Ruslan Ermilov
2a98f027e5 Remove some dust. 2006-08-31 14:14:57 +00:00
Ruslan Ermilov
fa92e8831d Resolve merge conflicts. 2006-08-31 14:14:30 +00:00
Ruslan Ermilov
24ede41b96 This commit was generated by cvs2svn to compensate for changes in r161751,
which included commits to RCS files with non-trunk default branches.
2006-08-31 14:12:22 +00:00
Ruslan Ermilov
d391708c06 Import OpenBSD's tip(1) as of today 2006-08-31 14:12:22 +00:00
Xin LI
9dd54fbb7e In rev. 1.2 we have introduced a fallback handler for files with unknown
extensions.  This seems to be unnecessary and prevents less(1) from being
able to detect file changes, so remove the part.

Submitted by:	Eric Huss <e-huss netmeridian com>
PR:		bin/102624
Discussed with:	des
MFC After:	3 days
2006-08-30 08:20:34 +00:00
Joseph Koshy
59b2dc9f8b Manual page tweaks.
Submitted by:	Niclas Zeising <lothrandil at n00b.apagnu.se> on freebsd-doc
2006-08-29 18:11:20 +00:00
Poul-Henning Kamp
fd0232603d Improve input parsing:
Add "-C <column>" and "-d <delims>" options to chop up input lines.

Make '#' a comment character, rest of line is ignored.

Submitted by: Dmitry Morozovsky <marck@rinet.ru>
2006-08-28 08:27:02 +00:00
Ruslan Ermilov
2d05c776ef Remove alpha-specific stuff. 2006-08-23 12:12:56 +00:00
Marcel Moolenaar
e108ac655d Build libsmb and smbutil on ia64. 2006-08-22 03:22:17 +00:00
Marcel Moolenaar
4c5876d2ad Remove alpha left-overs. 2006-08-21 19:49:57 +00:00
Daniel Gerzo
695e93d68e Add myself to the FreeBSD callendar. Ooops, it seems like I'm the
second youngest.

Approved by:	keramida (mentor)
2006-08-20 18:52:37 +00:00
Xin LI
d605d70a75 Hook lessecho(1) to build. 2006-08-20 15:52:17 +00:00
Xin LI
72bc07dc83 Regen. 2006-08-20 15:51:18 +00:00
Yaroslav Tykhiy
6c43fb6f9e Tell in a comment that the symlinks from /usr/bin are
for compatibility with other OS types, too.

Pointed out by:		gad
2006-08-20 04:25:20 +00:00
Yaroslav Tykhiy
55416ca8f7 Install pkill(1), aka pgrep(1), to /bin so that rc scripts
can use this small and nifty utility.  Create compatibility
symlinks from /usr/bin for the time being to avoid breaking
custom scripts relying on the hardcoded path to the utility.

If pkill(1) takes root, its source should be repocopied some
day to src/bin.

Idea by:	des
Discussed with:	brooks (in cvs-src and cvs-all)
2006-08-19 08:24:01 +00:00
Ceri Davies
15af4b716b Further nitpicking. 2006-08-17 16:29:27 +00:00
Ceri Davies
4b3d1ae7a4 Fix a grammatical error.
Funny how one character can completely distort the perception of a sentence :)
2006-08-17 16:20:42 +00:00
Maxim Konovalov
ec2c2c379b o Fix the date of LZ 129 Hindenburg crash.
PR:		misc/102137
Submitted by:	jasper@openbsd
MFC after:	3 days
2006-08-16 11:54:07 +00:00
Giorgos Keramidas
a6dd1c93f4 Add support for splitting at gigabyte boundaries. [1]
Also make both lowercase and uppercase suffix letters work
as byte-count suffixes, i.e. the following two commands are
equivalent now:

    % split -b 4m foo
    % split -b 4M foo

Submitted by:		Roman Divacky [1]
Lots of help by:	cperciva
Reviewed by:		cperciva
MFC after:		1 week
2006-08-10 10:41:47 +00:00
Maxim Konovalov
e4df92e126 o Simple strcpy/strcat replacement.
PR:		bin/101575
Founded by:	Dan Lukes
Obtained from:	OpenBSD, rev. 1.11 by deraadt
MFC after:	2 weeks
2006-08-09 19:12:10 +00:00
Giorgos Keramidas
49198c4297 Update usage & SYNOPSIS and clarify that input files are not removed.
Sort getopt option handling of -p too, while here.

The changes are adapted from a patch by Ruslan Ermilov, posted as
followup to docs/33852.

PR:             docs/33852
Submitted by:   Gary W. Swearingen <swear@blarg.net>
MFC after:      1 week
2006-08-08 21:25:22 +00:00
Bruce M Simpson
abfdccc7ce Update document date.
Noticed by:	ru
2006-08-03 20:43:51 +00:00
Bruce M Simpson
6b04b7f63e Add a new command-line option, -P, which allows the user to specify
an arbitrary port to which syslog messages are to be sent.

PR:		bin/54026
Submitted by:	Oliver Fromme
MFC after:	10 days
2006-08-02 13:21:44 +00:00
Joseph Koshy
1ae9926515 In 'od -c' mode, deal with printable but zero-width combining
characters correctly.  These characters are displayed "combined"
with a space character.

PR:		misc/100215
Submitted by:	"J.R. Oldroyd" <<fbsd AT opal.com>>
Reviewed by:	"J.R. Oldroyd" <<fbsd AT opal.com>> (revised patch)
MFC after:	3 days
2006-07-31 14:17:04 +00:00
Yaroslav Tykhiy
594a130b8a Stop enforcing dependencies between MK_* options at Makefile level.
All the dependencies are satisfied now in <bsd.own.mk>.
2006-07-31 13:29:36 +00:00
Tim Kientzle
fc1e63e49b Remove two unused variables.
Thanks to: Stefan Farfeleder
2006-07-31 04:57:46 +00:00
Tim Kientzle
902ce6f035 Conditionally include sys/mkdev.h on platforms (such as Solaris) that need it.
While I'm here, correctly alphabetize 't' after 's'.

Thanks to: VMiklos
2006-07-30 18:34:40 +00:00
Maxim Konovalov
1b405ff747 o Kill unneeded assignment.
Obtained from:	OpenBSD
2006-07-30 07:41:28 +00:00
Yaroslav Tykhiy
096146f88b - Achieve WARNS=3 by using sparse initializers or avoiding initializers at all.
- Fix a nlist initialization: it should be terminated by a NULL entry.
- Constify.
- Catch an unused parameter.

Tested on:	i386 amd64 ia64
2006-07-28 16:16:40 +00:00
Yaroslav Tykhiy
7b95a1ebbd Achieve WARNS=2 by using uintmax_t to pass around 64-bit quantities,
including to printf().  Using uintmax_t is also robust to further
extensions in both the C language and the bitwidth of kernel counters.

Tested on:	i386 amd64 ia64
2006-07-28 16:09:19 +00:00
Yaroslav Tykhiy
778d2bddd2 Both fields of struct timeval are of a non-basic type,
so we should cast them to a type printf() knows about.
2006-07-28 11:17:17 +00:00
Yaroslav Tykhiy
b7dd94d5e6 Avoid useless work: Do not build inet6.c if INET6 support is off.
This also avoids pretending that netstat includes inet6.c in the
output from ident(1).
2006-07-28 11:09:21 +00:00
Yaroslav Tykhiy
2cc3124e10 Obey MK_INET6_SUPPORT. 2006-07-27 14:20:14 +00:00
Yaroslav Tykhiy
d1773e839f Respect MK_INET6_SUPPORT.
Move INET6 out of the RELEASE_CRUNCH conditional block
because it saves as little as 2% of the binary size and
IPv6 is rather popular today.  (Some other binaries, e.g.,
telnetd, include INET6 for RELEASE_CRUNCH already.)
2006-07-27 14:19:30 +00:00
Yaroslav Tykhiy
46ae665613 rpcinfo(1) doesn't depend on INET6 explicitly. 2006-07-27 13:47:02 +00:00
Xin LI
1aeafe6572 Make sure that the sc pointer gets initialized. No functional change
should happen with this change.
2006-07-26 08:58:00 +00:00
Jung-uk Kim
93e3b716ba Fix 32-bit integer math on 64-bit processor. Just use int32_t(!) instead
of incorrect and machine-dependent integer math.  Now we can encrypt a file
on an i386 and decrypt it on an amd64, and vice versa.

Submitted by:	Andrew Heybey < ath at niksun dot com >
2006-07-25 22:20:05 +00:00
Robert Watson
df3e013b3e Remove MT_FTABLE printout in systat, as MT_FTABLE mbufs are no longer
used in the kernel.
2006-07-24 01:49:24 +00:00
David E. O'Brien
38a1ab4173 Tell when a .include is processed with '-dd'. 2006-07-22 14:00:31 +00:00
Stefan Farfeleder
845b8cbcbf Remove break after return. 2006-07-18 10:19:46 +00:00
Stefan Farfeleder
107f86a291 Document that the pathname(s) following the options need not be given if
-f pathname was specified.
2006-07-18 07:39:22 +00:00
Stefan Farfeleder
cd1de708cd Fix type mismatch between char * and unsigned char *. C guarantees that
the values of the characters here are positive, so it's safe to index arrays
with them.
2006-07-18 07:29:42 +00:00
Stefan Farfeleder
ae66acac87 The variables i and tot don't need to be static. 2006-07-18 07:16:25 +00:00
Stefan Farfeleder
080397239a Remove break after return. 2006-07-18 07:10:30 +00:00
David E. O'Brien
2cae2b7d30 VarAdd() already does the debug printing, so Var_Set() only needs to do it
in the case the var already exists.
2006-07-17 21:05:27 +00:00
David E. O'Brien
99f08b7740 whitespace fixing 2006-07-17 19:16:12 +00:00
Julian Elischer
109dad819f Not having ipv6 in your kernel is not an error and should not be reported.
MFC after:	1 week
2006-07-14 23:32:43 +00:00
Maxim Konovalov
5a3e0a1b99 o Fix some printf(3) format nits in my patch I submitted to kib@.
Submitted by:	ru
2006-07-12 13:36:08 +00:00
Konstantin Belousov
09e7364ee9 Remove slipped in spaces.
Pointed out by:	maxim
Approved by:	pjd (mentor)
2006-07-12 12:42:47 +00:00
Konstantin Belousov
fd6afe791c Check that the signal number is in range.
Submitted by:	maxim
MFC after:	1 week
Approved by:	pjd (mentor)
2006-07-12 12:41:56 +00:00
Konstantin Belousov
1a8b0c1571 Check that the signal number is in range.
Submitted by:	Michiel Boland <michiel boland org>
MFC after:	1 week
Approved by:	pjd (mentor)
2006-07-12 09:13:33 +00:00
Oleg Bulyzhin
7c7f48f12c Since kernel & userland use different timebase and netstat is reading kernel
memory directly, we should do timebase conversion for route lifetime.

Approved by:	glebius (mentor)
2006-07-06 11:59:27 +00:00
Pyun YongHyeon
740cf1fd67 Add myself. 2006-07-04 23:52:12 +00:00
Greg Lehey
cdef7e2711 Update dillon's mail address. 2006-07-04 03:29:31 +00:00
Ruslan Ermilov
2982527d8b - Simplify the formatting in the SYNOPSIS.
- Add the forgotten new option in usage().
2006-06-30 08:19:26 +00:00
Florent Thoumie
aa1d7ce72f Add a -q option to suppress header lines when multiple files are specified.
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-06-29 22:07:49 +00:00
Boris Samorodov
ecbbee76f3 Add myself to the freebsd calendar.
Approved by:	netchild (mentor)
2006-06-22 14:22:20 +00:00
David E. O'Brien
b3f1b4a2c7 Update for the 'file' 4.17 import. 2006-06-19 08:10:23 +00:00
Stefan Eßer
d1b76f3f6e Fix display of idle processes, which had been broken since rev. 1.56 of
machine.c. The traditional condition was (pctcpu > 0 || SRUN), but the
negation of the condition logic (from select to skip) made this come
out as (pctcpu > 0 && SRUN), leading to a very erratic display, except
for purely CPU bound processes.

This has been discussed in the mail lists some time ago and I have used
top with this patch on my systems for more than a year without problems
(just forgot to commit it earlier, since my systems were all fixed ...).
2006-06-11 19:18:39 +00:00
Maxim Konovalov
6d3d5db831 o Sync usage() with reality. 2006-06-11 17:40:25 +00:00
Robert Watson
b5fc62e2f7 Add audit.h to mkioctls inclusion list: audit pipe ioctls need access
to the audit types.

Submitted by:	wsalamon
Obtained from:	TrustedBSD Project
2006-06-05 10:06:51 +00:00
David E. O'Brien
bb6988aa71 Increase the field widths of flt (total number of page faults), fr (pages
freed), & cs (CPU context switch rate).  'vmstat 1' output is now lined up
for today's typical machines vs. a VAX.  [tested my modest 1.6ghz laptop]
2006-06-03 20:34:56 +00:00
Greg Lehey
a176b8d333 Correct previous commit. We don't want to suppress an entry because
it runs into the following month.  Instead adjust month and day,
wrapping round into next year where necessary.

MFC after: 14 days
2006-05-31 01:30:50 +00:00
Greg Lehey
29ef275b38 Don't go past the end of the month with a repetitive entry of the
style "every Monday":

   mon *	Do Foo.

Previously, at the end of the month, this could cause a printout of
the following nature when invoked with -A 7:

   36 May* Do Foo

MFC after:	2 weeks
2006-05-30 04:00:23 +00:00
John-Mark Gurney
50866a5cf3 remove comment about systems, I got confused which arch one of my systems
was...

Pointed out by:	ru
2006-05-29 10:57:13 +00:00
Stefan Farfeleder
311e80b148 Print the euid after the gid as demanded by POSIX.
Submitted by:	Martin Nagy <nagy.martin@gmail.com>
PR:		96239
MFC after:	2 weeks
2006-05-28 12:32:30 +00:00
John-Mark Gurney
2f25c9bd65 document that even if magic is newer than magic.mgc, it isn't used
compiling mgc on a big endian system (specificly tested sparc64) breaks,
using one from a little endian system works
2006-05-28 07:15:35 +00:00
Kirill Ponomarev
85184b8b23 Fix using "P" command on empty pattern space. If the "P" command is
used once on a non-empty pattern space and then again on an empty
pattern space, the second usage restores the pattern space length to
the length that it had when the first "P" was used.

PR:		bin/96052
Submitted by:	Andrey Zholos <aaz@althenia.net>
MFC after:	7 days
2006-05-27 19:32:28 +00:00
Kirill Ponomarev
5a890aac57 Add the capability for a trailing scale indicator to cause the
specified size to be read in the more familiar units of kilobytes,
megabytes, gigabytes, terabytes and petabytes.

PR:		bin/50988
Submitted by:	Matthew Seaman <m.seaman@infracaninophile.co.uk>
MFC after:	7 days
2006-05-27 18:27:41 +00:00
Kirill Ponomarev
4ba3b38b64 Enable numeric arguments and +/- prefixes with -user (-group)
options.

PR:		bin/71513
Submitted by:	Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after:	7 days
2006-05-25 21:20:43 +00:00
Brad Davis
eaa9b5ef09 s/on a crt//
systat is working great on this LCD ;)

Submitted by:	Ben Haga <tuximus AT absoludicrous DOT com>
MFC after:	3 days
2006-05-25 06:05:04 +00:00
Alexander Leidinger
98a68a586f Change kdump to print more useful information, i.e. it changes from
32229 telnet   CALL  mmap(0,0x8000,0x3,0x1002,0xffffffff,0,0,0)
 32229 telnet   CALL  open(0x2807bc28,0,0x1b6)
 32229 telnet   CALL  socket(0x2,0x2,0)
to
 32229 telnet   CALL mmap(0,0x8000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0,0,0)
 32229 telnet   CALL  open(0x2807bc28,O_RDONLY,<unused>0x1b6)
 32229 telnet   CALL  socket(PF_INET,SOCK_DGRAM,0)

David wanted to implement the suggestions which came up at the review from
arch@ too, but real life rejected this proposal. So I commit what we already
got and let another volunteer pick the remaining work from the ideas list.

Submitted by:	"David Kirchner" <dpk@dpk.net>
Suggested by:	FreeBSD ideas list page
Reviewed by:	arch
2006-05-20 14:27:22 +00:00
Robert Watson
99b671f5a1 In change 1.15, an arbitrary setting of the max RPC record size to
RPC_MAXDATASIZE was introduced.  This is believed to have been debugging
code committed accidentally, although I've been unable to reach the
committer to confirm this.  The effect was to limit the size of RPCs on
TCP and UDP to 9k, well below the default protocol limits in the libc
rpc code.  This change simply removes these introduced limits, falling
back on the libc definitions.

PR:		88856
Reported by:	Keith Bostic <bostic at sleepycat dot com>
Testing by:	Susan LoVerso <sue at loverso dot southborough dot ma dot us>
Reveiwed by:	cel, rees
Review timeout:	alfred, mbr
MFC after:	2 weeks
2006-05-17 23:18:17 +00:00
Pav Lucistnik
e4dfa7fd78 - Fix warning when compiling with -DDEBUG
Approved by:	alfred
2006-05-15 22:09:45 +00:00
Pav Lucistnik
081e5c4890 - Add decoding of kse_release, kevent, sigprocmask, unmount, socket, getrusage,
rename, __getcwd, shutdown, getrlimit, setrlimit, _umtx_lock, _umtx_unlock,
  pathconf, truncate, ftruncate, kill

- Decode more arguments of open, mprot, *stat, and fcntl.

- Convert all constant-macro and bitfield decoding to lookup tables; much
  cleaner than previous code.

- Print the timestamp of process exit and signal reception when -d or -D are in
  use

- Try six times with 1/2 second delay to debug the child

PR:		bin/52190 (updated)
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
Approved by:	alfred
2006-05-15 21:18:28 +00:00
Pav Lucistnik
1675c32154 - Fix crash when hitting unknown syscall. Copied from i386-fbsd.c
Approved by:	alfred
2006-05-15 21:03:02 +00:00
Maxim Konovalov
df2e45f7c2 o Fix typo in a comment.
PR:		bin/97292
Submitted by:	clsung
MFC after:	3 days
2006-05-15 08:20:38 +00:00
Kirill Ponomarev
22170420ec The last execution of -exec {} + is not done if the -exec primary is
not on the top-level -and sequence, e.g. inside of ! or -or.

Create a separate linked list of all active -exec {} + primaries and
do the last execution for all at termination.

PR:		bin/79263
Submitted by:	Jilles Tjoelker <jilles@stack.nl>
MFC after:	7 days
2006-05-14 20:23:01 +00:00
Pawel Jakub Dawidek
b6d7073d13 Handle SIGINFO in time(1) by printing the time the given command is running.
I find it quite handy to just hit ^T and see the time.
2006-05-14 13:16:19 +00:00
Ruslan Ermilov
1e967a0b4e So, what's it supposed to say when you type "make love"? 2006-05-11 18:08:44 +00:00
Poul-Henning Kamp
bec1fa8607 Use sysctlbyname 2006-05-11 17:25:36 +00:00
Coleman Kane
7a1877d4c6 Add myself to the freebsd calendar. 2006-05-08 23:48:26 +00:00
Ion-Mihai Tetcu
6ce3af2460 Add myself.
Approved by:	tmclaugh (mentor)
2006-05-08 20:28:38 +00:00
Andrew Pantyukhin
cdf0b41844 Add myself
Approved by:	krion
2006-05-07 07:45:39 +00:00
Maxim Konovalov
fadc7151b7 o Implement "-n" flag: ignore files and directories with user "nodump"
flag set.  Useful for calculation dump -h dump size.

PR:		bin/96864
Submitted by:	Dmitry Kazarov
Obtained from:	NetBSD (man page)
MFC after:	1 month
2006-05-06 22:04:59 +00:00
Hajimu UMEMOTO
920b61d0bf The port number must be network byte order. 2006-05-04 11:28:16 +00:00
Maxim Konovalov
dcd61bb80c o style: WARNS= -> WARNS?=.
Spotted by:	ru
2006-05-04 09:01:54 +00:00
Maxim Konovalov
c912a3f7be o By popular demand import getent(1) utility: a program retrieves
and displays entries from the administrative database specified by
database, using the lookup order specified in nsswitch.conf(5).

PR:		bin/79903, bin/88460, bin/96536
Submitted by:	Julien Gabel, Dan Nelson, Daniel J. O'Connor
Obtained from:	NetBSD
Discussed with:	ume, soc-bushman
MFC after:	1 month
2006-05-04 08:44:44 +00:00
Bruce Evans
de916c8b74 Move the formatting of the NICE column to a new function format_nice()
so that it can be more easily unbroken and extended.

Try to use `static', `const' (as appropriate), prototypes declared together,
and parameter names in prototypes for all private functions, not just the
new one.
2006-05-04 03:56:31 +00:00
Bruce Evans
789e38771b Fixed some style bugs (mainly missing and wrong splitting of long lines). 2006-05-04 03:00:13 +00:00
Poul-Henning Kamp
5f72b6ac80 Avoid coredumps if stddev cannot be computed (if all datapoints are identical)
Small cleanup of label printing.
2006-05-02 07:34:38 +00:00
Bruce Evans
04984aac91 For the vmstat sub-display:
vmstat.c:
Move totfr to be under daefr and prcfr since it logically belongs there.

Move all the count fields (wire, act, inact, cache and free) to near
the bottom of the sub-display (after all the rate fields) to reduce
competition with adjoining sub-displays.

systat.1:
Move things as above.

Attempt to improve missing and poor wording in the description of the
fields.  The long sentence was hard to parse and didn't say anything
about the different units.

Increment .Dd.
2006-05-01 07:02:52 +00:00
Tim Kientzle
323b71146a In the examples, use "tar.gz" as the extension for
gzip-compressed tar archives.

Thanks to: Mike Hunter
2006-05-01 01:34:21 +00:00
Bruce Evans
74a2149c90 Unbreak the support for 24-row terminals in the vmstat display. The
part that handled the 17th and 18th rows of the vmstat-proper subdisplay
was deleted in rev.1.10 when these rows stopped being used and was not
restored when the 17th row was used again.  For such terminals, we now
lose the `buf' field instead of making a mess with it.  Terminals with
fewer than 24 rows have never been supported.

The problem is not avoided by using curses since we use the last line
for data entry and don't use a separate subwindow for this line.
Some other things in the vmstat display could be handled better using
subwindows.
2006-05-01 00:26:43 +00:00
Bruce Evans
1247d9c61c Sort the ex-extended vmstat fields into their documented order in the
output too.

Fine tune all coordinates and most field widths in the vmstat (sub)display
for this and previous changes now that we have to change almost all of them
just to move the ex-extended fields:
- change VMSTATROW back to 7.  It was 6 due to a hack in the extended vm
  stats changes.
- reduce the maximum field width that we try for from 9 to 8.  4 or 5 is
  enough for most fields but we try to use the same width for all fields.
  8 is enough to display everything without changing units memory sizes
  exceed 100GB.

Fix some unrelated coordinates and field widths in comments.
2006-04-30 23:52:16 +00:00
Bruce Evans
de9a857e4c Eliminate the "extended" vm stats. Move all fields in the extended
vm stats to the normal vm stats.  Sort them into the normal stats
according to the man page only in the source code so that diffs are
almost readable.  Reduce style bugs in printing the value of %ozfod.
2006-04-30 22:34:54 +00:00
Bruce Evans
71ae810140 Update for moving some fields to the new vnstat display.
Don't say that `cache' is for the buffer cache.

Describe the uselessnes of `buf'.
2006-04-30 22:05:02 +00:00
Bruce Evans
9177eda617 Reduce the namei (sub)display by 5 columns to make enough space for a
new vnstat display to the right of the namei display.

Move the non-vmstat fields {des,num,fre}vn from the vmstat display to a
new vnstat display.  Move the dtbuf field there too.  The buf and dtbuf
fields are non-vmstat and non-vnstat, so there is no good place to
display them.  I need to move at least 1 of them out of the vm stats
for further cleanups of the vm stats, and there is only space for 1
of them in the vn stats.  (The best place for the current buf field
is actually /dev/null, since it has been completely broken for about
10 years and broken for longer.  It gives an uninteresting virtual
memory count where an interesting real memory count is wanted.)
2006-04-30 20:31:00 +00:00
Bruce Evans
b16f944633 Removed the description of the nonexistent want_fd command. want_fd existed
for only 2 weeks in 1998-1999.  It was replaced by general commands to
select the set of disk drives displayed.
2006-04-30 09:23:11 +00:00
Bruce Evans
3bccedcdf8 Don't redraw the disk names on every update. This was apparently done
to handle changes to the set of disks selected, but it is unnecessary
for that since the whole screen is redrawn when this set is changed.
It was also buggy:
- MAXDRIVES*6 = 42 was hard-coded as only 30 spaces in a string literal,
  the last 2 disk names were not cleared as intended
- when the extended vmstats are active, clearing of even 30 columns
  overruns the ozfod value field by 3 columns.  This was harmless because
  the field is much wider than necessary.
2006-04-30 09:13:59 +00:00
Bruce Evans
6e977072c6 Fix "slow (on-the-fly) zero fills percentage (`%slo-z')" some more. The
value printed is actually the optimized (i.e., the non-slow, not-on-the-fly
zero fills percentage) except in overflow cases.  Describe it as %ozfod
in the display.  Move the field descriptor 1 to the left so that there
is space for 5 characters after the % sign (this leaves no space between
the number and the descriptor but the % character serves well as a
separator).

Fixed integer overflow at z.ozfod = UINT_MAX/100 in the calculation of
%ozfod.  This value can be reached just a few hours or minutes after
booting, so %ozfod was usually garbage in boot mode.  Now %ozfod is
correct in boot mode for a few days or hours.

Print a non-dummy %ozfod when the division for it isn't division by 0
instead of when the result will be less than 100%.  A result of 100%
may be correct, though a result of more than 100% indicates overflow
of one or both counters.
2006-04-30 07:27:23 +00:00
Bruce Evans
43f2757a27 If DEBUG is defined, then fill numeric fields with asterisks instead of
spaces and numbers for temporary(?) debugging.
2006-04-30 05:54:21 +00:00
Bruce Evans
a9a3dcd64f Remove trailing whitespace.
Submitted by:	Se=E1n Farley <sean-freebsd at farley dot org>
PR:		bin/81874
2006-04-30 04:47:23 +00:00
Bruce Evans
8aa22952a9 Show the load average in the tcp display (it was already shown, perhaps
not very usefully, in all other displays).  This was the original point
of the PR.

Move the load average up by 2 so that it starts in row 0 for all windows
(2 lines above it were wasted for all other windows except vmstat).
Move everything below it up by 2 or 3 (3 for icmp and icmp6 which had
an extra blank line due from not compensating for the foot-shooting in
note (3); only ip and ip6 compensated).  Reduce the magic numbers related
to this.

Notes by the submitter:
%%%
1. All the subwin() calls are identical using #define MAINWIN_ROW 3
    (systat.h).
2. The load average is at the top of the window.
3. Each display starts on the fourth line.  I made changes to those
    displays that shifted the start line (i.e., icmp).  This entailed a
    lot of changes within the comments at the top of those displays.
4. For ip6, I shifted the "Input next-header histogram" column down one
    row to separate it from "IPv6 Output".  I raised "bad scope packets"
    and "address selection failed" up one row to stay with "IPv6 Input"
    (valid?).  They were down one row to probably line up at the bottom,
    but I think they should stick with their fellow items in a column.
5. I condensed ifstat a bit.  It had a lot of empty rows.
%%%

Submitted by:	Se=E1n Farley <sean-freebsd at farley dot org>
PR:		bin/81874
2006-04-30 04:26:46 +00:00
Bruce Evans
4545c62547 Edit the interrupt name strings to shorten them. This is believed to
only affect amd64 and i386.  alpha uses "intr N" instead of "irqN" and
mostly has no device names.  ia64 uses only device names.

- Edit interrupt names once after they are read from the kernel and not
  every time they are displayed.
- Discard bogus trailing spaces so that the next step doesn't move things
  to oblivion.
- If an interrupt name starts with "irqN:" (as it usually does in on
  amd64 and i386), then move "irqN" to the end and strip ":", since we
  have no space for the ":" and don't want to start descriptions with
  "N" after stripping "irq" in the next step (since "N" would look like
  a count).  This step may need reworking for interrupt names containing
  several device names -- then moving the irq number to the end would
  lose it instead of losing some device names.
- Remove "irq" from an interrupt name if and only if the original name is
  too long to display.
2006-04-30 01:39:46 +00:00
Bruce Evans
18d3a03e13 Backed out rev.1.49 since it had buffer overruns and only worked
accidentally.

Read buffer overruns:
The size of the target array (TSOTTA == 10) is a wrong limit to use for
scanning the source string.

Write buffer overruns:
TSOTTA is also a wrong limit to use for copying to the target buffer,
since we want to add a NUL terminator afterwards.  TSOTTA was also 1
too small for holding both the desired number of visible characters
and the NUL.

Worked accidentally:
There is error in the algorithm that tends to result in the space saved
by stripping "irq" not actually being used, but some cases worked
accidentally provided "irqN" is near the end of the source string and
"N" is only 1 digit.

Starting with 5.mumble-CURRENT, "irqN" is at the beginning of the
string on all (?) arches that have it and the accidents don't happen.
E.g. on i386's, the keyboard irq is now named
"irq1: atkbd0<bogus blank padding>" by the kernel, and this name was
converted to "1: atkb" -- not only the device number but part of the
device name has been lost --, while before 5.mumble the kernel name
was "atkbd0 irq1" and systat accidentally preserved the irq number to
give "atkbd0 1".  The ":" in the string wastes precious space, and
stripping "irq" results in descriptions starting with numbers which
makes them look too much like counts.  This commit just fixes the last
problem.
2006-04-30 00:50:08 +00:00
Bruce Evans
e76bdda079 Abbreviate long field descriptors at write time so that they don't get
clobbered at runtime:
    dirtybuf -> dtbuf
    desiredvnodes -> desvn
    numvnodes -> numvn
    freevnodes -> frevn
The vmstats column has only 5 characters available for descriptors, but up
to 13 were used.  The extras get clobbered at runtime by interrupt values
and/or descriptors on systems with more than 12 interrupt sources.
    %slo-z -> %sloz
This one is in the "extended" vmstats area and doesn't get clobbered now.

Removed stale documentation of desvn.

Changed a descriptor:
    tfree -> totfr
so that it is consistent with the abbreviations for other free counts
(daefr and prcfr) and thus almost decodeable.

Fixed missing documentation of tfree/totfr.  This and everything else
in the extended vmstats area is misdocumented as being in a certain
place in the vmstats column.
2006-04-29 21:30:23 +00:00
Warner Losh
830de116de ru@ recently changed lorder to support library archives. Document
this new feature prominently.  Bump date while I'm here.
2006-04-27 15:48:54 +00:00
Joseph Koshy
ee8e4b36bb Fix a typo.
Submitted by:	Pawel Worach <pawel.worach at gmail dot com>
MFC after:	1 week
2006-04-22 03:04:24 +00:00
Xin LI
3254fa322f Because optarg and optind are defined in unistd.h,
remove the defination here.
2006-04-21 09:39:51 +00:00
Christian Brueffer
f41d690787 Indentation fixes 2006-04-19 19:09:21 +00:00
Maxim Konovalov
beb66b02a4 o Close an output file -o flag opened before execvp(3) in a child.
PR:		bin/89666
Submitted by:	Arne H Juul
MFC after:	1 month
2006-04-16 17:44:49 +00:00
Christian Brueffer
dd09eba412 Fix indentation for "Ostersonntag".
Obtained from:	OpenBSD
2006-04-16 10:34:56 +00:00
Ruslan Ermilov
e4a9274404 Add missing library dependencies. 2006-04-13 12:49:24 +00:00
Florent Thoumie
ce5756e3bb Fix Mother's/Father's day in most case.
PR:		misc/79415
Submitted by:	thierry
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-04-13 12:14:44 +00:00
Ruslan Ermilov
295c5dea2c libc_r is no longer provided, and on alpha and sparc64, libthr
is (sym)linked to libpthread.  Account for this change and
check for MK_LIBTHR instead of MK_LIBC_R where appropriate.
2006-04-12 19:52:34 +00:00
Pawel Jakub Dawidek
e6f3621dd3 Allow to specify size in terabytes by using T or t suffix.
This speeds up my testing a bit. Because truncate(1) doesn't allocate
blocks on file system before they are used, it is very useful to
emulate huge file systems:

	# truncate -s 16T fs.img
	# mdconfig -a -f fs.img
	# newfs /dev/mdX

(-t swap can be used as well)
2006-04-09 19:16:24 +00:00
Max Khon
99d3c2c46c Update comment about var modifiers (add 'N' and 'O' descriptions). 2006-04-08 07:02:39 +00:00
Max Khon
66b07418fa Add :u var modifier (remove adjacent duplicate words like uniq(1).
Reviewed by:	harti
Obtained from:	NetBSD (mostly)
2006-04-08 06:59:54 +00:00
Ceri Davies
d11138e871 Fix options broken when the birthtime related primaries were added.
Note to self: if a comment says a list must be lexically sorted, sort
the list lexically.

Submitted by:	Pawel Worach
Approved by:	jhb
MFC after:	2 weeks
2006-04-05 23:06:11 +00:00
Alejandro Pulver
67e75d082d Add my birthday.
Approved by:	garga (mentor)
2006-04-04 22:32:14 +00:00
Jean Milanez Melo
aaf860a446 - Add my birthday
Approved by: mnag (mentor)
2006-04-04 13:06:21 +00:00
Ceri Davies
440a24d87d Note that all of the birthtime related primaries are non-standard. 2006-04-04 10:20:16 +00:00
Ceri Davies
bb0d5fd575 Bump .Dd for the birthtime options. 2006-04-03 20:53:34 +00:00
Ceri Davies
31d534254e Add -Btime, -Bnewer, -Bmin, -newerB[Bacmt], -newer[acmt]B options to
work with the st_birthtime field of struct stat.

'B' has been chosen to match the format specifier from stat(1).

Approved by:	jhb
MFC after:	2 weeks
2006-04-03 20:36:37 +00:00
Tim Kientzle
b8c95d3fe1 If you see a broken symlink, don't try to follow it,
just archive it as a symlink, even if -h was specified.

Thanks to: Jin Guojun
PR: bin/95175
MFC After: 1 week
2006-04-02 07:13:11 +00:00
Olivier Houchard
8f9370b050 Don't call audit_logout() if pwd is NULL, as audit_logout() attempts to
dereference it.
This will happen if we ^D at the Login: prompt without having provided a
valid login before.
Set pwd to NULL on bad login attempts to prevent audit_logout() from being
called for a user which didn't actually log on.

Reported by:    Jerome Magnin jethro at docisland dot org
2006-03-28 15:30:42 +00:00
Peter Wemm
045b6fdaf6 Make gcore(1) 64 bit safe. It was trying to parse the /proc/*/map file
using sscanf and truncating the start/end entries by writing them with a
32 bit int descriptor (%x).  The upper bytes of the 64 bit vm_offset_t
variables (for little endian machines) were uninitialized.  For big endian
machines, things would have been worse because it was storing the 32 bit
value in the upper half of the 64 bit variable.  I've changed it to use
%lx and long types.  That should work on all our platforms.
2006-03-25 01:14:20 +00:00
Tim Kientzle
6b422e20c1 Extended attribute support on write for Linux; FreeBSD hooks are
forthcoming.  This commit also has a number of style(9) fixes and
minor corrections so the code works better with the build system being
used for non-FreeBSD builds.

Many thanks to: Jaakko Heinonen, who proposed a mechanism for extended
attribute support and implemented both the machine-independent portion
and the Linux-specific portion.
2006-03-21 17:03:51 +00:00
Ruslan Ermilov
a50767eb92 Unbreak WITHOUT_LIBPHREAD/WITHOUT_LIBC_R option support, depending
on platform.
2006-03-21 11:00:54 +00:00
Ruslan Ermilov
cea557add0 Extend coverage of the MK_IPX build option to the following:
- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option

New MK_NCP build option controls:

- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules

User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.

[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed.  This needs to be dealt with.
2006-03-20 14:24:58 +00:00
Ruslan Ermilov
5740a2b62d Convert NO_PROFILE and NO_LIB32 to new style. 2006-03-18 21:37:05 +00:00
John-Mark Gurney
b955f00544 add an entry for ozfod..
MFC after:	3 days
2006-03-18 10:40:28 +00:00
John-Mark Gurney
244bb595f4 fix spelling of ozfod... I've been wondering why we'd need to fill a page
w/ non-zero data, and it turns out we don't...  This is really optimized
zero filled on demand, or pages that were already zero'd for us...

MFC after:	3 days
2006-03-18 01:06:13 +00:00
Maxim Sobolev
d3ff297263 A few minor corrections to the mkuzip.8 man page.
PR:		92576
Submitted by:	Stefan Bethke
2006-03-17 20:48:10 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Joseph Koshy
4c1a7dd294 Cross-reference basename(3) and dirname(3). 2006-03-16 17:21:52 +00:00
Robert Watson
9e92c8d486 When opening a trace file, open O_NONBLOCK so that ktrace doesn't stall
if the target is a fifo.  After opening a trace file, check that it is a
regular file, and if not, return an error.

MFC after:	3 days
Reported by:	kris
PR:		94278
2006-03-14 19:32:03 +00:00
Maxime Henrion
bb647cca85 Update make glue for csup-snap-20060313. 2006-03-14 03:53:50 +00:00
Tim Kientzle
6e64751484 Remove non-FreeBSD source from FreeBSD repository. 2006-03-12 19:55:02 +00:00
Daniel Eischen
03d485eb77 Remove including of libc sources. All the required functions
are exported by libc with prototypes in our standard headers.
I guess at one time this was necessary, but not any longer.
2006-03-10 07:58:02 +00:00
Tim Kientzle
e11aae440c Remove configure.ac.in and the 'distfile' target from
the FreeBSD makefile.  This is a step towards cleaning
out the non-FreeBSD bits from the FreeBSD source tree.
2006-03-08 02:49:12 +00:00
Tim Kientzle
8682859c8c Add a check for Linux' "libacl" library and headers. 2006-03-07 06:07:41 +00:00
Tim Kientzle
b5b5211732 Change the output of --version to match GNU "gnits" standards.
(I'm not using GPL, but I still think there are good
ideas in the GNU projects. ;-)  Among other things,
this should make it easier for clients of bsdtar to
recognize it automatically:
  bsdtar --version | grep bsdtar
2006-03-07 06:05:38 +00:00
Tim Kientzle
bce43ea96d Fix a format mismatch (%d integer format, platform-dependent
argument type).
2006-03-07 06:02:09 +00:00
David E. O'Brien
858494e461 Add an override (DONTSTRIP) so that one can easily install debugable
binaries when one cannot easily edit a package's Makefiles and/or
configure scripts.
2006-03-06 21:52:59 +00:00
Yaroslav Tykhiy
ebf3356a26 Managing login.access is no longer a responsibility of login(1).
Therefore give a xref, not details.

MFC after:	3 days
2006-03-06 13:07:17 +00:00
Yaroslav Tykhiy
d072921b75 Remove the last reference to LOGIN_ACCESS from login(1).
MFC after:	3 days
2006-03-06 12:56:35 +00:00
Yaroslav Tykhiy
700c87c3db login.access.5 and login_access.c are no longer used
in usr.bin/login because the login.access feature has
moved to PAM completely.

Their counterparts in lib/libpam/modules/pam_login_access
have been found to be in sync with, and even in better shape
than, login.access.5 and login_access.c here.

Therefore cvs rm login.access.5 and login_access.c from
usr.bin/login so that nobody will waste their time on fixing
or developing the files here.

MFC after:	3 days
2006-03-06 12:54:03 +00:00
Yaroslav Tykhiy
e65f3545ff login(1) no longer handles /etc/login.access by itself,
it's PAM's job.

MFC after:	3 days
2006-03-06 12:38:42 +00:00
Yaroslav Tykhiy
08284aaa25 Since the whole login.access feature has moved to PAM,
login.access.5 will be installed from the respective PAM
module's src directory.

MFC after:	3 days
2006-03-06 12:31:25 +00:00
Robert Watson
e0f5d997de Reduce number of spaces for full name by four, and reduce padding
after tty entry by one space in order to provide extra spaces for
the tty entry.  As a result, full pts names are now visible (up
to 999 pts's anyway):

Before:
Login            Name                 TTY  Idle  Login  Time   Office  Phone
robert           Robert Watson       *v0   3:55  Fri    02:54
robert           Robert Watson        p0     19  Sat    11:01
robert           Robert Watson        pts        Sat    14:55

After:

Login            Name             TTY      Idle  Login  Time   Office  Phone
robert           Robert Watson   *v0       5:08  Fri    02:54
robert           Robert Watson    p0          8  Sat    11:01
robert           Robert Watson    pts/5          Sat    14:55

MFC after:	1 week
2006-03-04 16:13:16 +00:00
Maxime Henrion
b0b13d1534 Don't build csup if NO_CRYPT or NO_OPENSSL is defined, since we depend
on those.

Reported by:	marius
2006-03-03 21:12:05 +00:00
Maxime Henrion
1f6fe9ace7 Connect csup the build! 2006-03-03 14:55:43 +00:00
Maxime Henrion
2ed4c88a7d - Don't put the .h in SRCS.
- Use LDADD += -lpthread and DPADD += ${LIBPTHREAD} instead of -pthread.
- s/-I${.CURDIR}/-I./ to fix make obj.

Submitted by:	ru
2006-03-03 14:54:47 +00:00
Maxime Henrion
dd78bf1a6a Add make glue for building csup. Not yet connected to the build. 2006-03-03 04:28:13 +00:00
Wojciech A. Koszek
d2f4defee2 Fix the way in which median is calculated. If the data source has even
number of data points, value should be calculated by adding two middle
elements and dividing them by 2.

Approved by:	cognet (mentor)
2006-02-23 20:46:10 +00:00
Wojciech A. Koszek
cd234bc8bc Add myself as a new src commiter:
+ extend calendar with my birth date

Approved by:    cognet (mentor)
Reviewed by:    cognet (mentor)
2006-02-22 22:02:04 +00:00
Peter Edwards
d12dff713a If opendir(".") fails after descending into a subdirectory via
chdir(), be sure to undo the effects of the chdir before continuing.

Without this, after hitting a directory with mode 0111 (for example),
tar will get lost, and won't add any yet unvisted files to your
archive.  (Or possibly add the wrong files, I suppose...)

Reviewed By: kientzle@
2006-02-22 11:13:07 +00:00
Matthew N. Dodd
c153cdd1b8 Add option -w to specify graph width.
Use COLUMNS, terminal width for default graph width.

Reviewed by:	 rwatson
2006-02-22 04:10:20 +00:00
Olivier Houchard
b457a3e19c In wall and who, check that the utmp entry isn't stalled, as it is done in w.
Apparently with the new pts code stalled entries are printed, when they are
not with the BSD ptys.

Submitted by:	Michal Mertl <mime at traveller dot cz>
2006-02-21 13:01:00 +00:00
Andre Oppermann
4b969aa55a Improved description for packet zone statistics.
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-02-18 16:09:38 +00:00
Andre Oppermann
1434cbd62a Print statistics on mbuf+clusters in packet zone.
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-02-18 16:03:07 +00:00
Andre Oppermann
2b22cf9cbe Print statistics on jumbo mbuf clusters.
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-02-18 15:55:19 +00:00
Bruce Evans
8d40843ab4 Move the "r p d s w" fields to the left to create space for expansion.
3 columns were wasted at the left, except these columns were used to
make the header line up.  Now there is no space on the same line for
the "Proc:" part of the header.  Try putting this on the line above
although it clutters that line (there is already similar clutter for
the "Interrupts" header).  Leave 1 column between these fields.  With
the above and a previous change there is enough of space for this.

Use 5 columns instead of 3 for the number of users since 3 is not quite
enough and there was space to spare.  This also fixes an off-by-2 error
in a previous fix forthe column count in the comment on STATROW.

Move all the pager fields 1 to the right so that the "count" and "pages"
descriptors more clearly apply to the pager fields and not the memory
fields.  There was space to space.

Waste some of the spare space at the right of the pager fields to expand
all the pager field widths to their old values (but now with a column
between the fields).  There are fields more in need of expansion but most
of them are not in places near spare space.
2006-02-14 13:27:25 +00:00
Bruce Evans
cd8ad406ad Removed the frobbing of CPU percentages from > 99.9 to 99.9. Rev.1.35
made it unnecessary.  (Rev.1.6 had to reduce the field width to 4, and
changed 100.0 and preposterous larger values down to 99.9 since 100.0
wouldn't have fitted.  Rev.1.35 handles precentages > 99.9 well enough by
changing the format to %.0f when the string given by the initial format
is too wide.)

Even with this change, during short testing I've never seen a percentage
of 100 being displayed by systat -v, although top(1) displays percentages
of 100 user or 100 idle for similar loads.
2006-02-14 12:26:51 +00:00
Bruce Evans
4bb97cfa93 Fix some minor bugs:
Always use snprintf()'s return value, since discarding it is a style
bug at best and using it here gives slightly simpler code and better
error checking.  Use snprintf() in putlongdouble() the same as in
putfloat().  (1.25 changed most sprintf()'s to snprintf()'s to fix
non-bugs without changing the logic to use the result of snprintf();
1.27 restored one of the sprintf()s by cloning a stale version of
putfloat().)

Don't print a too-long field in the unlikely case that the fallback
to M units in putint() leaves the field still too long.  (The fallback
to printing stars was lost in rev.1.58 when the fallback to M units
was added.)
2006-02-14 11:57:02 +00:00
Bruce Evans
991d33c312 Reduce the field width by 1 for many numeric fields so that most fields
cannot run into other fields or field descriptors.  If the value is
too large to fit in the field width, then the output format is adjusted
so that the value (usually) fits, but with fields running together
externally this adjustment usually didn't help.  Mostly it doesn't
matter to lose 1 digit of precision, but switching the output format
is bad if it happens often or gives bogus units.  The loss of width
is most serious for fields near "Csw" (which are also the ones which
must often ran together) since these have a high variance and large
values relative to the possible field widths so the switch occurs more
often now, and for the memory size fields where the switch gives the
bogus units kKB or MKB.

Now only the fields for r, p, d, s and w can run into each other.
These fields have width 3, and 3 cannot be reduced to 2 without losing
all precision when the value is between 100 and 999.

Trim "pdwake" to "pdwak" at think time now that it doesn't get clobbered
at runtime.  The manpage doesn't need to be changed for this because
it documents the clobbered descriptor, unlike for 4 other too-long
descriptors which only get clobbered if there are lots of interrupt
sources.

Trim "% busy" to "%busy" since most other descriptors for percentages
are spelled without the space and this change makes changing the widths
of the %busy fields unnecessary.
2006-02-14 10:47:36 +00:00
Bruce Evans
e3c53cce47 Oops, the "excessive" {} removed in the previous commit was needed
around PUTRATE() because PUTRATE() only looked like a function -- it was
multiple statements.  Use "do {...} while(0)" as usual in PUTRATE() so
that it is a single statement that can be used like a function.
2006-02-14 09:33:51 +00:00
Bruce Evans
123fa09901 Fixed all (?) bitrot in the comments about the number of columns used by
various groups of fields.
2006-02-14 08:33:02 +00:00
Bruce Evans
dc8ccdf0dc Fix all (?) cases where the field width of a numeric field was far too
large.  In most cases it is still 1 too large, so fields tend to run
together, but in the following cases it was more than 1 too large, and
the starting column was too small too, so the field started inside the
previous field or descriptor and clobbered that:
- "wire": the number for this overwrote 2 characters of the number for
  "Flt".  Reduce the field width by 3 (2 to avoid the overwrite and 1
  so that the fields don't run together).  This was already done for
  the preceding number for "cow".
- "inact": the number for this overwrote 1 character of the descriptor
  "Idle".  Reducing the field width by 2 is enough.
- "cache:" the number for this overwrote 3 characters of the scale
  "...|    |".  The field width should be reduced by 4 to keep things
  from running together, but that is a lot and not so necessary here
  since the final "|" in the scale serves as a delimiter.  Only reduce
  it by 3.
- "free": the number for this overwrote 2 characters of the bar graph.
  The character position under the final "|" in the scale is apparently
  not used, so reducing the field width by 3 is enough.

When "zfod" is in the main vmstat display:
- use the normal field width of 9 (not 5) for it since there is no shortage
  of space.  Fix style bugs (excessive {}) in the statement that
  conditionally writes it.

Write all reduced field widths for vmstat fields as "9 - <reduction>" as
a hint that we don't want to reduce them.
2006-02-14 07:44:21 +00:00
Bruce Evans
10a84fd9f7 Fixed style bugs in rev.1.12. Rev.1.12 arranged to display the interrupt
number in more cases by stealing 2 characters from the count field to
give more space in the descriptor field, but it did the column adjustments
for this strangely using an off-by-2 error in the base column and
compensating off-by-2 errors in 6 offsets from the base column (4 new
errors and 2 from not changing the offsets that actually changed).

Print the "Interrupts" header directly at its offset from the base column
instead of spacing it half using the offset and half by printing a space
character.
2006-02-14 05:37:25 +00:00
David Malone
59643a2120 The change to make column use roundup(x, TAB) rounded things to the
current tab, however the code it replaced wanted to round to the
next TAB. Consequently things like this:

	( echo 1 ; echo 2 ) | column

cause column to loop indefinitely. This patch is slightly different
from the one Gary submitted, but is closer to the original code.

Submitted by:	Gary Cody <gary@lyranthe.org>
MFC after:	1 week
2006-02-13 22:09:26 +00:00
Dmitry Morozovsky
e3f1789aa0 Default number of direct access devices had been changed from three to two.
Reflect this in other paragraphs.

PR:		93201
Submitted by:	Marian Cerny
MFC After:	1 week
2006-02-12 10:30:52 +00:00
Robert Watson
dd8dfa82e7 Sort sfbuf allocation counters with other sfbuf information.
MFC after:	3 days
2006-02-11 21:27:16 +00:00
Robert Watson
e446b85087 Un-#if 0 the printing of allocation failure counts for mbufs, clusters,
and packets in netstat -m.

MFC after:	3 days
2006-02-11 17:18:36 +00:00
Wayne Salamon
a1c73d21bf Make login audit-enabled, submitting audit records for the login and logout
events. The specifics of submitting the records is contained within
login_audit.c.
Document the auditing behavior in the man page.

Obtained from: TrustedBSD Project, Apple Computer, Inc.
Approved by: rwatson (mentor)
2006-02-04 20:20:02 +00:00
Andrey A. Chernov
fb1a11d799 Don't set time to current, if set to specific time fails
PR:             92577
2006-01-31 02:21:18 +00:00
Pawel Jakub Dawidek
d72d8f53f5 Tell the user exactly where the problem was. 2006-01-30 23:00:48 +00:00
Marcel Moolenaar
05157fa0a1 s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/ 2006-01-28 17:58:22 +00:00
Brad Davis
52a3a1928e - Mention that users need to be in the wheel group to `su - root' by default, and how to change it.
PR:		docs/70616
Submitted by:	Jilles Tjoelker <jilles at stack dot nl>
Reviewed by:	ru@
Approved by:	ceri@
MFC after:	3 days
2006-01-28 01:11:11 +00:00
Hajimu UMEMOTO
d042befb98 make wall(1) work with pts. 2006-01-27 08:52:14 +00:00
John Hay
23639a23a8 Add AfriNIC as a RIR.
PR:		80421
Submitted by:	Adrian Frith <adrian at frith.homelinux.org>
MFC after:	6 days
2006-01-23 13:49:39 +00:00
Matteo Riondato
ea759b3eb4 Add myself to the list (Ehi, I'm not the youngest!)
Approved by:	philip (mentor)
MFC after:	3 days
2006-01-20 13:07:09 +00:00
Vasil Dimov
5f9cc6261d Add myself to the calendar
Approved by:	garga (mentor)
2006-01-19 18:35:44 +00:00
Andrey Slusar
91eee675f4 Add myself.
Feel free to donate me a beer :)
2006-01-19 15:31:37 +00:00
Simon L. B. Nielsen
43614f10a2 Use the .Fx macro.
MFC after:	3 days
2006-01-17 19:37:07 +00:00
Gleb Smirnoff
e5ed7bcc74 Skip format flags, when parsing ktr_desc. 2006-01-12 22:32:07 +00:00
Colin Percival
9ed97bee65 Correct insecure temporary file usage in texindex. [06:01]
Correct insecure temporary file usage in ee. [06:02]
Correct a race condition when setting file permissions, sanitize file
names by default, and fix a buffer overflow when handling files
larger than 4GB in cpio. [06:03]
Fix an error in the handling of IP fragments in ipfw which can cause
a kernel panic. [06:04]

Security:	FreeBSD-SA-06:01.texindex
Security:	FreeBSD-SA-06:02.ee
Security:	FreeBSD-SA-06:03.cpio
Security:	FreeBSD-SA-06:04.ipfw
2006-01-11 08:02:16 +00:00
Tor Egge
82be0a5a24 Add marker vnodes to ensure that all vnodes associated with the mount point are
iterated over when using MNT_VNODE_FOREACH.

Reviewed by:	truckman
2006-01-09 20:42:19 +00:00
Diomidis Spinellis
f0982ce212 Document the TMPDIR environment variable.
MFC after:	1 week
2006-01-05 10:19:42 +00:00
Peter Grehan
5aedf535d3 Enable truss for powerpc 2006-01-05 05:58:16 +00:00
Peter Grehan
7fa9dc1c36 Add powerpc support for truss.
Initial work by:  Orlando Bassotto  < orlando at break net >
Modified by:	  grehan
2006-01-05 05:57:47 +00:00
Brian Somers
cd17a1f7ba Fix the other su bug reintroduced two commits ago, namely
$ su
    % kill -STOP $$

where su is executing (t)csh.  csh's job handling is a little more
special than that of (a)sh, bash and even zsh and blows up a little
more spectacularly.  This modification restores the original mucking
about with the tty pgrp, but is careful to only do it when su (or
su's child) is the foreground process.

While I'm here, fix a STDERR_FILENO spelling as suggested by bde.
2006-01-03 09:17:04 +00:00
Brian Somers
d039c62baa Handle the case (that I just broke) where the following hangs:
$ su
    # kill -STOP $$

Pointed out by:	David Xu <davidxu@freebsd.org>
2006-01-02 09:46:38 +00:00
Brian Somers
d43e192e7d Remove broken code that mucks about with tcsetpgrp() -- even if
su isn't the foreground process.  Hopefully this won't break PAM,
but I couldn't find any useful information about ache's theory
that it will.

Specifically, this change fixes the following:

    # sh
    # echo $$
    # su - root -c id &
    # echo $$

The PID output changes as su seems to be kill -STOP'ing itself
and catching the parent shell in the process.  This is especially
bad if you add a ``su - user -c command &'' to an rc script!

Sponsored by:		Sophos/Activestate
Not objected to by:	des
2006-01-02 08:51:21 +00:00
Brian Somers
0cf21b4f58 Add a -s flag for the same functionality as strace. Introduce a Name
type which is a String type that has no -s limitations applied to it.
Change most Strings in the code to Names and add a few extra syscalls,
namely munmap, read, rename and symlink.  This was enough to facilitate
following file descriptor allocations in the code more easily and
getting a hint at what's being read/written from/to files.  More
syscalls should really be added.

While here, fix an off-by-one bug in the buffer truncation code and
add a fflush so that truss's output reflects the syscall that the
program is stuck in.

Sponsored by:	Sophos/Activestate
MFC after:	2 weeks
2006-01-02 08:36:25 +00:00
Juli Mallett
b65bc26736 NUL terminate buffer from fgetln(3). From fgsch@OpenBSD. 2006-01-01 22:59:54 +00:00
Juli Mallett
f22bf18027 Whitespace after switch.
Inspired by:	OpenBSD
2006-01-01 22:54:49 +00:00
Juli Mallett
4aeb63826e Check the entire length of the current argument for the EOF string with -E,
but don't expect a proper ASCII string to exist right here right now, don't
use strcmp(3) which checks for a NUL.  As we're still building the argument
up, the next character might be garbage.  It would probably be just as safe to
temporarily write a NUL there, but if we've reached the end of argument memory
that might not be the best idea, I think.  It's unclear.

Doing it this way seems to meet the most with the original intent.

PR:		85696
Prodded by:	stefanf
2005-12-31 09:06:45 +00:00
Dag-Erling Smørgrav
15e2d64e15 Only clear sb.st_size if it is clearly wrong or meaningless. This fixes
mirror mode.

PR:		bin/86940
MFC after:	2 weeks
2005-12-30 23:36:26 +00:00
Juli Mallett
ba084f6a80 Add a FreeBSD-specific -S flag which controls the maximum size of an argument
having replacements done in it via -I.
2005-12-30 23:25:41 +00:00
Juli Mallett
38e62c6999 Handle maxsize==0 in such a way that we don't modify the string. 2005-12-30 23:22:50 +00:00
Christian S.J. Peron
6883394118 mkstemp(3) and friends use a combination of base 10 digits, along
with upper and lower case letters from the English alphabet. Change
the number of possible file names mktemp will return from 26**6
to (10+26+26)**6 instead. This keeps things consistent with mkstemp(3)
2005-12-30 20:10:21 +00:00
Dag-Erling Smørgrav
0c87874496 Reflect progress in process title.
Submitted by:	flz
MFC after:	2 weeks
2005-12-30 18:17:11 +00:00
Peter Grehan
8a2e2a8ecd Build gprof for powerpc now. 2005-12-29 04:30:03 +00:00
Peter Grehan
2315266944 clone i386.h for powerpc 2005-12-29 04:23:54 +00:00
Kelly Yancey
100b98db75 Add support for printing IPSEC protocol stats if the kernel was compiled
with FAST_IPSEC rather than the KAME IPSEC stack.

Note that the output of "netstat -s -p ipsec" differs depending on which
stack is compiled into the kernel since they each keep different stats.
This delta also adds the "esp", "ah", and "ipcomp" protocol stats, which
are also available when the kernel is compiled with the FAST_IPSEC stack
(e.g. "netstat -s -p esp").

Submitted by:	Matt Titus <titus at nttmcl dot com>
MFC after:	3 days
2005-12-28 20:36:55 +00:00
Ade Lovett
d9aef362c0 Someone buy me a beer. Now. 2005-12-28 08:41:57 +00:00
Ceri Davies
7881e1ee07 Liberation Day is no longer celebrated in Romania; rather a national
holiday is now celebrated on December 1st.  From the PR:

December 1 was adopted as National Day in 1990, being the day of
celebration of the Great Assembly of Alba Iulia which voted for the
union of Transylvania with Romania and which symbolise the union of all
Romanians within a single state and the achievement of the unity of
Romanian national state. [1]

[1] LAW Number 10 from July 31st, 1990
Regarding the proclamation of the National Day of Romania
http://www.1decembrie.ro/en/index.php?option=com_content&task=view&id=1&Itemid=4

PR:				docs/90673
Submitted by:			Ion-Mihai "IOnut" Tetcu
Originally pointed out by:	Cornel Ilie <cornel dot c punkt ilie at gmail punkt com>
2005-12-20 11:04:01 +00:00
Christian S.J. Peron
9d51867579 Provide some basic documentation explaining what the bpf(4) flags are
supposed to mean. Also, add an external references for bpf now that we
reference flags from that man page.
2005-12-18 19:38:43 +00:00
Marcel Moolenaar
757686b115 Make our ELF64 type definitions match standards. In particular this
means:
o  Remove Elf64_Quarter,
o  Redefine Elf64_Half to be 16-bit,
o  Redefine Elf64_Word to be 32-bit,
o  Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o  Use Elf_Size in MI code to abstract the difference between
   Elf32_Word and Elf64_Word.
o  Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks
2005-12-18 04:52:37 +00:00
Marcel Moolenaar
57668ad84b Know the machines FreeBSD runs on. Print the machine value for
unknown machines.

MFC after: 1 week
2005-12-17 23:24:34 +00:00
Maxim Konovalov
e20daf376d Fix the name of the country I was born. 2005-12-14 17:33:12 +00:00
Nate Lawson
ee574da534 Really fix the relative timestamp bug. It was only incorrect for the ALQ
case.  It seems entries are in reverse order when read from the kernel
memory but in the right order when read from a file (i.e. ALQ).  Handle
both cases.

MFC after:	1 day
2005-12-09 14:27:03 +00:00
Tim Kientzle
6593049efd Remove the -B option from the directory-copying examples. The -B
option is undocumented because it does nothing.  It does nothing
because bsdtar never needs it.  It is accepted because gnutar does
sometimes need it and many scripts use it.

Reported by: Pawel Jakub Dawidek
2005-12-09 05:19:00 +00:00
Maksim Yevmenkin
a9412967a2 Teach rfcomm_sppd(8) to recognize "lan" (for LAN Access Using PPP) service
name in '-c' (RFCOMM channel) option.

MFC after:	3 days
2005-12-07 19:41:58 +00:00
Dag-Erling Smørgrav
90c69417b6 Wording tweaks.
PR:		not quite docs/84620
MFC after:	2 weeks
2005-12-07 12:33:52 +00:00
Dag-Erling Smørgrav
1c6859f833 Add a -0 option for interoperability with xargs -0.
PR:		bin/56558
Submitted by:	Eugene Grosbein <eugen@grosbein.pp.ru>
MFC after:	2 weeks
2005-12-07 12:22:46 +00:00
Dag-Erling Smørgrav
2d14e0e547 Add -r option for GNU compatibility.
MFC after:	2 weeks
2005-12-07 12:20:08 +00:00
Nate Lawson
c578cf5e86 Fix -r flag to actually work. "now" comes after "then", not vice versa.
MFC after:	1 day
2005-12-06 14:13:39 +00:00
Ruslan Ermilov
8c7a62275a Prepare for MACHINE and hw.machine switching to "pc98" on FreeBSD/pc98.
Reviewed by:	nyan
2005-12-05 14:22:12 +00:00
Philip Paeps
5df9daab27 Catch up with 64bit time_t on sparc64. The rstat packet expects a 32bit
time_t and times will look incorrect on machines with 64bit time_t.

PR:		88788
Submitted by:	Keith White <Keith.White -at- site.uottawa.ca>
MFC after:	1 week
2005-12-04 18:25:26 +00:00
David Xu
0f2755724b Quickly fix brokeness in revision 1.157, that change was
free()ing stack memory which causes the program to abort,
and I can no longer make buildworld.
2005-12-01 05:59:45 +00:00
Max Khon
7d81571413 - match_var: do not address memory at invalid address (`len' can be greater
than strlen(var) + 1)
- ReadMakeFile: prevent `fname' memory leak
- ReadMakeFile: prevent double free (caused by double fclose) --
ParsePopInput() closes input file

Reviewed by:	harti
2005-11-30 20:38:03 +00:00
Robert Watson
91978388e2 Remove two lines of debugging output that accidentally snuck into the
commit to fix up kvm support for netstat -m.
2005-11-28 18:06:21 +00:00
Tim Kientzle
83b9606050 Portability: remove AC_FUNC_MALLOC from configure.ac.in.
According to Dan Nelson, this fixes the build on AIX 5.2.
2005-11-27 03:17:50 +00:00
Maksim Yevmenkin
d47d4f47b0 Teach rfcomm_sppd(1) about service names, so it is possible to specify
service name instead of channel number with -c command option. Supported
service names are: DUN (Dial-Up Networking), FAX (Fax) and SP (Serial Port).

MFC after:	1 week
2005-11-23 00:56:18 +00:00
Diomidis Spinellis
855196e9fa Use the appropriate error function for displaying the error,
instead of printing it to stdout.

MFC after:	1 week
2005-11-20 13:48:15 +00:00
Ruslan Ermilov
bf2ed57b3d Fix up markup. 2005-11-18 12:08:31 +00:00
Ruslan Ermilov
4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Pawel Jakub Dawidek
53ff091d14 Sync as close as possible with NetBSD.
This includes fixes and cleanups listed below:

- If a process dissappears while we are signalling it, don't count it as a
  match/error.
- Better handling of errors and messages.
- Downgrade failure to kill(2) (other than ESRCH) from fatal error to a
  warning; otherwise processing aborts and possibly matching killees would
  remain unsignalled. This makes pkill match the Solaris behavior.
- Exit with 2 on usage errors as documented.

Obtained from:	NetBSD
Glanced at by:	maintainer (gad) [a bit different version of this patch]
2005-11-16 11:03:00 +00:00
Pawel Jakub Dawidek
b77640621b I often find myself doing:
% pgrep <something> [to verify which processes match]
	% pkill <something>

To speed such operation up, add -I option which works like rm(1)'s -i
option (unfortunately -i is already used in pkill(1)), ie. pkill will
ask for confirmation before killing each matching process.

After adding -j, -F, -i, -S, -o and -L options and other improvements,
I think I can add myself to the copyright header.

Glanced at by:	maintainer (gad)
2005-11-16 10:36:44 +00:00
Craig Rodrigues
8cb6926e16 Eliminate coredump problem introduced by last commit.
Noticed by:	Guido van Rooij <guido at gvr dot org>
2005-11-14 13:35:08 +00:00
Craig Rodrigues
075775c9e4 Eliminate build breakage due to warnings about const. 2005-11-14 03:11:25 +00:00
David Malone
e390e3af7c Use ANSI definitions.
Avoid using extern by declaring shared functions in header files.
Const poision.
2005-11-13 21:17:24 +00:00
David Malone
5bbc895db6 len and len2 work better as size_t 2005-11-13 21:03:56 +00:00
David Malone
93aa4a7665 Const poision, deregister and use ANSI definitions. 2005-11-13 20:50:17 +00:00
David Malone
84032c0a6d Declare find_err in indent_globs.h where the other shared variables
live rather than listing it as an extern in indent.c.
2005-11-13 20:37:25 +00:00
David Malone
707083753a Avoid shadowing a local scratch variable, 2005-11-13 20:30:13 +00:00
Robert Watson
d4426f281d Modify netstat -mb to use libmemstat when accessing a core dump or live
kernel memory and not using sysctl.  Previously, libmemstat was used
only for the live kernel via sysctl paths.

This results in netstat output becoming both more consistent between
core dumps and the live kernel, and also more information in the core
dump case than previously (i.e., mbuf cache information).

Statistics relating to sfbufs still rely on a kvm descriptor as they
are not currently exposed via libmemstat.  netstat -m operating on a
core is still unable to print certain sfbuf stats available on the live
kernel.

MFC after:	1 week
2005-11-13 14:06:01 +00:00
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