Commit Graph

10770 Commits

Author SHA1 Message Date
Ed Schouten
9a41df2a0e Remove WARNS=6 lines.
WARNS=6 is already implied at this point.
2012-10-18 15:39:29 +00:00
Attilio Rao
2e564269d0 Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.
2012-10-18 12:04:56 +00:00
Attilio Rao
e6116d5b8e Disconnect non-MPSAFE NWFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netncp, which is a base
requirement for NWFS.

In the possibility of a future maintenance of the code and later
readd to the FreeBSD base, maybe we should think about a better location
for netncp. I'm not entirely sure the / top location is actually right,
however I will let network people to comment on that more specifically.

This is not targeted for MFC.
2012-10-17 11:16:17 +00:00
David E. O'Brien
22ddf6d447 Obey the value of "MK_BMAKE". 2012-10-16 15:43:16 +00:00
Gabor Kovesdan
d38ae94bce - Remove GNU sort and the WITH_GNU_SORT knob 2012-10-13 18:40:39 +00:00
Ed Maste
b6eec535d3 Use CLOCK_UPTIME to get the uptime. 2012-10-12 15:03:28 +00:00
Joel Dahl
aee53c332e Remove contractions. 2012-10-07 20:01:41 +00:00
Andriy Gapon
09606b760a make: report :M or :N pattern in debug mode
MFC after:	12 days
2012-10-06 19:19:32 +00:00
Marcel Moolenaar
d4d90f10bc Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE.  The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here.  The option will be removed in due time.

Submitted by:	Simon Gerraty (sjg@juniper.net)
2012-10-06 19:19:21 +00:00
Martin Cracauer
93a2fe45a6 Allow time offsets to be negative, e.g. at 1530 - 15 minutes.
This is useful if you have been given some time for some event in some
format and you want your computer to do something to prepare for it.
Without having to do time arithmetic in a shellscript.

The syntax matches what the at(1) usually used on Linux supports.
2012-10-05 17:54:27 +00:00
Eitan Adler
8e0079a07a Implement the Sun/GNU extension of using a default
prefix when no arguments are supplied.

Reviewed by:	jilles
Approved by:	cperciva
MFC after:	1 week
2012-10-02 00:30:26 +00:00
Eitan Adler
bf38ffc95f add SG state type
PR:		bin/171664
Submitted by:	Jan Beich jbeich@tormail.org
Approved by:	cperciva
MFC after:	1 week
2012-10-02 00:30:20 +00:00
Kevin Lo
e81fdb14a9 Add missing va_end. 2012-09-29 16:19:01 +00:00
Kevin Lo
ba670ce023 Make sure that each va_start has one and only one matching va_end,
especially in error cases.
2012-09-28 07:51:30 +00:00
Matthew D Fleming
b424efd5b1 Fix usr.bin/ and usr.sbin/ build with a 64-bit ino_t.
Original code by:	Gleb Kurtsou
2012-09-27 23:31:19 +00:00
Jilles Tjoelker
bedab466ce find: Do not pass fd to save current directory to child processes.
This removes one of the two wrongly passed file descriptors. The other one
appears to be from fts(3).

MFC after:	1 week
2012-09-26 20:16:15 +00:00
Kevin Lo
d1f1954b23 Teach getent(1) to look up a hostname and find IPv6 addresses.
PR:	bin/161548
Submitted by:	matthew
2012-09-26 09:29:48 +00:00
Jilles Tjoelker
5677eef9a7 kdump: Pretty-print signal codes.
MFC after:	1 week
2012-09-22 12:40:00 +00:00
David E. O'Brien
e279d5688e yes(1) actually comes from V7.
Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-09-17 23:04:15 +00:00
Alexander V. Chernikov
8b3daf895a Make systat(1) accept fractional number of seconds.
Make old alarm(3)-based code use select(2).

MFC after:	2 weeks
2012-09-17 13:36:47 +00:00
Edward Tomasz Napierala
d8c4c83314 Remove references to userstat(1) and jailstat(1). Those tools were never
merged from the Perforce branch.  They might be brought in when %CPU limits
go into the tree.

PR:		docs/171240
MFC after:	2 weeks
2012-09-16 23:25:13 +00:00
Andrey Zonov
5695afded4 - Make truss thread-aware.
Approved by:	kib (mentor)
MFC after:	2 weeks
2012-09-16 14:38:01 +00:00
Peter Jeremy
e6f5b72e5d - Add myself as a new src committer.
- Sort jhb's mentees
- Add grog's (ex-)mentor

Approved by:	jhb (co-mentor), grog (co-mentor)
2012-09-16 06:44:58 +00:00
Konstantin Belousov
2a43855795 Handle AT_TIMEKEEP in procstat(1) -x [1]. Remove the AT_COUNT switch
case, since AT_COUNT is not an aux vector, it is the counter of total
number of defined vectors.

PR:	bin/171662 [1]
MFC after:	1 week
2012-09-16 05:52:54 +00:00
Jilles Tjoelker
7cbda73825 sh: Prefer internal nextopt() to libc getopt().
This reduces code duplication and code size.

/usr/bin/printf is not affected.

Side effect: different error messages when certain builtins are passed
invalid options.
2012-09-15 21:56:30 +00:00
Eitan Adler
96240c89f0 Correct double "the the"
Approved by:	cperciva
MFC after:	3 days
2012-09-14 21:28:56 +00:00
Eitan Adler
eae8be706e Bump date missed in r202756
PR:		docs/171624
Submitted by:	bdrewery
Approved by:	gabor
MFC after:	3 days
2012-09-14 17:50:42 +00:00
Dag-Erling Smørgrav
0e50a83330 Use libmd if and only if OpenSSL is not available.
PR:		bin/171402
MFC after:	3 days
2012-09-14 13:00:43 +00:00
Ed Schouten
8f8f476390 Switch batch to an SLIST.
This code requires none of the features of LIST.
2012-09-12 22:16:31 +00:00
David E. O'Brien
e5deeefec6 Add MK_KDUMP. 2012-09-12 14:58:07 +00:00
Andrey Zonov
896fc4638a - Fix detaching under some circumstances.
When truss is detaching from very active process it is possible to
  hang on waitpid(2) in restore_proc() forever, because
  ptrace(PT_SYSCALL) must be called before detaching, to allow the
  debugging process to continue execution.  Also when truss called with
  '-c' argument, it does not print anything after detach, because it
  immediately exits from restore_proc().

  To fix these two problems make detaching deferred, but then it is
  impossible to detach from a process which does not do any system call.
  To fix this issue use sigaction(2) instead of signal(3) to disable
  SA_RESTART flag for waitpid(2) that makes it non-restartable.  Remove
  global variable child_pid, because now detaching is handled in context
  where child's pid is known.

Reported by:	mjg
Tested by:	mjg, swills
Approved by:	kib (mentor)
MFC after:	2 weeks
2012-09-12 13:06:57 +00:00
Xin LI
3860fabcb0 WARNS is now default to 6. 2012-09-11 21:13:18 +00:00
Joel Dahl
441dec8466 Minor mdoc fix. 2012-09-11 19:25:59 +00:00
Dimitry Andric
620a62e0fc Ensure mkcsmapper and mkesdb compile with clang, if WITH_ICONV is
defined.

Submitted by:	zeising
PR:		bin/167481
MFC after:	3 days
X-MFC-With:	r238197
2012-09-11 16:32:31 +00:00
Andrey Zonov
310da894b7 - Remove unused variables.
- Remove redundant return after err(3) call.

Approved by:	kib (mentor)
2012-09-11 16:30:26 +00:00
Jason E. Hale
8e5c2a044e - Add myself to calendar.freebsd
- Add my mentor relationships to committers-ports.dot

Approved by:	makc (mentor)
2012-09-11 13:29:50 +00:00
Joel Dahl
c664bd4634 mdocify the chat(8) manual page.
Reviewed by:	brueffer
2012-09-10 11:08:08 +00:00
Dag-Erling Smørgrav
baf0230645 Note that -quit terminates successfully.
Requested by:	jmg@
2012-09-10 07:56:59 +00:00
Dag-Erling Smørgrav
9168a75a66 Document -quit, four and a half years after it was implemented.
MFC after:	3 days
Pointy hat to:	imp@
2012-09-09 13:18:13 +00:00
Joel Dahl
52f72e1b03 Remove clause 3 and 4 from the NetBSD Foundation copyright header, missed
in r203971.
2012-09-09 07:23:15 +00:00
Joel Dahl
e037c73138 Remove trailing whitespace. 2012-09-09 06:54:42 +00:00
Gleb Smirnoff
d6d3f01e0a Merge the projects/pf/head branch, that was worked on for last six months,
into head. The most significant achievements in the new code:

 o Fine grained locking, thus much better performance.
 o Fixes to many problems in pf, that were specific to FreeBSD port.

New code doesn't have that many ifdefs and much less OpenBSDisms, thus
is more attractive to our developers.

  Those interested in details, can browse through SVN log of the
projects/pf/head branch. And for reference, here is exact list of
revisions merged:

r232043, r232044, r232062, r232148, r232149, r232150, r232298, r232330,
r232332, r232340, r232386, r232390, r232391, r232605, r232655, r232656,
r232661, r232662, r232663, r232664, r232673, r232691, r233309, r233782,
r233829, r233830, r233834, r233835, r233836, r233865, r233866, r233868,
r233873, r234056, r234096, r234100, r234108, r234175, r234187, r234223,
r234271, r234272, r234282, r234307, r234309, r234382, r234384, r234456,
r234486, r234606, r234640, r234641, r234642, r234644, r234651, r235505,
r235506, r235535, r235605, r235606, r235826, r235991, r235993, r236168,
r236173, r236179, r236180, r236181, r236186, r236223, r236227, r236230,
r236252, r236254, r236298, r236299, r236300, r236301, r236397, r236398,
r236399, r236499, r236512, r236513, r236525, r236526, r236545, r236548,
r236553, r236554, r236556, r236557, r236561, r236570, r236630, r236672,
r236673, r236679, r236706, r236710, r236718, r237154, r237155, r237169,
r237314, r237363, r237364, r237368, r237369, r237376, r237440, r237442,
r237751, r237783, r237784, r237785, r237788, r237791, r238421, r238522,
r238523, r238524, r238525, r239173, r239186, r239644, r239652, r239661,
r239773, r240125, r240130, r240131, r240136, r240186, r240196, r240212.

I'd like to thank people who participated in early testing:

Tested by:	Florian Smeets <flo freebsd.org>
Tested by:	Chekaluk Vitaly <artemrts ukr.net>
Tested by:	Ben Wilber <ben desync.com>
Tested by:	Ian FREISLICH <ianf cloudseed.co.za>
2012-09-08 06:41:54 +00:00
Mikolaj Golub
39f6ca6553 Free memory allocated by procstat_getfiles(), which may make difference
when procstat(1) is run with -a option.

Submitted by:	Daniel Dettlaff <dmilith gmail com>
MFC after:	1 week
2012-09-04 05:54:43 +00:00
Andrey Zonov
94355cfdfd - Style(9) cleanup.
Approved by:	kib (mentor)
2012-09-02 11:03:18 +00:00
Ed Schouten
902d9eafbf Rework all non-contributed files that use `struct timezone'.
This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:

	int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.

While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.
2012-09-01 14:45:15 +00:00
Edward Tomasz Napierala
aeb99b567a Improve description for "rctl -l".
MFC after:	2 weeks
2012-09-01 11:24:02 +00:00
Andrey Zonov
46448452c0 - Remove unused variables.
- Fix warnings about comparing signed and unsigned ints.

Approved by:	kib (mentor)
2012-08-30 08:54:13 +00:00
Dimitry Andric
5ea2b3b5db Sprinkle a bit of style.Makefile(5) across various clang Makefiles. No
functional changes.

MFC after:	3 days
2012-08-23 17:08:07 +00:00
Andrey Zonov
3ff6b7162e - Put arguments for print_syscall_ret() function in proper order.
Bug was introduced in r192025.

Approved by:	kib (mentor)
2012-08-23 12:20:29 +00:00
Dimitry Andric
5d15267e31 When WITH_CLANG_EXTRAS is enabled, avoid needlessly building the llvm
and clang extras in the cross-tools stage.

MFC after:	1 week
2012-08-21 18:24:11 +00:00
Dimitry Andric
f37c3908ee Support the WITH_SHARED_TOOLCHAIN setting that was introduced in r234782
for the clang executable.  Build it statically by default, like the gcc
executables, which should improve performance a little bit.

MFC after:	1 week
2012-08-21 17:58:30 +00:00
Andrey Zonov
be305c9c9f - Use pid_t type instead of just int.
Approved by:	kib (mentor)
2012-08-21 14:58:51 +00:00
Andrey Zonov
7393414c5c - Add myself to the calendar.
Approved by:	kib (mentor)
2012-08-21 12:47:34 +00:00
Dimitry Andric
7ae0e2c9f0 Upgrade our copy of llvm/clang to trunk r162107. With thanks to
Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
2012-08-20 18:33:03 +00:00
Kevin Lo
b918e60351 Cleanup use of 'host' when running 'rpcinfo -p'.
Obtained from:	NetBSD
2012-08-18 16:14:50 +00:00
Oleksandr Tymoshenko
4da573d910 Merging of projects/armv6, part 3
r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions.  In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
 * GCC to default to arm1176jz-s
 * GCC to predefine __FreeBSD_ARCH_armv6__
 * gas to default to ARM_ARCH_V6K
 * uname -p to return 'armv6'
 * make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by:	Tim Kientzle <kientzle@freebsd.org>
2012-08-15 03:21:56 +00:00
Dimitry Andric
30a845609c In usr.bin/make/var.c, function ParseModifier(), initialize the 'error'
variable to NULL, to avoid using it uninitialized in certain cases.

This fixes the following clang 3.2 warning:

  usr.bin/make/var.c:1770:10: error: variable 'error' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
                                          if (vp->execute) {
                                              ^~~~~~~~~~~
  usr.bin/make/var.c:1777:10: note: uninitialized use occurs here
                                          if (error)
                                              ^~~~~
  usr.bin/make/var.c:1770:6: note: remove the 'if' if its condition is always true
                                          if (vp->execute) {
                                          ^~~~~~~~~~~~~~~~~
  usr.bin/make/var.c:1768:23: note: initialize the variable 'error' to silence this warning
                                          const char      *error;
                                                                ^
                                                                 = NULL

MFC after:      1 week
2012-08-05 15:55:36 +00:00
Bryan Drewery
7b2873fb83 - Add myself to calendar.freebsd
- Add my mentor relationships to committers-ports.dot

Approved by:	eadler (mentor)
2012-08-01 17:48:38 +00:00
Jilles Tjoelker
b562679671 find: Remove unnecessary and inconsistent initialization.
Submitted by:	jhb
2012-07-31 16:55:41 +00:00
Brian Somers
fabb5579bb Mention when -d, -p and -r first hit FreeBSD.
Bump the document date to when the change was made (rather than when the PR
was submitted).

Suggested by:	pluknet
2012-07-30 08:06:00 +00:00
Brian Somers
df53360c76 Add d, p and r switches for recording script sessions with timing data
and playing sessions back with or without time delays.

PR:		114465
Submitted by:	ighighi at gmail dot com
MFC after:	3 weeks
2012-07-30 07:13:06 +00:00
Martin Matuska
fd082e96c4 Update libarchive to 3.0.4 2012-07-28 06:38:44 +00:00
Sergey Kandaurov
0fafb093b9 Document -g option in the usage string. 2012-07-26 20:41:36 +00:00
Jilles Tjoelker
40072dc2b7 find: Implement real -ignore_readdir_race.
If -ignore_readdir_race is present, [ENOENT] errors caused by deleting a
file after find has read its name from a directory are ignored.

Formerly, -ignore_readdir_race did nothing.

PR:		bin/169723
Submitted by:	Valery Khromov and Andrey Ignatov
2012-07-25 21:59:10 +00:00
Mikolaj Golub
b18b53bad0 Align the header with output.
MFC after:	3 days
2012-07-24 19:40:12 +00:00
Hiroki Sato
70a8f993c0 Fix a bug which prevents "nfsstat -W" for server statistics from working. 2012-07-22 18:59:31 +00:00
Dag-Erling Smørgrav
69739e8da5 Add -g (gigabyte) flag to complement -k (kilobyte) and -m (megabyte).
MFC after:	1 week
2012-07-18 19:28:22 +00:00
David E. O'Brien
bd51eebf04 Sort per the comment. 2012-07-18 07:07:54 +00:00
Gabor Pali
599fc82b06 - Add support for displaying process stack memory regions.
Approved by:	rwatson
MFC after:	3 days
2012-07-16 09:38:19 +00:00
Michael Tuexen
3dcc856b6c Allow netstat to be build if INET is not defined in the kernel.
Thanks to Garrett Cooper for reporting the issue.

MFC after: 3 days
X-MFC: 238501
2012-07-16 06:43:04 +00:00
Eitan Adler
e43ecd2b15 Fix spelling
PR:		bin/167480
Submitted by:	zeising
Approved by:	cperciva
2012-07-07 17:05:55 +00:00
Tim Kientzle
fc4dff81bb Unbreak building WITH_ICONV=yes and new yacc. 2012-07-07 04:14:28 +00:00
Gabor Kovesdan
5d5151ae7e - Change --nthreads parameter to --parallel for GNU compatibility
- Change default sort method to mergesort, which has a better worst case
  performance than qsort

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-07-04 16:25:11 +00:00
Mikolaj Golub
eaa769f547 Fix style.
MFC after:	3 days
2012-07-03 19:11:38 +00:00
Niclas Zeising
d9455a4113 Add myself to commiters-[doc,ports].dot and calendar.freebsd
Approved by:	joel (doc/www mentor)	kwm (ports mentor)
2012-07-03 07:28:57 +00:00
John Baldwin
54900c9b1f Fix two layout bugs in the previous change:
- Properly increase y_mem when per-CPU stats are enabled.
- Update y_arc for per-CPU stats being enabled/disabled.

MFC after:	3 days
2012-07-02 20:08:11 +00:00
Konstantin Belousov
5a21698e2c Issue proper diagnostic on the short writes, also consider the
case of write reporting 0 bytes as short write.

Reported and tested by:	adreast
MFC after:   1 week
2012-07-02 09:53:57 +00:00
Konstantin Belousov
c517bc1502 Once in a month, when the moon is full, killall mistakenly considers
living process as a zombie and refuses to kill it. The cause is that
the code masks ki_stat with SZOMB to compare with SZOMB, but ki_stat
is not a mask.

Possibly reported by:	cperciva
MFC after:	3 days
2012-06-30 16:36:22 +00:00
Konstantin Belousov
407e615c68 killall(1) does not use libkvm.
MFC after:	3 days
2012-06-30 16:23:08 +00:00
Konstantin Belousov
a488a0f1d2 Only initialize array of mibs once.
MFC after:	3 days
2012-06-30 16:21:51 +00:00
Konstantin Belousov
40bcb503f1 Initialize procs closer to the place were it is used.
Free can properly handle NULL pointer (but keep free() call on the premise
that the code might be reused).
Show errno when realloc failed.

MFC after:	3 days
2012-06-30 16:20:01 +00:00
Andrew Thompson
c7bec96b05 Update the usage with the new jail option.
Spotted by:	Jason Hellenthal
MFC after:	3 days
2012-06-27 23:26:32 +00:00
John Baldwin
2e52fb92ff Add a new line to top that provides a brief summary of the ZFS ARC memory
usage on hosts using ZFS.  The new line displays the total amount of RAM
used by the ARC along with the size of MFU, MRU, anonymous (in flight),
headers, and other (miscellaneous) sub-categories.  The line is not
displayed on systems that are not using ZFS.

Reviewed by:	avg, fs@
MFC after:	3 days
2012-06-27 18:08:48 +00:00
John Baldwin
17cf6fc527 Clarify that the cached file data pages included in the "Wired" count
in top are the BIO-level cached data (i.e. "Buf"), since the previous
phrase was a bit ambiguous with the "Cache" count.

MFC after:	3 days
2012-06-27 12:30:56 +00:00
Gabor Kovesdan
7d26b3ee33 - Switch to BSD sort as default sort. GNU sort will still be installed as
"gnusort".  Most of the BSD sort development work was done by
  Oleg Moskalenko <oleg.moskalenko@citrix.com>.
- GNU grep can be set to default by setting WITH_GNU_GREP.  It will cause
  BSD sort to be installed as "bsdsort".

Portbuild tested by:    linimon
2012-06-27 05:59:01 +00:00
Gabor Kovesdan
d826ccd66d - Disable threaded sort by default
- Fix typo in the NLS support
2012-06-27 05:50:15 +00:00
Xin LI
8d5ec3937c Add a -I flag which requests confirmation before action, like what is done
in pkill(1).

MFC after:	2 weeks
2012-06-27 00:50:25 +00:00
Xin LI
96e55cc72d MFV: less v449. 2012-06-26 23:17:33 +00:00
Xin LI
a2953f767d MFV: Update zlib to 1.2.7.
(x86 assembler optimization disabled for now because it
requires the new .cfi_* directives that is not supported
by base system binutils).

MFC after:	1 week
2012-06-21 21:47:08 +00:00
Xin LI
6c49347e3e Currently the code uses gzFile * for a zlib file descriptor, which
is not correct.  The code works by accident because gzFile is
currently defined as void *, and internally it would be casted from
or to its real type.

A newer version of zlib will instead define it as a pointer to a
specific type pointer (namely, struct gzFile_s *).  This therefore
would cause stricter checks and compiler would catch this type
mismatch.

This change does not cause any changes to the resulting binary,
as validated with md5(1).

MFC after:	3 days
2012-06-20 23:53:36 +00:00
David E. O'Brien
83b322edc6 Correct typo in version. 2012-06-20 00:37:00 +00:00
Navdeep Parhar
09fe63205c - Updated TOE support in the kernel.
- Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs.
  These are available as t3_tom and t4_tom modules that augment cxgb(4)
  and cxgbe(4) respectively.  The cxgb/cxgbe drivers continue to work as
  usual with or without these extra features.

- iWARP driver for Terminator 3 ASIC (kernel verbs).  T4 iWARP in the
  works and will follow soon.

Build-tested with make universe.

30s overview
============
What interfaces support TCP offload?  Look for TOE4 and/or TOE6 in the
capabilities of an interface:
# ifconfig -m | grep TOE

Enable/disable TCP offload on an interface (just like any other ifnet
capability):
# ifconfig cxgbe0 toe
# ifconfig cxgbe0 -toe

Which connections are offloaded?  Look for toe4 and/or toe6 in the
output of netstat and sockstat:
# netstat -np tcp | grep toe
# sockstat -46c | grep toe

Reviewed by:	bz, gnn
Sponsored by:	Chelsio communications.
MFC after:	~3 months (after 9.1, and after ensuring MFC is feasible)
2012-06-19 07:34:13 +00:00
Jilles Tjoelker
eb55578582 find(1): Move description of -d option to -depth primary.
The nullary -depth primary is standard and the -d option provides little
advantage.

PR:		docs/168885
MFC after:	1 week
2012-06-13 21:53:40 +00:00
Dag-Erling Smørgrav
7aa2051e40 None of these programs actually use auth.conf.
MFC after:	1 week
2012-06-11 16:18:39 +00:00
Kevin Lo
0087e1818e Fix typo 2012-06-11 03:10:15 +00:00
Kevin Lo
d334b28625 - Consistenly mention columns and fields
- Add -b to short error messages

Obtained from:	NetBSD
2012-06-11 03:02:40 +00:00
Isabell Long
a86224465d Add more description and clarification about the -depth and -d options in
both places where they are mentioned in find(1).

Discussed with:	dougb
PR:		docs/168885
Reported by:	Ronald F. Guilmette (rfg at tristatelogic dot com)
Approved by:	gabor (mentor)
MFC after:	3 days
2012-06-10 22:14:52 +00:00
Jilles Tjoelker
587714504f touch: Add the -d option from POSIX.1-2008.
This is much like -t but with a different format which is ISO8601-like and
allows fractions of a second.

The precision is limited to microseconds because of utimes() and friends,
even though stat() returns nanoseconds.

MFC after:	10 days
2012-06-10 14:26:51 +00:00
David E. O'Brien
b379932fc0 Import the 6-May-2012 release of the "Portable" BSD make tool (from NetBSD).
Submitted by:	sjg@juniper.net
2012-06-08 21:57:36 +00:00
Gabor Kovesdan
89b7a5879e - Remove the UNUSED_ARG macro and use __unused in argument lists
Reviewed by:	dim
MFC after:	3 days
2012-06-08 19:21:49 +00:00
Dimitry Andric
2ac58c1d79 In usr.bin/sort, use another method of silencing warnings about unused
arguments, which does not trigger self-assignment warnings in certain
circumstances (for example, using clang with ccache).

MFC after:	3 days
2012-06-08 17:08:27 +00:00
Ashish SHUKLA
9e465b8795 Add myself to the calendar. 2012-06-08 01:51:49 +00:00
Eitan Adler
3e0efd2ec4 Fix style nit: don't use leading zero for dates in .Dd
Prompted by:	brueffer
Approved by:	brueffer
MFC after:	3 days
2012-06-05 03:14:39 +00:00
John Baldwin
01a36e296d Allow the -p argument to kdump to accept either a PID or a thread ID.
Submitted by:	Dmitry Banschikov  d.banschikov hostcomm ru
MFC after:	1 week
2012-06-04 19:09:14 +00:00
Joel Dahl
8cc9f126ee Minor mdoc improvements. 2012-06-03 11:09:51 +00:00
Eitan Adler
5102783b6e Document the limitations of the -delete primary
PR:		bin/166554
Submitted by:	Richard Kettlewell <rjk@greenend.org.uk>
Discussed with:	jilles
Approved by:	bcr
MFC after:	3 days
2012-06-02 03:13:27 +00:00
Jase Thew
0a5a71dc16 Add myself as a new committer.
Approved by:	flo, culot (mentors)
2012-06-01 08:44:17 +00:00
David E. O'Brien
28c508787d Update date for r236338 & r236346. 2012-05-31 20:13:44 +00:00
John Baldwin
5c506fb0b4 Don't trace or dump page fault records in the default set of tracepoints
as they can be quite noisy.

Requested by:	Peter Jeremy
MFC after:	3 days
2012-05-31 14:46:02 +00:00
David E. O'Brien
b3dc6c07e2 Add "-V '${VAR}'" variable expansion from Portable Berkeley Make.
Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-05-31 00:36:56 +00:00
David E. O'Brien
d81f04d7fa Deprecate the FreeBSD make's ":U" (to-upper case) and ":L" (to-lower case)
modifiers for ":tu" and ":tl" from OSF's ODE, which made its way into
NetBSD's make, which is the source for the Portable Berkeley Make.

Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-05-30 22:23:08 +00:00
Eitan Adler
35f8ab70be Fix likely race condition if wait_child() is interrupted by sigchild()
PR:		bin/102834
Submitted by:	Andreas Longwitz <longwitz@incore.de>
Approved by:	cperciva
MFC after:	2 weeks
2012-05-30 03:55:44 +00:00
Dag-Erling Smørgrav
5fca4d10aa Pass a filename, rather than a file descriptor, to libarchive.
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua>
MFC after:	1 week
2012-05-29 09:11:19 +00:00
Kevin Lo
544c5e5b53 Make sure that each va_start has one and only one matching va_end,
especially in error cases.
2012-05-29 01:48:06 +00:00
Dag-Erling Smørgrav
0ce8603c4a Revert r232274 - unauthorized, unnecessary and incorrect. 2012-05-26 17:19:41 +00:00
Dag-Erling Smørgrav
2f3ed61901 Update to OpenPAM Micrampelis. 2012-05-26 17:10:16 +00:00
Joel Dahl
2dbc3019d0 mdoc: sort sections into conventional order. 2012-05-26 06:31:54 +00:00
Gabor Kovesdan
5ca724dc59 - Only use multi-threading for large files
- Do not use mmap() by default; it can be enabled by --mmap
- Add some minor optimizations for -u
- Update manual page according to the changes

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-05-25 09:30:16 +00:00
Grzegorz Bernacki
255f31647e Fix resolving symbol names on ARM.
On ARM, binutils are adding '$a' symbols in the symbol table for
every function (in addition to normal symbol). When gprof(1) looks
up symbol name, it often reads '$a' instead of proper function name,
because it find it first. With this fix, when read symbol name
begins with '$' and previous symbol has the same address, it will
use previous symbol name (which is proper function name).

Obtained from:	Semihalf
2012-05-25 06:48:42 +00:00
Josh Paetzel
f9b897ba2e Hook up mkulzma to the build.
MFC after:	3 days
2012-05-24 16:11:51 +00:00
Alexander Motin
f6ad3f237a MFprojects/zfsd:
Revamp the CAM enclosure services driver.
This updated driver uses an in-kernel daemon to track state changes and
publishes physical path location information\for disk elements into the
CAM device database.

Sponsored by:   Spectra Logic Corporation
Sponsored by:   iXsystems, Inc.
Submitted by:   gibbs, will, mav
2012-05-24 14:07:44 +00:00
Warren Block
344c81a166 Fixes to man8 groff mandoc style, usage mistakes, or typos.
PR:		168016
Submitted by:	Nobuyuki Koganemaru
Approved by:	gjb
MFC after:	3 days
2012-05-24 02:24:03 +00:00
Andrew Thompson
00feaafdf8 Allow the socket list to be limited to a specific jail id.
No objections:	current@
2012-05-24 01:31:10 +00:00
Joel Dahl
b59864441e Fix error reported by mandoc. 2012-05-23 18:41:45 +00:00
Xin LI
ba21c2b408 commandline -> command line
MFC after:	1 week
2012-05-22 19:40:54 +00:00
Baptiste Daroussin
5e2a209a27 Fix world after byacc import:
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
  'yyparse'

Approved by:	des (mentor)
2012-05-22 16:33:10 +00:00
Baptiste Daroussin
98e903e7a0 Import byacc from invisible island, it brings us lots of compatibilities with
bison, keeping full compatibility with our previous yacc implementation.

Also bring the ability to create reentrant parser

This fix bin/140309 [1]

PR:		bin/140309 [1]
Submitted by:	Philippe Pepiot <ksh@philpep.org> [1]
Approved by:	des (mentor)
MFC after:	1 month
2012-05-21 13:31:26 +00:00
Marcel Moolenaar
1eb9695119 Bring DPADD in sync with LDADD. 2012-05-19 05:07:03 +00:00
Gleb Kurtsou
e458cb776e Don't cast inode number or file size down to long or unsigned.
Since ino_t size is about to change to 64-bits, casts to long would
truncate 64-bit numbers on 32-bit archs.

Sponsored by:	Google Summer of Code 2011
2012-05-18 10:15:46 +00:00
Glen Barber
cbc1e6c2f3 Fix a typo that crept in.
Pointyhat:	gjb (myself)
Spotted by:	hrs
MFC after:	2 days (minor change)
2012-05-18 03:30:50 +00:00
Gabor Kovesdan
f50d9b2ffb - Fix -o option that was broken by my clang compile fix
Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-05-17 13:08:30 +00:00
Konstantin Belousov
6fe3ecc3b1 Allow to specify strftime(3) format for process start end exit times.
Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-05-17 11:10:13 +00:00
Alexander Motin
e39e854e27 Add support for -z option for reading operations. It allows to not request
current values from device, but only receive changes.
2012-05-16 20:30:20 +00:00
Gabor Kovesdan
ce1e997f54 - Eliminate initializations if global variables. Compilers are not
required to optimize these so it may result in larger binary size.

Pointed out by:	kib
2012-05-14 10:06:49 +00:00
Gabor Kovesdan
131a228a6d - Update catalogs 2012-05-14 09:55:23 +00:00
Gabor Kovesdan
8818aa392a - Fix build with clang 2012-05-14 09:53:54 +00:00
Joel Dahl
35471bf8ef Minor mdoc nits. 2012-05-13 14:16:04 +00:00
Joel Dahl
4228c8a2b1 Remove end of line whitespace. 2012-05-12 19:59:37 +00:00
Gabor Kovesdan
85d7de106c - Hook up BSD sort to the build. By default, it will be installed as
"bsdsort" and GNU sort will be the default "sort".  When WITH_BSD_SORT
  is set, BSD sort will be the default "sort" and GNU sort will be installed
  as "gnusort".
2012-05-11 12:47:21 +00:00
Gabor Kovesdan
c66bbc9143 Add a BSD-licensed sort rewrite that was started by me and later completed
with the major functionality and optimizations by Oleg Moskalenko.
It is compatible with the latest version of POSIX and the current GNU sort
version that we have in base.  Beside this, it implements all the
functionality introduced in later versions of GNU sort.  For now, it will
be installed as "bsdsort", keeping GNU sort as the default sort
implementation.
2012-05-11 12:37:16 +00:00
Glen Barber
22563741c0 Document the unzip(1) '-Z' option implemented in r234206.
Submitted by:	swills (via hacker lounge)
MFC after:	3 days
2012-05-11 00:19:06 +00:00
Glen Barber
2fccbf04cc General mdoc(7) and typo fixes.
PR:		167696
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-10 02:07:00 +00:00
Warner Losh
18cf7ddfca Make is part of the bootstrap path, so we need to guard against this
not being defined.  Otherwise we don't make a new make when the old
make is incompatible.
2012-05-09 04:54:50 +00:00
Jeremie Le Hen
d3dee93474 Always define LD_32_PRELOAD so it works for 32 bits binaries on
64 bits platforms.  Let rtld(1) decide if it needs to honor it
or not.

While here, fix a small bug in error reporting when asprintf(3)
returns an error.

Submitted by:	kib
Reviewed by:	kib (mentor)
MFC after:	1 week
2012-05-08 19:43:32 +00:00
Dimitry Andric
cb4dff8563 Upgrade our copy of llvm/clang to r155985, from upstream's release_31
branch.  This brings us very close to the 3.1 release, which is planned
for May 14th.

MFC after:	2 weeks
2012-05-03 20:41:21 +00:00
Baptiste Daroussin
bdb6d17264 Respect mathematical operation order piority with the exponent gnu extension
Obtained from:	OpenBSD
Approved by:	des (mentor)
2012-04-30 21:02:57 +00:00
Konstantin Belousov
4f20e4f263 Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
toolchain binaries as dynamically linked.  Option is disabled by
default.

Reviewed by:	ru (previous version)
MFC after:	2 weeks
2012-04-29 09:32:44 +00:00
Jeremie Le Hen
3c2ded8bbc Use standard getopt(3) error message.
Submitted by:	jilles
Approved by:	kib (mentor)
2012-04-29 08:17:44 +00:00
Jeremie Le Hen
6486b015fc Import stdbuf(1) and the shared library it relies on.
This tool changes the default buffering behaviour of standard
stdio streams.

It only works on dynamic binaries.  To make it work for static
ones it would require cluttering stdio because there no single
entry point.

PR:		166660
Reviewed by:	current@, jhb
Approved by:	kib (mentor)
MFC after:	1 week
2012-04-28 20:52:20 +00:00
Jeremie Le Hen
195f880ec6 Add my birthday and place of birth.
Approved by:	kib (mentor)
2012-04-23 09:18:05 +00:00
Christian Brueffer
fbe83f25fb Remove duplicate -l description.
Submitted by:	Rainer Hurling <rhurlin@gwdg.de>
MFC after:	1 week
2012-04-22 18:18:49 +00:00
Xin LI
5083afda56 The .Fx macro needs the version number be in its own word separated by
a space.  This change have no visible effect for rendering.
2012-04-22 07:55:56 +00:00
John Baldwin
88bf5036fc Include the associated wait channel message for context switch ktrace
records.  kdump supports both the old and new messages.

Submitted by:	Andrey Zonov  andrey zonov org
MFC after:	1 week
2012-04-20 15:32:36 +00:00
David E. O'Brien
80c86c3659 Update file(1) to version 5.11. 2012-04-19 03:20:13 +00:00
Devin Teske
89efd8e10e Add my birth date/place to the calendar as new committer.
Approved by:	emaste (mentor)
2012-04-18 22:56:46 +00:00
Konstantin Belousov
bf313207fc Fix string buffer overflow when preparing the line of output.
PR:	bin/161739
Submitted by:	Jeremy Chadwick <freebsd jdc parodius com>
MFC after:	1 week
2012-04-18 10:23:42 +00:00
Dimitry Andric
dff0c46c97 Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks).  Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC after:	2 weeks
2012-04-16 21:23:25 +00:00
Guido Falsi
c4981340cb Add myself to the calendar
Approved by:	creees (mentor)
2012-04-15 17:28:47 +00:00
Dag-Erling Smørgrav
3664268885 Correct my name in the copyright statement. 2012-04-15 13:39:39 +00:00
Baptiste Daroussin
fb3f3d7caf Improve m4 compatibility with GNU m4 extension ** (exponent)
Submitted by:	Marc Espie (espie@OpenBSD.org)
Approved by:	des@ (mentor)
2012-04-15 13:25:51 +00:00
Xin LI
96c3073f76 Eliminate an unused parameter of static method igmp_stats_live_old().
MFC after:	1 month
2012-04-13 22:35:53 +00:00
Glen Barber
30f1a346ac Belatedly add my entry to the calendar file, now that 30 is here and gone. 2012-04-13 09:54:36 +00:00
Kevin Lo
308633f39e Partially implement zipinfo (-Z) support.
This fixes some test failures seen with perl 5.12 and 5.14.

PR:	bin/166895
Submitted by:	swills
MFC after:	3 days
2012-04-13 06:15:51 +00:00
Jens Schweikhardt
da4b9d2971 Parenthesize args in yyless() and unput() replacement text
so they are safer when used with expressions.

MFC after:	1 week
2012-04-10 15:29:28 +00:00
Dimitry Andric
085e2c2102 Since truss also uses kdump's mkioctls script, pass the value of ${CPP}
there too, similar to r234058.

MFC after:	1 week
2012-04-09 15:34:22 +00:00
Dimitry Andric
c1b2e4fc21 In kdump's mkioctls script, use '${CPP}' instead of hardcodedly using
'gcc -E'.  This fixes building when WITH_CLANG_IS_CC is in effect.

Report by:	Niclas Zeising <zeising@daemonic.se>
MFC after:	1 week
2012-04-09 14:47:18 +00:00
Joel Dahl
748611c9c0 mdoc: fix column names, indentation, column separation within each row, and
quotation. Also make sure we have the same amount of columns in each row as
the number of columns we specify in the head arguments.

Reviewed by:	brueffer
2012-04-07 09:05:30 +00:00
John Baldwin
35818d2e94 Add new ktrace records for the start and end of VM faults. This gives
a pair of records similar to syscall entry and return that a user can
use to determine how long page faults take.  The new ktrace records are
enabled via the 'p' trace type, and are enabled in the default set of
trace points.

Reviewed by:	kib
MFC after:	2 weeks
2012-04-05 17:13:14 +00:00
Gleb Smirnoff
16410af7fa With pf 4.5 import the name of pfsync stats sysctl has changed, thus
'netstat -sp pfsync' got broken. Fix this.
2012-04-04 08:30:32 +00:00
John Baldwin
e506e182dd Export some more useful info about shared memory objects to userland
via procstat(1) and fstat(1):
- Change shm file descriptors to track the pathname they are associated
  with and add a shm_path() method to copy the path out to a caller-supplied
  buffer.
- Use the fo_stat() method of shared memory objects and shm_path() to
  export the path, mode, and size of a shared memory object via
  struct kinfo_file.
- Add a struct shmstat to the libprocstat(3) interface along with a
  procstat_get_shm_info() to export the mode and size of a shared memory
  object.
- Change procstat to always print out the path for a given object if it
  is valid.
- Teach fstat about shared memory objects and to display their path,
  mode, and size.

MFC after:	2 weeks
2012-04-01 18:22:48 +00:00
Joel Dahl
1844d4fe2d Remove superfluous paragraph macro. 2012-03-29 16:07:22 +00:00
Joel Dahl
288eac5aed mandoc complains loudly when <TAB>s are misused in columnated lists. Fix
this syntax violation and while I'm here also convert <TAB> to Ta and adjust
quotation marks in order to prevent this problem in the future.
2012-03-29 16:02:40 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Juli Mallett
84db023ec1 Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software.  MIPS builds which are little-endian
should require and exhibit no changes.  Big-endian TARGET_ARCHes must be
changed:
	From:		To:
	mipseb		mips
	mipsn32eb	mipsn32
	mips64eb	mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.
2012-03-29 02:54:35 +00:00
Joel Dahl
fb9c3835c8 Only use macros inside a reference block.
Discussed with:	brueffer
2012-03-27 20:10:13 +00:00
Joel Dahl
bea977e7f6 mdoc: sort prologue macros. 2012-03-26 19:23:57 +00:00
Joel Dahl
c2965cd185 mdoc: terminate quoted strings.
Reviewed by:	brueffer
2012-03-26 15:18:14 +00:00
Joel Dahl
edf5bf9919 mdoc: document title should be all caps. 2012-03-25 19:34:05 +00:00
Joel Dahl
126b754db4 Remove superfluous paragraph macro. 2012-03-25 09:19:25 +00:00
Mikolaj Golub
ca263e0080 When displaying binary information show also osreldate.
Suggested by:	kib
MFC after:	2 weeks
2012-03-23 20:09:21 +00:00
Stanislav Sedov
0e46933c08 - Do not build libcom_err and compile_et when kerberos is disabled. They
depends on several heimdal libraries and not used by anything but kerberos
  tools.
2012-03-23 03:16:35 +00:00
Sergey Kandaurov
2d780dbb4b Garbage collect defunct nlist(3) symbols.
MFC after:	1 week
2012-03-22 09:47:14 +00:00
Stanislav Sedov
ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
Gleb Smirnoff
586fbee643 Add multibyte char support.
PR:		165429
Submitted by:	amdmi3
2012-03-21 08:03:07 +00:00
Kevin Lo
8e30a6b447 Repair function when used with large scales
Submitted by:	AIDA Shinra <shinra at j10n dot org>
2012-03-18 15:34:39 +00:00
Jilles Tjoelker
7094589003 xargs: Before exiting, wait for all invocations of the utility.
This only has an effect with -P, otherwise errors are only detected when the
utility is not running.

Submitted by:	Matthew Story
2012-03-16 16:41:28 +00:00
Kevin Lo
741e1faf5c - Fix an erroneous invocation of the editline.
- Fix wrong scaling in the bc.library.
- Let length(0.000) conform to what gnu bc does.

PR:	bin/159227
Submitted by:	AIDA Shinra <shinra at j10n dot org>
2012-03-15 01:43:44 +00:00
Dimitry Andric
6aa83769fd After r232745, which makes sure __bswap16(), ntohs() and htons() return
__uint16_t, we can partially undo r228668.

Note the remark "Work around a clang false positive with format string
warnings and ntohs macros (see LLVM PR 11313)" was actually incorrect.

Before r232745, on some arches, the ntohs() macros did in fact return
int, not uint16_t, so clang was right in warning about the %hu format
string.

MFC after:	2 weeks
2012-03-09 20:50:15 +00:00
Eitan Adler
d1b25cd91b Document the [n]eei and [n]bacc options
PR:		docs/165009
Submitted by:	Jeremy Huddleston <jeremyhu@apple.com>
Approved by:	bcr
MFC after:	1 week
2012-03-03 18:07:53 +00:00
Davide Italiano
d26d4c559a Replace the three spaces with one tag.
Reported by:	pjd
Approved by:	gnn (mentor)
2012-03-01 19:17:56 +00:00
Edward Tomasz Napierala
a29460e077 Use proper "maxproc" name, not "nproc".
PR:		docs/162172
2012-03-01 10:21:10 +00:00
Dimitry Andric
dfbaea8347 Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after:	2 weeks
2012-02-29 22:58:51 +00:00
Olivier Houchard
d8139ed7ed Use srandom() to init the PRNG, not srand(), since we use random().
This is harmless because srandom() is called somewhere else, with time(NULL)
as a seed, but this is more correct.

Obtained from:	https://bitbucket.org/mux/csup
Pointyhat to:	not mux, somebody else

MFC after:	1 week
2012-02-29 22:35:09 +00:00
Sergey Kandaurov
409763ceba Update the description for -s flag after r232182.
When displaying security credential information show also process umask.

X-MFC-with:	r232182
2012-02-29 15:06:40 +00:00
David E. O'Brien
800f97228a Document the 'URL' argument. 2012-02-28 22:15:46 +00:00
Dimitry Andric
07b202a847 Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang       (disables -Werror)
- NO_WCAST_ALIGN.clang  (disables -Wcast-align)
- NO_WFORMAT.clang	(disables -Wformat and friends)
- CLANG_NO_IAS		(disables integrated assembler)
- CLANG_OPT_SMALL	(adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf!  For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after:	2 weeks
2012-02-28 18:30:18 +00:00
Sergey Kandaurov
b4fe201c19 Backout r230934 which didn't work with unix sockets and
several filesystem layers mounted at the specified path.

Pointy hat to:	pluknet
2012-02-27 17:39:34 +00:00
Jilles Tjoelker
6e795141b2 xargs: Remove an unclear comment that only tried to repeat what the code did
Reported by:	bde
2012-02-26 23:06:30 +00:00
Jilles Tjoelker
c15adc89b3 xargs: Fix comma splice in error message.
Reported by:	bde
2012-02-26 17:39:46 +00:00
Mikolaj Golub
c077ef009e When displaying security credential information show also process umask.
Submitted by:	Dmitry Banschikov <me ubique spb ru>
Discussed with:	rwatson
MFC after:	2 weeks
2012-02-26 14:27:34 +00:00
Martin Matuska
6c95142e79 Update libarchive to 3.0.3
Some of new features:
  - New readers: RAR, LHA/LZH, CAB reader, 7-Zip
  - New writers: ISO9660, XAR
  - Improvements to many formats, especially including ISO9660 and Zip
  - Stackable write filters to write, e.g., tar.gz.uu in a single pass
  - Exploit seekable input; new "seekable" Zip reader can exploit the Zip
    Central Directory when it's available; the old "streamable" Zip reader
    is still fully supported for cases where seeking is not possible.

Full release notes available at:
	https://github.com/libarchive/libarchive/wiki/ReleaseNotes
2012-02-25 10:58:02 +00:00
John Baldwin
9fd52232b8 Fix style in previous commit.
Submitted by:	bde
2012-02-24 20:12:53 +00:00
Jilles Tjoelker
23583c4fe1 xargs: If a utility exits with 255 or a signal, write an error message.
If a utility called by xargs exits with status 255 or because of a signal,
POSIX requires writing an error message.

PR:		165155
Submitted by:	Matthew Story matthewstory gmail com
2012-02-24 12:35:17 +00:00
Sergey A. Osokin
4f23e905a3 Add underscore symbol to the end of definition strings
to keep all calendar files are consistency.

Approved by:	edwin
MFC after:	1 week
2012-02-24 11:40:20 +00:00
John Baldwin
145e6aa9f8 Pretty-print the advice constants passed to posix_fadvise(2).
MFC after:	2 weeks
2012-02-23 21:08:21 +00:00
Sergey A. Osokin
385a06b917 Add pt_BR.ISO8859-1 and pt_BR.UTF-8 directories to install.
It was forgotten in r219937 commit.

Approved by:	edwin
MFC after:	1 week
2012-02-23 17:47:48 +00:00
Maxim Konovalov
fb53214d28 o Use ISO 3166 county code for Sweden.
PR:		standards/165400
Submitted by:	Carsten Hey
MFC after:	1 week
2012-02-22 21:08:58 +00:00
Kevin Lo
29dcf726d2 Handle NULL return from crypt(3). Mostly from DragonFly 2012-02-22 06:27:20 +00:00
Bjoern A. Zeeb
9dba179d5e IFC @231845
Sponsored by:	Cisco Systems, Inc.
2012-02-17 00:27:48 +00:00
Eitan Adler
4001564661 Removed unused code: fixes compiler warning with CC=gcc46
error: parameter 'fd' set but not used

Approved by:	cperciva
MFC after:	1 week
2012-02-16 05:17:01 +00:00
Eitan Adler
097cd85002 Don't extract the n_type value from the elf header, since it is never used
Fix warning when compiling with gcc46:
	variable 'type' set but not used

Approved by:	cperciva
MFC after:	3 days
2012-02-16 05:16:55 +00:00
Kevin Lo
01bd93ce1c Remove unnecessary cast 2012-02-14 10:11:45 +00:00
Gleb Smirnoff
0de6400b1c Fix write(1) to support wide characters.
Submitted by:	amdmi3
PR:		bin/164317
2012-02-13 14:40:15 +00:00
Ed Schouten
6b99842ada Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after:	1 month
2012-02-12 18:29:56 +00:00
Max Khon
42e4b4f7df Include target names in diagnostic output.
Submitted by:	Garrett Cooper
2012-02-12 05:34:01 +00:00
Ed Schouten
bab1d5b81b And of course, I forgot to add -a to the usage. 2012-02-11 21:50:44 +00:00
Ed Schouten
79625d00a2 Attempt to implement who -a.
According to POSIX, -a is equal to -bdlprtTu.  It seems this is not true
in practice, as -b normally restricts the output to BOOT_TIME entries
and all implementations that I know of don't.
2012-02-11 21:49:23 +00:00
Martin Cracauer
e65d028196 Reverting last change r231449 (fix bin/164947) due to concerns voiced
on src-committers and the fact that I can only take care of this in a
week.
2012-02-11 16:34:03 +00:00
Damjan Marion
ceec1ea79a Add myself to calendar.
Approved by:     cognet (mentor)
2012-02-11 11:24:30 +00:00
Martin Cracauer
2477c8ab78 Fix bin/164947: tee looses data when writing to non-blocking file descriptors
tee was not handling EAGAIN

patch submitted by Diomidis Spinellis <dds@aueb.gr>. Thanks so much

reproduced and re-tested locally
2012-02-10 22:16:17 +00:00
Matthew Seaman
64d4e55b36 Add myself as a new committer
Approved by:	shaun (mentor)
2012-02-09 14:13:56 +00:00
Dimitry Andric
005576f63d In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
rpcgen will search the current PATH for the preprocessor.  This makes it
possible to run a preprocessor built during the cross-tools stage of
buildworld.

MFC after:	1 week
2012-02-06 21:35:11 +00:00
Dimitry Andric
ade215fd5a Amend r231079 by properly shifting up the existing arguments in
rpc_main.c's insarg() function.  I had forgotten to put this in my patch
queue, sorry.

Pointy hat to:	me
MFC after:	1 week
2012-02-06 12:08:41 +00:00
Dimitry Andric
0dac0ed841 Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
preprocessor to run.  Previously, it always ran /usr/bin/cpp, unless you
used the -Y option, and even then you could not set the basename.  It
also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this
is obsolete, and has been removed.

Note that setting RPCGEN_CPP to a command with arguments is supported,
though the command line parsing is simplistic.  However, setting it to
e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc
and clang in -E mode will consider files with unknown extensions (such
as .x) as object files, and attempt to link them.

This could be worked around by also adding "-x c", but it is much safer
to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead.

MFC after:	1 week
2012-02-06 12:03:21 +00:00
Dimitry Andric
6bb1cadd56 Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

MFC after:	2 weeks
2012-02-05 23:56:22 +00:00
Dimitry Andric
faabfb8aff In usr.bin/rpcgen/rpc_main.c, properly check the return value of
strlcpy(), in addition to checking that of strlcat().

MFC after:	1 week
2012-02-05 20:55:38 +00:00
Ed Schouten
627d915e25 Whitespace fixes.
- Remove redundant empty lines.
- Replace ^L by \014. This allows you to safely cat/grep/etc this file
  without causing confusion.
2012-02-05 09:17:49 +00:00
Jaakko Heinonen
401c9fda42 Remove useless and potentially dangerous rw() function which tries to
update access and modification times by reading and writing the file.
chmod(2) in rw() doesn't help because utimes(2) allow owner and the
super-user to change times. Using just utimes(2) should be sufficient.

The -f option becomes no-op.

Reviewed by:	jilles
2012-02-04 13:37:31 +00:00
Bjoern A. Zeeb
4fd5619bb1 Teach netstat -r (display contents of routing tables) about multi-FIB for
IPv6 in addition to IPv4.
While here harmonize naming of variables a bit with what we use in kernel.

Sponsored by:	Cisco Systems, Inc.
2012-02-03 15:26:55 +00:00
Sergey Kandaurov
e22c40fa79 Print the owner process for unix domain sockets when restricted to the
specified files.

PR:		bin/143962
MFC after:	2 weeks
2012-02-03 09:07:53 +00:00
Davide Italiano
67b6f45325 Add myself to the relevant docs.
Approved by: alc, gnn (mentors)
2012-02-01 19:46:12 +00:00
Mikolaj Golub
003e7e4928 Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-02-01 18:03:21 +00:00
Mikolaj Golub
8d2393a033 Always return 0 if the sysctl failed.
This fixes the bug: when procstat -xa was run and the sysctl for a
process returned ESRCH or EPERM, for this process procstat output the
result collected for the previous successful process.
2012-01-29 20:39:42 +00:00
Poul-Henning Kamp
91505ba4f6 Make tip exit if the device disappears, for instance when unplugging
or resetting USB serial devices.

Somebody[tm] should rewrite tip(1) to use two thread instead of two
processes or maybe even use that new-fangled "select(2)" or positively
futuristic "poll(2)" system call.
2012-01-28 20:45:47 +00:00
Tijl Coosemans
e57ac359cc Fix decoding of escape sequences in format strings:
- Zero-terminate the resulting string by letting the for-loop copy the
  terminating zero.
- Exit the for-loop after handling a backslash at the end of the format
  string to fix a buffer overrun.
- Remove some unnecessary comments and blank lines. [1]

Requested by:	bde [1]
PR:		bin/144722
Approved by:	kib (mentor)
2012-01-28 18:49:04 +00:00
Michael Tuexen
23a0e422aa Don't print a warning when using netstat to print
SCTP statistics when there is not SCTP in the kernel.
This problem was reported by Sean Mahood.

MFC after: 1 week.
2012-01-25 21:49:48 +00:00
Mikolaj Golub
1d65b4fb8d Add -P option to allow get and set limits for other processes.
Submitted by:	Andrey Zonov <andrey at zonov.org>
MFC after:	2 weeks
2012-01-25 20:14:41 +00:00
Mikolaj Golub
98623e8dda After the recent changes there is no need in rlimit array any more.
Submitted by:	Andrey Zonov <andrey at zonov.org>
MFC after:	1 week
2012-01-25 20:13:37 +00:00
Stefan Farfeleder
07dbb38763 Remove extra sentence, a leftover from r202845. 2012-01-25 18:49:11 +00:00
Jilles Tjoelker
61149f8d7c sockstat: Also show sockets not associated with a file descriptor.
Sockets not associated with a file descriptor include TCP TIME_WAIT states
and sockets created via the socket(9) API such as from rpc.lockd and the NFS
client.

PR:		bin/164081
MFC after:	2 weeks
No objection:	des
2012-01-24 21:33:34 +00:00
Gleb Smirnoff
4b2b8a370c In ng_socket(4) expose less kernel internals to userland. This commit
breaks ABI, but makes probability of ABI breakage in future less.
2012-01-23 15:39:45 +00:00
Mikolaj Golub
c3c314f9f7 Make procstat -l to work with the new version of kern.proc.rlimit.
Submitted by:	Andrey Zonov <andrey at zonov.org>
MFC after:	2 weeks
2012-01-22 20:26:46 +00:00
Hiroki Sato
9549f74201 - Replace "wtmp" with "utx.log" because last(1) no longer reads wtmp.
- A real filename is now shown in an output report when "-f file" is specified.
- Add Xr lastlogin into last(1) manual page.

Reviewed by:	ed
MFC after:	1 week
2012-01-22 11:34:24 +00:00
Robert Millan
475cc570f4 Map foreign architecture names to FreeBSD naming convention.
Approved by:	kib (mentor)
2012-01-20 18:55:56 +00:00
Dag-Erling Smørgrav
2a7daafe67 Fix two issues related to the use of SIGINFO in fetch(1) to display
progress information.  The first is that fetch_read() (used in the HTTP
code but not the FTP code) can enter an infinite loop if it has previously
been interrupted by a signal.  The second is that when it is interrupted,
fetch_read() will discard any data it may have read up to that point.
Luckily, both bugs are extremely timing-sensitive and therefore difficult
to trigger.

PR:		bin/153240
Submitted by:	Mark <markjdb@gmail.com>
MFC after:	3 weeks
2012-01-18 15:13:21 +00:00
Eitan Adler
63491e82be Remove duplicate line from usage
PR:		bin/164139
Submitted by:	Yuri Pankov <yuri.pankov@gmail.com>
Approved by:	nwhitehorn
MFC after:	3 days
2012-01-15 17:01:28 +00:00
Ed Schouten
f9d9bcd45e Remove wtmpcvt(1).
The wtmpcvt(1) utility converts wtmp files to the new format used by
utmpx(3). Now that HEAD has been branched to stable/9 and 9.0 is
released, there is no need for it in HEAD.

MFC after:	never
2012-01-13 15:40:49 +00:00
Kevin Lo
a3a2bf4b67 fgets(3) returns a pointer, so compare against NULL, not integer 0. 2012-01-13 06:51:15 +00:00
Kenneth D. Merry
33d35bebef Fix building ctlstat with clang.
Submitted by:	Dan McGregor <danismostlikely@gmail.com>
MFC after:	1 month
2012-01-12 22:12:42 +00:00
Pedro F. Giffuni
ab71f27172 Style cleanups for printf.
PR:		bin/152934
Approved by:	jhb (mentor)
Obtained from:	Illumos
MFC after:	2 weeks
2012-01-12 20:30:20 +00:00
Kenneth D. Merry
130f4520cb Add the CAM Target Layer (CTL).
CTL is a disk and processor device emulation subsystem originally written
for Copan Systems under Linux starting in 2003.  It has been shipping in
Copan (now SGI) products since 2005.

It was ported to FreeBSD in 2008, and thanks to an agreement between SGI
(who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is
available under a BSD-style license.  The intent behind the agreement was
that Spectra would work to get CTL into the FreeBSD tree.

Some CTL features:

 - Disk and processor device emulation.
 - Tagged queueing
 - SCSI task attribute support (ordered, head of queue, simple tags)
 - SCSI implicit command ordering support.  (e.g. if a read follows a mode
   select, the read will be blocked until the mode select completes.)
 - Full task management support (abort, LUN reset, target reset, etc.)
 - Support for multiple ports
 - Support for multiple simultaneous initiators
 - Support for multiple simultaneous backing stores
 - Persistent reservation support
 - Mode sense/select support
 - Error injection support
 - High Availability support (1)
 - All I/O handled in-kernel, no userland context switch overhead.

(1) HA Support is just an API stub, and needs much more to be fully
    functional.

ctl.c:			The core of CTL.  Command handlers and processing,
			character driver, and HA support are here.

ctl.h:			Basic function declarations and data structures.

ctl_backend.c,
ctl_backend.h:		The basic CTL backend API.

ctl_backend_block.c,
ctl_backend_block.h:	The block and file backend.  This allows for using
			a disk or a file as the backing store for a LUN.
			Multiple threads are started to do I/O to the
			backing device, primarily because the VFS API
			requires that to get any concurrency.

ctl_backend_ramdisk.c:	A "fake" ramdisk backend.  It only allocates a
			small amount of memory to act as a source and sink
			for reads and writes from an initiator.  Therefore
			it cannot be used for any real data, but it can be
			used to test for throughput.  It can also be used
			to test initiators' support for extremely large LUNs.

ctl_cmd_table.c:	This is a table with all 256 possible SCSI opcodes,
			and command handler functions defined for supported
			opcodes.

ctl_debug.h:		Debugging support.

ctl_error.c,
ctl_error.h:		CTL-specific wrappers around the CAM sense building
			functions.

ctl_frontend.c,
ctl_frontend.h:		These files define the basic CTL frontend port API.

ctl_frontend_cam_sim.c:	This is a CTL frontend port that is also a CAM SIM.
			This frontend allows for using CTL without any
			target-capable hardware.  So any LUNs you create in
			CTL are visible in CAM via this port.

ctl_frontend_internal.c,
ctl_frontend_internal.h:
			This is a frontend port written for Copan to do
			some system-specific tasks that required sending
			commands into CTL from inside the kernel.  This
			isn't entirely relevant to FreeBSD in general,
			but can perhaps be repurposed.

ctl_ha.h:		This is a stubbed-out High Availability API.  Much
			more is needed for full HA support.  See the
			comments in the header and the description of what
			is needed in the README.ctl.txt file for more
			details.

ctl_io.h:		This defines most of the core CTL I/O structures.
			union ctl_io is conceptually very similar to CAM's
			union ccb.

ctl_ioctl.h:		This defines all ioctls available through the CTL
			character device, and the data structures needed
			for those ioctls.

ctl_mem_pool.c,
ctl_mem_pool.h:		Generic memory pool implementation used by the
			internal frontend.

ctl_private.h:		Private data structres (e.g. CTL softc) and
			function prototypes.  This also includes the SCSI
			vendor and product names used by CTL.

ctl_scsi_all.c,
ctl_scsi_all.h:		CTL wrappers around CAM sense printing functions.

ctl_ser_table.c:	Command serialization table.  This defines what
			happens when one type of command is followed by
			another type of command.

ctl_util.c,
ctl_util.h:		CTL utility functions, primarily designed to be
			used from userland.  See ctladm for the primary
			consumer of these functions.  These include CDB
			building functions.

scsi_ctl.c:		CAM target peripheral driver and CTL frontend port.
			This is the path into CTL for commands from
			target-capable hardware/SIMs.

README.ctl.txt:		CTL code features, roadmap, to-do list.

usr.sbin/Makefile:	Add ctladm.

ctladm/Makefile,
ctladm/ctladm.8,
ctladm/ctladm.c,
ctladm/ctladm.h,
ctladm/util.c:		ctladm(8) is the CTL management utility.
			It fills a role similar to camcontrol(8).
			It allow configuring LUNs, issuing commands,
			injecting errors and various other control
			functions.

usr.bin/Makefile:	Add ctlstat.

ctlstat/Makefile
ctlstat/ctlstat.8,
ctlstat/ctlstat.c:	ctlstat(8) fills a role similar to iostat(8).
			It reports I/O statistics for CTL.

sys/conf/files:		Add CTL files.

sys/conf/NOTES:		Add device ctl.

sys/cam/scsi_all.h:	To conform to more recent specs, the inquiry CDB
			length field is now 2 bytes long.

			Add several mode page definitions for CTL.

sys/cam/scsi_all.c:	Handle the new 2 byte inquiry length.

sys/dev/ciss/ciss.c,
sys/dev/ata/atapi-cam.c,
sys/cam/scsi/scsi_targ_bh.c,
scsi_target/scsi_cmds.c,
mlxcontrol/interface.c:	Update for 2 byte inquiry length field.

scsi_da.h:		Add versions of the format and rigid disk pages
			that are in a more reasonable format for CTL.

amd64/conf/GENERIC,
i386/conf/GENERIC,
ia64/conf/GENERIC,
sparc64/conf/GENERIC:	Add device ctl.

i386/conf/PAE:		The CTL frontend SIM at least does not compile
			cleanly on PAE.

Sponsored by:	Copan Systems, SGI and Spectra Logic
MFC after:	1 month
2012-01-12 00:34:33 +00:00
Eitan Adler
c951556035 Silence bogus warning when compiling with gcc46:
error: 'pos' may be used uninitialized in this function

Reviewed by:	cperciva
Approved by:	dim
MFC after:      3 days
2012-01-10 02:58:44 +00:00
Eitan Adler
b4f7ea1936 Fix warning when compiling with gcc46:
error: variable 'ifnetfound' set but not used

Approved by:	dim
MFC after:      3 days
2012-01-10 02:58:36 +00:00
Eitan Adler
fdba8122d6 Fix warning when compiling with gcc46:
error: variable 'verbose' set but not use

Approved by:	dim
MFC after:      3 days
2012-01-10 02:58:29 +00:00
Eitan Adler
cc898a0e5c Fix warning when compiling with gcc46:
error: variable 'wdone' set but not use

Approved by:	dim
MFC after:	3 days
2012-01-10 02:58:20 +00:00
Eitan Adler
af9eff1f20 Fix warning when compiling with gcc46:
error: variable 'defname' set but not use

Approved by:	dim
MFC after:	3 day
2012-01-10 02:55:43 +00:00
Eitan Adler
01155b2005 - Fix how hexdump parses escape strings
From the NetBSD bug:
The way how hexdump(1) parses escape sequences has some bugs.
It shows up when an escape sequence is used as the non-last character
of a format string.

PR:		bin/144722
Submitted by:	gcooper
Approved by:	rpaulo
Obtained from:	NetBSD
MFC after:	1 week
2012-01-07 23:15:21 +00:00
Guy Helmer
532b72687e Fix a memory leak in addgroup() by ensuring the allocated memory
is freed if an error occurs.

PR:		bin/161510
MFC after:	4 weeks
2012-01-05 23:08:11 +00:00
Ulrich Spörlein
389ae6c65d Touch up some more small typos missed in the previous round.
Reported by:	Ben Kaduk <minimarmot@gmail.com> et al.
2012-01-05 21:36:45 +00:00
Aleksandr Rybalko
9dea314c93 mkulzma used to create lzma compressed images, just like mkuzip do.
Approved by:	adrian (mentor)
2012-01-04 23:45:10 +00:00
Ed Schouten
b3608ae18f Replace index() and rindex() calls with strchr() and strrchr().
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
2012-01-03 18:51:58 +00:00
Ed Schouten
75ac3edf1d Remove hand-written version of strcspn().
The code searches for the first occurence of @, : or !. Upon failure, it
returns the index of \0. This is exactly what strcspn() does.
2012-01-03 11:13:07 +00:00
Jason Helfman
718e97bf96 - add myself to the calendar (jgh)
Approved by:	crees (mentor)
2012-01-01 00:23:32 +00:00
Ulrich Spörlein
487ac9ac21 Spelling fixes for usr.bin/ 2011-12-30 11:02:40 +00:00
Ulrich Spörlein
fb2ad9d3a4 Reencode files from latin1 to UTF-8.
This makes a tiny percentage of entries in calendars ugly for latin1
users, but fixes them for UTF-8 users.

This badly needs a solution involving locale-dependent re-encoding.
2011-12-30 10:59:15 +00:00
Marius Strobl
78dbe84377 On FreeBSD just use the MD5 implementation of libmd rather than that of
libcrypto so we don't need to relinquish csup when world is built without
OpenSSL.
2011-12-24 12:16:38 +00:00
Glen Barber
0f13c0f4a8 Whitespace cleanup:
ar/ar.1:
 - Remove trailing whitespace

Reported by:		igor
MFC after:		1 week
X-MFC-With:		r228823
2011-12-23 00:31:26 +00:00
Glen Barber
dce762dd44 Formatting fixes:
hexdump/od.1:
 - Enclose tabbed content in quotes [1]

ar/ar.1:
 - Enclose tabbed content in quotes [1]

rctl/rctl.8:
 - Enclose tabbed content in quotes [1]
 - Start a sentence on a newline [2]

Reported by:		manlint [1], igor [2]
MFC after:		1 week
X-MFC-after:		9.0-RELEASE
2011-12-23 00:29:01 +00:00
Martin Matuska
45d3b226a6 Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.

MFC after:	2 weeks
2011-12-22 08:42:07 +00:00
Gabor Kovesdan
7d2bb8504d - Remove a GCC-specific compiler flag that was added before to eliminate
some warnings but at the moment does not seem to be necessary.

Submitted by:	arundel (via private mail)
Tested by:	arundel
MFC after:	1 week
2011-12-21 12:07:14 +00:00
Martin Matuska
5e95ed1f11 Sync bsdcpio with vendor branch release/2.8:
Revision 3770:
Merge r3768 from trunk: Fix typo in dev/ino verification for cpio formats.

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
2011-12-20 20:37:17 +00:00
Martin Matuska
6c35858460 Sync bsdtar with vendor branch release/2.8:
Revision 3769:
Merge r3744 from trunk:  Correctly return errors when reading
an archive using @archive extension.

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
2011-12-20 20:36:00 +00:00
Martin Matuska
f6ccfb42a2 Update libarchive, tar and cpio to version 2.8.5
The following additional vendor revisions are applied:

Revision 3740:
Use archive_clear_error() to clear the error markers.

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
2011-12-20 20:06:33 +00:00
Dimitry Andric
1d44b5b9f0 In usr.bin/vacation/Makefile, fix a typo in the comment about clang
warnings.

Spotted by:	arundel
MFC after:	1 week
2011-12-19 13:38:28 +00:00
Bjoern A. Zeeb
2cce1b69c4 Unbreak the build after r228697 adding the { } block to make clear which
if the else belongs to.
2011-12-19 08:50:17 +00:00
Maxim Konovalov
d96ea877a7 o Convert IPv6 read-only stats sysctls to the read-write ones.
o Teach netstat(1) -z to reset these stats sysctls.

PR:		bin/153206
Reviewed by:	glebuis
Sponsored by:	NGINX, Inc.
MFC after:	1 month
2011-12-19 05:50:34 +00:00
Dimitry Andric
c48f7f6814 Repair breakage after r228697: since m4 now uses pow(3), it needs -lm.
Pointy hat to:	bapt
2011-12-18 23:54:32 +00:00
Baptiste Daroussin
4fff7a14ae Reimplement support for the ** (exponent) gnu extension, make it available thought the -g (mimic gnu) option
Reviewed by:	cognet
Approved by:	cognet
Discussed with:	espie@OpenBSD.org (upstream)
2011-12-18 22:04:55 +00:00
Jilles Tjoelker
6530d2f2d5 du: Allow multiple -HLP options, the last one wins.
This matches 4.4BSD tradition and other utilities with these options and is
required by POSIX (POSIX does not specify -P, only -HL).

MFC after:	2 weeks
2011-12-17 23:18:14 +00:00
Dimitry Andric
d88ccef562 Revert r228650, and work around the clang false positive with printf
formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to
the Makefile instead.

MFC after:	1 week
2011-12-17 22:32:00 +00:00
Dimitry Andric
be120ddea0 In usr.bin/csup/auth.c, cast time_t to intmax_t instead, and use the
corresponding printf length modifier.

Requested by:	mdf
MFC after:	1 week
2011-12-17 22:20:46 +00:00
Dimitry Andric
b7de4fa0d3 In usr.bin/vmstat/vmstat.c, cast several printf field widths to int, and
use printf format specifiers from inttypes.h for uint64_t's.

MFC after:	1 week
2011-12-17 19:22:24 +00:00
Dimitry Andric
cb3b0d8fb9 Unfortunately, clang gives warnings about sendmail code that cannot be
turned off yet.  Since this is contrib code, and we don't really care
about the warnings, just turn make them non-fatal for now.

MFC after:	1 week
2011-12-17 18:39:04 +00:00
Dimitry Andric
288fcda320 In usr.bin/netstat/atalk.c, work around a clang false positive with
printf format warnings and conditional operators.

MFC after:	1 week
2011-12-17 17:21:47 +00:00
Dimitry Andric
d411ccb3b2 Use NO_WCAST_ALIGN for usr.bin/ncplist, as there are many potential
alignment issues in it.  (Though I doubt anyone still cares about
NetWare support...)

MFC after:	1 week
2011-12-17 17:04:30 +00:00
Dimitry Andric
081aa5169d In usr.bin/mail/cmd1.c, use the correct printf length modifier for a
ptrdiff_t.  In usr.bin/mail/main.c, cast a field width to int.

MFC after:	1 week
2011-12-17 16:30:42 +00:00
Dimitry Andric
f7c0d4c7ea In usr.bin/indent/io.c, fix a few warnings about format strings not being literals.
MFC after:	1 week
2011-12-17 15:41:58 +00:00
Dimitry Andric
7818f8df2e Correct a logic error in usr.bin/hexdump/conv.c, found by clang.
Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead.  It also sets p to peekbuf, to indicate it is still
processing the incomplete character.

However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.

Fix this by comparing against p instead, which was the intention.  Also
turn peekbuf into an array of u_char, to prevent conversion warnings.

MFC after:	1 week
2011-12-17 15:33:26 +00:00
Dimitry Andric
7853817de3 More fixes for correct printf length modifiers usr.bin/gprof.
MFC after:	1 week
2011-12-17 14:51:24 +00:00
Dimitry Andric
d16752d1ae In usr.bin/gprof/aout.c, use the correct printf length modifier for a
uint32_t.

MFC after:	1 week
2011-12-17 14:37:41 +00:00
Dimitry Andric
f666b9058d In usr.bin/csup/proto.c, use the correct printf length modifier to print
an off_t.

MFC after:	1 week
2011-12-17 13:52:53 +00:00
Dimitry Andric
582ad8aebf In usr.bin/csup/auth.c, use the correct number of bytes for zeroing the
shared secret, and use long long format to snprintf a time_t.

MFC after:	1 week
2011-12-17 13:14:44 +00:00
Dimitry Andric
f3fbaba136 In usr.bin/mt/mt.c, the c_code member of struct commands should really
be an unsigned long, since it will contain values of ioctl request
codes.  On 64-bit arches, these will not fit into an int.

MFC after:	1 week
2011-12-17 02:23:30 +00:00
Dimitry Andric
940695fffb In usr.bin/tar/tree.c, if you really want to poke to NULL, you must use
volatile, otherwise the indirection will not be emitted.

MFC after:	1 week
2011-12-17 01:36:50 +00:00
Max Khon
94f176ebd4 Revert r228521: sometimes job output is lost
(see tools/regression/usr.bin/make/execution/joberr test).

openpty(fd + 0, fd + 1,...) version does not have this problem but
it sometimes enters an infinite sleep in "ttywait" state in tty_drain()
when make(1) closes slave pty.
2011-12-15 06:25:19 +00:00
Max Khon
366cd46cbe job make: if stdout is a tty create a pty when running a command. 2011-12-15 03:13:23 +00:00
Ed Schouten
f6ab8089c6 Replace __const by const in all non-contributed source code.
As C1X is close to being released, there is no need to wrap around a
feature that is already part of C90. Most of these files already use
`const' in different placed as well.
2011-12-13 13:32:56 +00:00
Mikolaj Golub
cc1ff620b9 Make 64-bit procstat output ELF auxiliary vectors for 32-bit processes.
Reviewed by:	kib
MFC after:	1 week
2011-12-12 22:01:33 +00:00
Mikolaj Golub
de21500d6a Make procstat -l output similar to the output of limits(1).
Suggested by:	jhb
MFC after:	1 week
2011-12-12 21:41:05 +00:00
Ed Schouten
a02c83afc5 Add more static keywords to truss(1) source code.
There are some tables in the source code that are only used by the
individual source files themselves. Therefore there is no need to export
them.
2011-12-10 18:27:55 +00:00
Ed Schouten
8375d51296 Add missing "static const" to long options table.
This table is only used in this C file and passed to getopt_long(), so
we can safely add static and const to it.
2011-12-10 18:21:03 +00:00
Ed Schouten
516c8ed9dd Replace char copyright[] by static const char copyright[].
It seems the latter is used throughout the tree.
2011-12-10 18:11:06 +00:00
Glen Barber
653fa5218a Update du(1):
- Sort arguments alphabetically where appropriate
- '-B blocksize' is not mutually exclusive of '-h|-k|-m'
- Mention '-t' in synopsis
- Other wording improvements
- Update usage() output to reflect the new synopsis [1]
- Other miscellaneous improvements

PR:		162438
Submitted by:	arundel
Reviewed by:	Benjamin Kaduk (kaduk ! mit.edu), jhb[1] (original version)
MFC after:	1 week
2011-12-09 02:30:56 +00:00
Gabor Kovesdan
6f4cbf7cb3 - Match GNU behavior of exit code
- Rename variable that has a different meaning now

PR:		bin/162930
Submitted by:	Jan Beich <jbeich@tormail.net>
MFC after:	1 week
2011-12-07 12:25:28 +00:00
Mikolaj Golub
cc43fe5b46 Don't output a warning if kern.proc.auxv sysctl has returned EPERM.
After r228288 this is rather a normal situation.

MFC after:	1 week
2011-12-05 19:39:15 +00:00
Konstantin Belousov
97695ad4cd Use explicit information from the kernel to detect the traps due to
syscall entry and leave.

Based on submision by:	Dan Nelson <dnelson allantgroup com>
MFC after:	1 month
2011-12-04 18:43:09 +00:00
Max Khon
019bd13977 - Fix segmentation fault when running "+command" when run with -jX -n due
to Compat_RunCommand() being called with `cmd' that is not on the node->commands
list
- Make ellipsis ("..." command) handling consistent: check for "..." command
in job make after variables expansion to match compat make behavior
- Fix empty command handling (after variables expansion and @+- modifiers
are processed): now empty commands are ignored in compat make and are not
printed in job make case
- Bump MAKE_VERSION to 5-2011-11-30-0
2011-11-30 18:07:38 +00:00
Gabor Kovesdan
68f42e1da4 - Create links to the xz and lzma versions even if BSD grep is not the
default. Nor GNU nor liblzma in base provides such functionality so
  it may be useful.

MFC after:	3 days
2011-11-28 20:16:55 +00:00
Gabor Kovesdan
ede01be2f2 - Call warnx() instead of errx() if a directory is not readable when using
a recursive search.  This is the expected behavior instead of aborting.

PR:		bin/162907
Submitted by:	Jan Beich <jbeich@tormail.net>
MFC after:	3 days
2011-11-28 20:04:26 +00:00
Gabor Kovesdan
f0c94259d6 - Fix behavior of --null to match GNU grep
PR:		bin/162906
Submitted by:	Jan Beich <jbeich@tormail.net>
MFC after:	3 days
2011-11-28 20:00:31 +00:00
Mikolaj Golub
447fdbd073 Update SYNOPSIS to include the flags added recently.
Spotted by:	jhb
2011-11-28 19:45:47 +00:00
Baptiste Daroussin
a841e1ebe6 Synchronize with laster version of m4 from OpenBSD and NetBSD
This bring better compatibility with gnum4

Reviewed by:	cognet
Approved by:	cognet
Obtained from:	OpenBSD, NetBSD
2011-11-28 13:32:39 +00:00
Mikolaj Golub
6bfefd99ce Cast a_val on printing. This fixes build on mips. 2011-11-28 07:09:29 +00:00
Mikolaj Golub
d3c10c5235 Make proctstat -x output more readable.
This also fixes the issue, spotted by mdf, with values that were
printed as decimal and had hex prefixes.

Discussed with:	kib, rwatson
MFC after:	2 weeks
2011-11-27 15:53:58 +00:00
Mikolaj Golub
598585e835 usr.bin/procstat
Add -l flag to display resource limits.

PR:		bin/161257
Reviewed by:	kib
MFC after:	2 weeks
2011-11-24 20:54:06 +00:00
Mikolaj Golub
7294321939 Fix build, hopefully.
Reviewed by:	kib
2011-11-23 07:34:09 +00:00
Mikolaj Golub
e99272c732 Add new options, -e and -x, to display process environment variables
and ELF auxiliary vectors.

MFC after:	2 weeks
2011-11-22 20:59:52 +00:00
Warner Losh
34b7df97a3 Add helpful clarification text. While not strictly necessary, these
few words make this man page much easier to understand without
re-reading prior parts of the man page.
2011-11-16 22:02:59 +00:00
Eitan Adler
14517324d0 - add a missing "be" and "in"
- fix other errors introduced when committing r226436
- add 'function' to a sentence where it makes sense

Submitted by:	delphij
Submitted by:	dougb
Submitted by:	jhb
Approved by:	dougb
Approved by:	jhb
2011-11-11 22:27:09 +00:00
Greg Lehey
415f031163 Tidy up command line processing:
- Add ? option to optstring.
  - Sort options alphabetically.
  - Vertical space.

Tidy up usage() function.

Bring man page in sync with source.

Ensure that debug code is only executed with the -d option.

Submitted by: Christiane Yeardley
2011-11-09 01:40:46 +00:00
Mikolaj Golub
729bfad6a4 Bumb date after r227317.
Reminded by:	pluknet
2011-11-08 19:14:15 +00:00
Ed Schouten
66c5875a45 Simplify getopt switch parsing.
Only one of these flags can be set. Just add them together and check the
value. Also, get rid of the listall variable. The code is already filled
with direct *flag-comparisons.

Obtained from:	Alexander Best (though modified)
2011-11-08 11:36:46 +00:00
Mikolaj Golub
82841ae6f8 When displaying process virtual memory mappings print superpage
mapping flag.

Submitted by:	Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
Reviewed by:	alc, rwatson
2011-11-07 21:16:19 +00:00
Ed Schouten
0c66031ab1 Remove unneeded CFLAGS.
Such optimisations should not be performed in this Makefile. Also, uqs@
suggested they have no effect, because the checksum of the resulting
binary is unchanged.

Discussed with:	gabor, uqs
2011-11-07 09:42:22 +00:00
Ed Schouten
a35353de88 Partially revert r227233.
The privs.h header is not only used by at(1), it's also used by
atrun(8). Just let the code the way it used to be (for now).

Reported by:	kwm, tinderbox
Hat to:		me
2011-11-06 20:30:21 +00:00
Ed Schouten
641835f465 Mark global functions and/or variables in xstr(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:39 +00:00
Ed Schouten
e5ec905575 Mark global functions and/or variables in whois(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:33 +00:00
Ed Schouten
94cd938578 Mark global functions and/or variables in which(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:26 +00:00
Ed Schouten
558b00f5a1 Mark global functions and/or variables in whereis(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:19 +00:00
Ed Schouten
48ef17602b Mark global functions and/or variables in unifdef(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:50:00 +00:00
Ed Schouten
e7b3338485 Mark global functions and/or variables in paste(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:53 +00:00
Ed Schouten
df6dd6933d Mark global functions and/or variables in m4(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:48 +00:00
Ed Schouten
86350df6fe Mark global functions and/or variables in lam(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:41 +00:00
Ed Schouten
357050fc0e Mark global functions and/or variables in fstat(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:36 +00:00
Ed Schouten
cb230716e3 Mark global functions and/or variables in expand(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:30 +00:00
Ed Schouten
43ad4b4511 Mark global functions and/or variables in enigma(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:23 +00:00
Ed Schouten
305700d983 Mark global functions and/or variables in compress(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:16 +00:00
Ed Schouten
8d34a0b7bc Mark global functions and/or variables in comm(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:10 +00:00
Ed Schouten
c24aea83fa Mark global functions and/or variables in checknr(1) static where possible.
This allows compilers and static analyzers to more thorough analysis.
2011-11-06 18:49:03 +00:00
Ed Schouten
f64efe8b60 Add missing static keywords to at(1).
While there, tidy up the privs.h part, where at.c has to #define to
declare some globals. Also group static and non-static global variables
in at.c.
2011-11-06 17:32:29 +00:00
Ed Schouten
ac75fa8849 Mark the structure fields as const.
This allows us to simply place these strings as constants in the table
itself, letting the compiler decide to simply merge duplicate strings.
2011-11-06 17:20:44 +00:00
Ed Schouten
6291cd02cb Correct the change made in r227166.
This function is only compiled in when building WITH_AUDIT.
2011-11-06 09:09:45 +00:00
Ed Schouten
15f9b56845 Add missing static keywords to xinstall(1) 2011-11-06 08:19:07 +00:00
Ed Schouten
8df975a218 Add missing static keywords to wc(1) 2011-11-06 08:19:00 +00:00
Ed Schouten
d7698e0766 Add missing static keywords to wall(1) 2011-11-06 08:18:55 +00:00
Ed Schouten
d11cba9c89 Add missing static keywords to w(1) 2011-11-06 08:18:47 +00:00
Ed Schouten
bb39d408b1 Add missing static keywords to vis(1) 2011-11-06 08:18:42 +00:00
Ed Schouten
4ae55b63c3 Add missing static keywords to uuencode(1) 2011-11-06 08:18:35 +00:00
Ed Schouten
69c5bce6ee Add missing static keywords to usbhidctl(1) 2011-11-06 08:18:30 +00:00
Ed Schouten
793cdace4d Add missing static keywords to usbhidaction(1) 2011-11-06 08:18:23 +00:00