Commit Graph

9454 Commits

Author SHA1 Message Date
Warner Losh
0a6c71f8fa Fix copyright spelling.
PR:		139825
Submitted by:	Ruslan Mahmatkhanov
2010-03-10 20:31:30 +00:00
Andrey A. Chernov
0100f0ddf7 Add SIZE_MAX overflow check 2010-03-09 21:06:17 +00:00
Andrey A. Chernov
d2796d06d3 Add SIZE_MAX overflow check 2010-03-09 21:06:01 +00:00
Edwin Groothuis
1d0e1dac57 - Fix the highlighting for non-terminals when the last week is not
7 days long.
- "-m <N> <YYYY>" now prints only the month, not the whole year.
2010-03-09 06:43:35 +00:00
Andrey A. Chernov
8f82dfe5d1 Rewrite input processing to not exit with error on the first EILSEQ found
in the input data but fallback to "binary comparison" instead.

POSIX says: "The input files shall be text files", nothing more,
so the text file with illegal sequence is valid input.
BTW, GNU sort does not fails on EILSEQ too.
2010-03-08 22:27:46 +00:00
Konstantin Belousov
f464670689 Add file forgotten in r204879. 2010-03-08 20:45:52 +00:00
Konstantin Belousov
55f65cd929 Teach procstat(1) to display some information about signal disposition
and pending/blocked status for signals.

Reviewed by:	rwatson
MFC after:	2 weeks
2010-03-08 20:44:22 +00:00
Andrey A. Chernov
5eaad26eaf 1) Reimplement (differently) unlimited line length restricted in prev.
commit.

2) Honor missing the very last \n (if absent) on output.
2010-03-08 19:40:22 +00:00
Jaakko Heinonen
91029ccefe Pass the correct size to memset().
PR:		bin/128094
Submitted by:	Henning Petersen
MFC after:	1 week
2010-03-08 16:23:32 +00:00
Edwin Groothuis
cae11c25e3 - document the -3, -A and -B properly in Synopsis.
- add highlight of current date for non-terminals.
- fix -J option.
- code cleanup.

MFC after:	2 weeks
2010-03-07 21:54:28 +00:00
Andrey A. Chernov
aa6c3b4c60 Remove vestiges of old %-format which prevents build on amd64 2010-03-06 22:38:38 +00:00
Andrey A. Chernov
d4c2dafa6c 1) Rewrite input processing to not exit with error on the first EILSEQ found
in the input data but fallback to "binary equal" check instead.

POSIX says: "The input file shall be a text file", nothing more,
so the text file with illegal sequence is valid input.
BTW, GNU sort does not fails on EILSEQ too.

2) Speedup input processing a bit in complex cases like skipping fields,
chars or ignore case.

3) Enforce the implied LINE_MAX limit (from POSIX definition of "text file"
and POSIX uniq(1) description).
2010-03-06 19:21:57 +00:00
Jaakko Heinonen
12794df244 - Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
  once, the command didn't necessarily fit to the final command buffer. Fix
  this using a dynamic sbuf buffer. Add a few regression tests for the case.

PR:		bin/95079
No objections:	freebsd-hackers
2010-03-05 15:23:01 +00:00
Scott Long
9f28039bf2 Let the afterinstall target ignore failures from running chflags. This
allows it to work over NFS, and puts it back into conformance with other
'schg' utlitilties in the system.

Reviewed by:	ed
2010-03-04 12:35:20 +00:00
Edwin Groothuis
6f3bc07b8b Remove no-op of WARNS?=
Submitted by:	Ulrich Sp??rlein <uqs@spoerlein.net>
2010-03-04 12:18:24 +00:00
Edwin Groothuis
0851fbdf3b - Implement -3 option (show previous, this and next month) option.
- Add -A option (months after this month).
- Add -B option (months before this month).
- Fix highlighting of today in year overview.
- Fix aligning of "foreign" characters.

MFC after:	2 weeks
2010-03-04 07:04:27 +00:00
Ulf Lilleengen
ef9d5b89f9 - Fix spelling.
Pointed out by:	Pawel Worach <pawel.worach - at - gmail.com>, b. f. <bf1783 - at - googlemail.com>
2010-03-03 21:22:53 +00:00
Maxim Sobolev
32bdc2b685 Use expand_number(3) from libutil instead of home-grown function to parse
human-friendly power-of-two numbers (i.e. 2k, 5M etc).

Suggested by:	many
MFC after:	1 week
2010-03-03 19:25:28 +00:00
Ulf Lilleengen
ff5cfe34d6 - Include CURDIR in case the makefile is not run from the same directory. 2010-03-03 16:45:58 +00:00
Ulf Lilleengen
6b807bd5a4 - Remove unused include path. 2010-03-03 08:24:15 +00:00
Ulf Lilleengen
1761232e1d - Revert Makefile to revision r203368, as the svn mv from contrib/csup replaced
the Makefile with a broken version.
2010-03-03 08:23:19 +00:00
Ulrich Spörlein
47e1a877c5 Always assign WARNS using ?=
- fix some nearby style bugs
- include Makefile.inc where it makes sense and reduces duplication

Approved by:	ed (co-mentor)
2010-03-02 16:58:04 +00:00
Ulf Lilleengen
b1a3479cb6 - Unmark authentication support as a TODO item. 2010-03-02 07:37:35 +00:00
Ulf Lilleengen
4b6675a6f8 - Move csup away from contrib/ and into usr.bin/. Software is no longer
contributed, and main development is happening in the FreeBSD repo.

Suggested by:	joel
2010-03-02 07:26:07 +00:00
Robert Watson
bd9e7af25e Prefer vocabulary of 'Current' and 'Limit' to 'Value' and 'Maximum' in
netstat -Q.

MFC after:	6 days
Sponsored by:	Juniper Networks
2010-03-01 12:11:37 +00:00
Robert Watson
88737be2dd Teach netstat -Q to work with -N and -M by adding libkvm versions of data
query routines.  This code is necessarily more fragile in the presence of
kernel changes than querying the kernel via sysctl (the default), but
useful when investigating crashes or live kernel state via firewire.

MFC after:	1 week
Sponsored by:	Juniper Networks
2010-03-01 00:46:45 +00:00
Ed Schouten
f319c4b9af Make pr build with WARNS=6. 2010-02-26 13:48:04 +00:00
Ed Schouten
81d01f896b Use time(NULL) instead of gettimeofday(), because we only need tv_sec. 2010-02-26 13:47:51 +00:00
Ruslan Ermilov
c59ee18a21 Fixed static linkage. 2010-02-26 09:41:16 +00:00
Ruslan Ermilov
bee10047c0 Fixed dependencies (make checkdpadd). 2010-02-25 20:24:19 +00:00
Robert Watson
f836657290 Update date on netstat(1) for -Q.
Suggested by:	bz
MFC after:	1 week
2010-02-22 16:05:45 +00:00
Robert Watson
0153eb6688 Teach netstat(1) to print out netisr statistics when given the -Q argument.
Currently supports only reporting on live systems via sysctl, kmem support
needs to be edded.

MFC after:	1 week
Sponsored by:	Juniper Networks
2010-02-22 15:57:36 +00:00
Ulrich Spörlein
8fa03d08ca Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
Xin LI
0a167a9b98 Treat numbers after [Ee] a positive number rather than an invalid
one.
2010-02-20 01:23:15 +00:00
Xin LI
9b3e11b84b Add a reference to newly added seq(1) command.
Submitted by:	jilles
MFC after:	3 months
2010-02-20 00:16:44 +00:00
Xin LI
208987a53c Add seq(1), a small utility to generate sequence number.
Obtained from:	NetBSD
MFC after:	3 months
2010-02-19 23:54:12 +00:00
Tony Finch
86eea914a7 Update to upstream version 1.338
Fix a long-standing cpp compatibility bug: The -DFOO argument
(without an explicit value) should define FOO to 1 not to the empty
string.

Add support for CRLF newlines, based on a suggestion from Mark Rushakoff.

Obtained from:	http://dotat.at/prog/unifdef/
2010-02-19 16:54:51 +00:00
Gavin Atkinson
a17f9fd691 The correct value of DEL is 0x7f, not 0xff. This is purely a documentation
issue - od(1) and hexdump(1) behave as expected.

PR:		docs/143869
Submitted by:	gcooper
MFC after:	2 weeks
2010-02-18 19:06:30 +00:00
Warner Losh
30c1278f14 The kdump data stream is an unaligned data stream for stat and
sockaddr structures.  As such, we have top copy the data structure
into a local buffer before we can reference it, otherwise we have
unaligned references (these are fixed up automatically on some CPUs,
but not on others).  We do this unconditionally to make the code
easier to read and understand.

Submitted by:	Grzegorz Bernacki
2010-02-18 16:05:09 +00:00
Warner Losh
35873dcedb bc and dc are not BSD version, not GNU version. 2010-02-18 05:14:36 +00:00
Gavin Atkinson
7e66baa20b Bump .Dd for r203977
MFC after:	1 month
2010-02-16 22:55:38 +00:00
Gavin Atkinson
cf4bd0f272 Implement the rename query, for when a file with the same name as the one
about to be extracted already exists.  The question, and interpretation
of the response is deliberately compatible with Info-Zip.

This change was originally obtained from NetBSD, but has three changes:
 - better compatibility with Info-Zip in the handling of ^D
 - Use getdelim() rather than getline()
 - bug fix: != changed to == in the "file rename" code

I suspect the latter is also a bug in NetBSD, but I can't easily confirm
this.

PR:		bin/143307
Reviewed by:	rdivacky (change to unzip.c only)
Obtained from:	NetBSD src/usr.bin/unzip/unzip.c 1.8
MFC after:	1 month
2010-02-16 22:53:18 +00:00
Warner Losh
89f84ab0a5 The NetBSD Foundation has granted permission to remove clause 3 and 4
from their software.

Obtained from:	NetBSD
2010-02-16 21:43:57 +00:00
Gavin Atkinson
8310a1a27a The -newerXB option was being interpreted the same as the -newerXm option
as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
MFC after:	1 month
2010-02-14 12:08:44 +00:00
Ruslan Ermilov
a66d183c7b Make manpage's SYNOPSIS match program's usage().
Submitted by:	Alexander Best (manpage)
2010-02-12 15:07:24 +00:00
Ed Schouten
7f5883ad7c Remove unneeded CFLAGS. 2010-02-10 07:15:21 +00:00
Ed Maste
a0b96fd411 Add new -o option (r203042) to manpage synopsis and usage().
Submitted by:	ru
2010-02-10 00:18:15 +00:00
Ed Schouten
65bcaaeca7 Don't let find(1) depend on struct timeb.
This structure is deprecated and only used by ftime(2), which is part of
libcompat. The second argument of get_date() is unused, which means we
can just remove it entirely.
2010-02-09 21:24:41 +00:00
Xin LI
07ea9a7c2f As it turns out, fmt(1) is being used by the base system as well as the
ports tree extensively and it is probably a good idea to keep it
regardless of NO_MAIL setting.

Reported by:	Alexander Best
Reviewed by:	antoine
X-MFC-With:	r203584
2010-02-09 18:22:26 +00:00
Gabor Kovesdan
769821053c - pt_BR.ISO8859-1 catalog
- Add link to pt_PT.ISO8859-1

Submitted by:	sylvio
Approved by:	delphij (mentor)
2010-02-09 10:47:44 +00:00