Commit Graph

9433 Commits

Author SHA1 Message Date
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
Rebecca Cran
c08dcaf147 Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows the -M option to be used without specifying -N.
PR:	bin/138146
Approved by:	rrs (mentor)
MFC after:	3 days
2010-02-08 21:23:48 +00:00
Tim Kientzle
0086085a03 Simplify, remove unnecessary code. 2010-02-07 02:04:58 +00:00
Tim Kientzle
3b7dbff339 Merge a bunch of refactoring from Joerg Sonnenberger to
isolate common code used by tar and cpio (and useful to other
libarchive clients).  The functions here are prefixed with
"lafe" (libarchive front-end) to indicate their use.
2010-02-07 02:00:26 +00:00
Tim Kientzle
bb2f2a4024 Style & Portability: Use archive_entry methods to examine
file information, change some functions to static, remove
some unused headers.
2010-02-07 01:35:28 +00:00
Tim Kientzle
37ae97d43e Various portability workarounds for non-FreeBSD platforms. 2010-02-07 01:26:45 +00:00
Tim Kientzle
1ce4beea44 Restructure the logic that determines when we're crossing a mount
point.  In particular, this carves out a place for detecting and
excluding synthetic or network filesystems.
2010-02-07 01:22:55 +00:00
Tim Kientzle
95332e994e Minor code rework. 2010-02-07 01:16:05 +00:00
Tim Kientzle
2d9fd7eea6 Trim out some unused configuration variables, remove
some unused headers, etc.
2010-02-07 01:07:58 +00:00
Tim Kientzle
d180e2b3d4 Fill in some missing error handling, be a little more careful about
error reporting, prefer int64_t to off_t.
2010-02-06 20:41:25 +00:00
Tim Kientzle
c92560005d bsdtar doesn't actually know what compression is supported by libarchive
and it should not pretend that it does.  It should just pass along the
user's request and handle an error if it's not supported.
2010-02-06 20:36:14 +00:00
Tim Kientzle
12d4db7c3f Refactor the siginfo/sigusr1 handling. The read/write reporting
is sufficiently different that it was simpler to just put separate
reporting functions into read.c and write.c rather than try to have
a single all-purpose reporting function.
Switch to a custom function for converting int64_t to a string; in
the portable version, this saves a lot of configuration headaches
trying to decipher the platform printf().
2010-02-06 20:27:36 +00:00
Tim Kientzle
82fb15c15a Remove all traces of an experiment for handling "root" on Windows systems. 2010-02-06 19:56:32 +00:00
Tim Kientzle
2be336325b Reformat the Makefile slightly. 2010-02-06 19:53:48 +00:00
Tim Kientzle
67d6d61952 Allow -b up to 8192. I've had reports from people who routinely
use -b 2048 (1MiB block size).  Setting the limit to 8192 should
allow some room for growth while still helping people who mistakenly
put in byte counts here instead of block counts.
2010-02-06 19:48:59 +00:00
Tim Kientzle
ae41a0ad92 Diff reduction compared to portable bsdtar 2.8: Move the
program name into a global, which eliminates an extra
argument from a lot of places.
2010-02-06 19:44:37 +00:00
Jaakko Heinonen
c065c0b8e1 - Cast intptr_t, pid_t and time_t values to intmax_t and use %jd with
printf.
- Cast the system call return value to long and use %ld in a printf in
  ktrsysret().

PR:		bin/123774
MFC after:	2 weeks
2010-02-06 16:01:38 +00:00
Antoine Brodin
341631ae1a Document one more file descriptor type and two more vnode types.
MFC after:	2 weeks
2010-02-06 11:29:06 +00:00
Matt Jacob
adaa8f14dd Fix gcore so that it can have the '-s' flag without hanging. 2010-02-05 18:28:43 +00:00
Xin LI
89ff1978d6 Fix a bug in previous revision.
The bc(1) program may need to deal with files when it's being run in
interactive mode, so we can not blindly use interactive mode (in turn
use libedit) but need to check if the input source is really the standard
input.

This commit should fix a regression where 'bc -l' would not parse the
mathlib.

Reported by:	trasz
2010-02-05 18:17:17 +00:00
Xin LI
4218135bf7 Use libedit when interacting with tty, which provided history
functionality, etc. as did by GNU bc.

This also fixes an issue where BSDL bc can not handle very long
line.

Reported by:	imp
Reviewed by:	imp
2010-02-04 18:43:05 +00:00
Gabor Kovesdan
7121df6349 - style(9)
Approved by:	delphij (mentor)
2010-02-03 21:06:13 +00:00