Commit Graph

10770 Commits

Author SHA1 Message Date
Hiroki Sato
6bbfef9004 Fill sin6_scope_id in sockaddr_in6 before passing it from the kernel to
userland via routing socket or sysctl.  This eliminates the following
KAME-specific sin6_scope_id handling routine from each userland utility:

 sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);

This behavior can be controlled by net.inet6.ip6.deembed_scopeid.  This is
set to 1 by default (sin6_scope_id will be filled in the kernel).

Reviewed by:	bz
2012-11-17 20:19:00 +00:00
Ed Schouten
dbd1414ddc Fix whitespace.
MFC after:	1 week
2012-11-17 16:47:05 +00:00
Andre Oppermann
ae7dc19cd1 Change fetch(1) to:
o Report the instantaneous bandwidth instead of an average since the
  beginning of the download.

o At the finish of the download report the average bandwidth and also
  the total time it took instead of 00m00s.

Reviewed by:	des
MFC after:	1 week
2012-11-16 12:05:10 +00:00
Simon J. Gerraty
59a02420d8 Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by:	marcel (mentor)
2012-11-16 01:37:25 +00:00
Eitan Adler
fd773ca3dd Avoid possible null deref if ypclnt_new returns null
PR:		bin/172979
Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
Approved by:	cperciva
MFC after:	3 days
2012-11-15 15:06:18 +00:00
Eitan Adler
aa374634b4 Add option to suppress just the plot in ministat while still retaining
the relative comparison (i.e., useful part).

Approved by:	cperciva
MFC after:	3 days
2012-11-15 15:06:12 +00:00
Eitan Adler
ac1e7ba236 Make definition match declaration
Approved by:	cperciva
MFC after:	3 days
2012-11-15 15:06:00 +00:00
Jeff Roberson
28d91af30f - Implement run-time expansion of the KTR buffer via sysctl.
- Implement a function to ensure that all preempted threads have switched
   back out at least once.  Use this to make sure there are no stale
   references to the old ktr_buf or the lock profiling buffers before
   updating them.

Reviewed by:	marius (sparc64 parts), attilio (earlier patch)
Sponsored by:	EMC / Isilon Storage Division
2012-11-15 00:51:57 +00:00
Dimitry Andric
ea9a926c9a For mkcsmapper, conditionalize gcc-specific compile flags.
MFC after:	3 days
2012-11-14 18:51:12 +00:00
Eitan Adler
843ab1e81f Add examples to the ssh-copy-id script.
Approved by:	bcr (mentor)
MFC after:	3 days
2012-11-13 13:06:57 +00:00
Eitan Adler
a018185aeb Clarify where the authorized_key file lives.
Approved by:	bcr (mentor)
MFC after:	3 days
2012-11-12 14:16:39 +00:00
Greg Lehey
ef4b2bf30f Correct date of Stanley's encounter with Livingstone.
Obtained from:	Henry Morton Stanley, "How I met Livingstone", http://www.gutenberg.org/dirs/5/1/5/5157/5157-h/5157-h.htm
MFC after:	14 days
2012-11-11 22:43:36 +00:00
Eitan Adler
a0f63581ce Add the standard exit status to the ssh-copy-id man page.
Approved by:	bcr (mentor)
MFC after:	3 days
2012-11-11 15:34:58 +00:00
Rui Paulo
8b800d3af2 Add the PID column to the list of sort keys. 2012-11-11 08:16:33 +00:00
Greg Lehey
37943b9ccc More style(9) tabs vs. spaces:
- tabs after #define
- Not in comments.

MFC after:	2 weeks
2012-11-10 06:10:07 +00:00
Greg Lehey
1cd697b6be Correct date and spelling of encounter between Stanley and
Livingstone.

MFC after:	2 weeks
2012-11-10 04:49:09 +00:00
Eitan Adler
076ea53ee5 Be a bit more paranoid.
Use more portable constructs in order to allow upstream adoption
Add per-file error messages

Reviewed by:	jilles
Approved by:	cperciva
MFC after:	1 week
2012-11-10 03:44:08 +00:00
Greg Lehey
021680fd8f Replace spaces by tabs where appropriate.
Reminded by: jh@
2012-11-08 23:46:15 +00:00
Greg Lehey
f27de7742d Make parameters to -c and -k options optional. If no parameters are
supplied, print information for all keywords.

Improve output of -c option, in particular in conjunction with -k
option.

MFC after:	14 days
2012-11-08 02:55:30 +00:00
Dimitry Andric
38b2a8bd2d Belatedly add links from /usr/bin/clang to /usr/bin/CC, like it has been
done for g++.

MFC after:	3 days
2012-11-07 20:03:45 +00:00
Xin LI
417a0a79d7 Fix build with clang: properly terminate comment even in #if 0 blocks.
Submitted by:	dim
2012-11-05 17:42:50 +00:00
Xin LI
4cc5fc9a0c MFV: less v453. 2012-11-04 20:52:26 +00:00
Joel Dahl
614b56b148 New sentence, new line.
Submitted by:	brueffer
2012-11-04 09:27:01 +00:00
Joel Dahl
625dbdefa0 Add a few basic examples. 2012-11-04 09:08:17 +00:00
Grzegorz Blach
d4cc50ba14 - Add my mentor relationships to committers-ports.dot
- Add myself to calendar.freebsd

Approved by:	tabthorpe (mentor)
2012-11-04 08:47:41 +00:00
Jilles Tjoelker
a018a3c9e2 kdump: Also decode fcntl commands containing underscores and digits.
The commands F_SETLK_REMOTE, F_DUPFD_CLOEXEC and F_DUP2FD_CLOEXEC were not
decoded.
2012-11-02 16:07:21 +00:00
Gabor Kovesdan
e8da8c744b - Portability changes for ARM
- Allow larger sort memory on 64-bit platforms

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-11-01 11:38:34 +00:00
Navdeep Parhar
913f53dc29 Catch up with r238925. ktr_entries may not be a power of 2. 2012-10-30 21:10:06 +00:00
Edward Tomasz Napierala
92f798418c Add pcpu to the the rctl(8) manual page. 2012-10-26 16:03:13 +00:00
David E. O'Brien
6cff4e07c1 Add "-f" to also output filemon(4) information. 2012-10-26 15:56:28 +00:00
Eitan Adler
3952727d79 Prefer an example users born after myself might use.
Approved by:	bcr (mentor)
MFC after:	3 days
2012-10-26 15:21:23 +00:00
Simon J. Gerraty
93036677b5 Merge bmake-20121010
Approved by:	marcel (mentor)
2012-10-25 23:18:05 +00:00
Alfred Perlstein
504a74fa90 Show the number of times we block waiting for mbufs.
Machines can stall out because mbufs are low, however sometimes we won't
see "requests denied", instead we see user land processes or kernel threads
blocking waiting for mbufs because they set M_WAIT.  These consumers do not
see errors, only stalling.

Unfortunately until now, netstat did not export this information
so you could have experienced an mbuf shortage and have no way of
seeing it unless you happen to run netstat at the exact time of the
shortage and see "in use" = "max".

By exporting the number of times processes are blocked, we can
effectively see how often non-interrupt context threads are effectively
"denied".

MFC after: 2 weeks
2012-10-25 02:12:05 +00:00
David E. O'Brien
13f02f28c8 Don't include both <sys/param.h> & <sys/types.h>. 2012-10-23 23:36:29 +00:00
Eitan Adler
25c1da1567 Somehow this got replicated too many times
Approved by: cperciva (implicit)
2012-10-22 12:05:14 +00:00
Eitan Adler
2beb708522 Add a clean-room reimplementation of a script originally
found in openssh's contrib directory.

This version has more features and is better written.
I intend to submit this upstream as well.

Reviewed by:	bapt
Reviewed by:	des
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:57:00 +00:00
Eitan Adler
1d1d4a4727 Check the return error of set[ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.  Custom
security modules, or future implementations of the setuid and setgid
may fail.

PR:		bin/172289
PR:		bin/172290
PR:		bin/172291
Submittud by:	Erik Cederstrand <erik@cederstrand.dk>
Discussed by:	freebsd-security
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:31:22 +00:00
Eitan Adler
50e04779c4 Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.

Submitted by:	Erik Cederstrand
Approved by:	cperciva
MFC after:	3 days
2012-10-22 03:07:05 +00:00
Eitan Adler
398de06dcb Remove unused variable. Newer versions of gcc care.
Submitted by:	Sascha Wildner <saw@online.de>
Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:59:59 +00:00
Eitan Adler
fbe37851ff Fix conditional expression: previously a bitvector would be operated
on by a logical not.

Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:59:44 +00:00
Eitan Adler
5d08632eba Mark bsdar_errc as __dead2 to help code analysis tools.
PR:		bin/172636
Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
Approved by:	cperciva
MFC after:	3 days
2012-10-22 02:12:06 +00:00
Marcel Moolenaar
c175365cec Add ATF to the build. This is may be a bit rought around the egdes,
but committing it helps to get everyone on the same page and makes
sure we make progress.

Tinderbox breakages that are the result of this commit are entirely
the committer's fault -- in other words: buildworld testing on amd64
only.

Credits follow:

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Sponsored by:	Isilon Systems
Based on work by:	keramida@
Thanks to:	gnn@, mdf@, mlaier@, sjg@
Special thanks to:	keramida@
2012-10-22 01:18:41 +00:00
Andreas Tobler
6f1a642726 Fix build. 2012-10-21 08:38:55 +00:00
Ed Schouten
eccad22277 More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
2012-10-20 10:33:15 +00:00
Ulrich Spörlein
cc4842a1c7 Apply local patches to mandoc and connect it to the build.
- adds a couple more library strings used in the tree
- changes some more to the current groff spelling
- changes page footer to match groff style
2012-10-20 10:06:38 +00:00
Ulrich Spörlein
e4d7d10517 Merge mandoc from vendor into contrib and provide the necessary Makefile glue.
It's not yet connected to the build.
2012-10-19 22:21:01 +00:00
Marcel Moolenaar
21eb01cbce Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-10-19 19:56:17 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
2012-10-19 14:49:42 +00:00
Ed Schouten
39893d565a Add missing const keywords. 2012-10-19 14:29:03 +00:00
John Baldwin
b49af68ca0 Correct the order of the MFU and MRU labels. I had reversed them.
Submitted by:	Nikolay Denev  ndenev gmail
Pointy hat to:	jhb
MFC after:	3 days
2012-10-19 12:28:26 +00:00
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