Commit Graph

11725 Commits

Author SHA1 Message Date
John Baldwin
ff87ae350e Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'.  It can be used to determine which files are
using physical pages of memory and how much each is using.

Differential Revision:	https://reviews.freebsd.org/D2277
Reviewed by:	alc, kib
MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc. (forward porting to HEAD/10)
2015-05-27 18:11:05 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Dmitry Chagin
c64979dc7e Teach kdump to understand both linux emulation.
Differential Revision:	https://reviews.freebsd.org/D1079
Reviewed by:	emaste
2015-05-24 16:22:03 +00:00
Edward Tomasz Napierala
b853c718a9 Advertise ctlstat(8) a little better.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-05-22 11:59:37 +00:00
Warner Losh
68930541b6 Remove stray DEBUG_FLAGS=-g that snuck in with r184761. 2015-05-21 14:36:14 +00:00
Baptiste Daroussin
7b0896d882 Remove demandoc(1) from the build 2015-05-21 13:02:43 +00:00
Baptiste Daroussin
8def216e05 Drop libmandoc and incorporate it into the main mandoc Makefile
This simplifies maintainance of mandoc(1).
Note that the same direction was taken on OpenBSD
2015-05-21 12:51:56 +00:00
Baptiste Daroussin
b5d6933ff7 * fix roff terminology in .Nd
* remove .Xr to self
* add AUTHORS section

Submitted by:	schwarze at OpenBSD
2015-05-21 08:28:48 +00:00
Baptiste Daroussin
b704d1f289 add an include on sys/types.h because we do explicitly use size_t
remove unused stdbool.h

Suggested by:	schwarze at OpenBSD
2015-05-21 08:26:24 +00:00
Baptiste Daroussin
46cc634986 Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN
Submitted by:	schwarze at OpenBSD
2015-05-21 08:23:45 +00:00
Baptiste Daroussin
0330f102a0 sort headers 2015-05-21 08:20:42 +00:00
Allan Jude
04017fc7a4 Create links to the libprocstat man pages for all of the libprocstat functions so they can be looked up by name
Add a cross refrence to libprocstat in the procstat.1 man page

Differential Revision:	https://reviews.freebsd.org/D2578
Suggested by:	jmg
Reviewed by:	brueffer
Approved by:	wblock (mentor)
MFC after:	1 week
Sponsored by:	ScaleEngine Inc.
2015-05-21 03:32:44 +00:00
Baptiste Daroussin
31129d4f23 Synchronize with OpenBSD
Obtained from:	OpenBSD
2015-05-18 22:40:12 +00:00
John-Mark Gurney
e48a49b333 Don't do things we aren't allowed to do in a signal handler... Defer
the work to the main thread...  This fixes a possible crash if SIGINFO
is delivered at the wrong time...

This still leaves getrusage broken for some reason, but I believe that
is a kernel issue and cannot be fixed here...
2015-05-18 19:18:42 +00:00
Luiz Otavio O Souza
1947004980 Properly align the header and the data columns for netstat -r with and
without the -W flag.
2015-05-18 18:03:47 +00:00
Luiz Otavio O Souza
587b51331a Adjust the string format to match the actual number of arguments.
This fix a segmentation fault on ARM when netstat -r is used together with
-W.

This issue was introduced in r279122.
2015-05-17 15:12:55 +00:00
Eitan Adler
6f55e69eb7 ssh-copy-id: Add missing line continuation
PR:		194301
Reported by:	pkubaj@riseup.net
Patch by:	Ross Kilgariff <rosskilgariff@gmail.com>
2015-05-16 06:15:49 +00:00
Baptiste Daroussin
d433cf9a8a Allow MANWIDTH to work with mandoc(1)
Reported by:	bdrewery
2015-05-15 15:56:28 +00:00
Ed Maste
e867fb0558 vtfontcvt: Allow 6 digits in verbose output
Some fonts (e.g. GNU Unifont) have more than 100,000 (half-)glyphs.

Sponsored by:	The FreeBSD Foundation
2015-05-14 20:17:53 +00:00
Ed Maste
9afb8b24ad Add ELF machine EM_IAMCU, 32-bit Intel MCU
It is e_machine 6, which was previously reserved for 486.
2015-05-14 18:29:05 +00:00
Edward Tomasz Napierala
ba8f0eb8fc Build GENERIC with RACCT/RCTL support by default. Note that it still
needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf.

Differential Revision:	https://reviews.freebsd.org/D2407
Reviewed by:	emaste@, wblock@
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-05-14 14:03:55 +00:00
Tony Finch
60214b7ff6 whois: add an option to query the PeeringDB 2015-05-14 11:37:36 +00:00
Tony Finch
315c9c163c Update whois(1) synopsis. 2015-05-14 11:33:31 +00:00
Tony Finch
a95cb27ce0 Bump whois(1) date.
(Thanks to bz@ for the reminder!)
2015-05-14 11:25:18 +00:00
Tony Finch
dfef6b156d whois: alphabetize whois server list 2015-05-14 10:33:51 +00:00
Tony Finch
35859f3a2f whois: do not clobber command-line flags when tweaking O_NONBLOCK
This can make whois fail to follow referrals when it should.
The bug was introduced in r281959.
2015-05-14 10:33:33 +00:00
Tony Finch
1326bf51e6 whois: try whois.nic.TLD if TLD.whois-servers.net does not exist
Based on an idea from OpenBSD.
2015-05-14 10:33:01 +00:00
Tony Finch
0279f129c6 whois: check WHOIS_SERVER as well as RA_SERVER environment variables
WHOIS_SERVER is used by Debian's whois client.
2015-05-14 10:32:35 +00:00
Tony Finch
298383b080 whois: code cleanup
Remove deprecated options.

Use pedantically correct types.
2015-05-14 10:32:05 +00:00
Tony Finch
c343f06104 whois: special case certain query suffixes
This extends the existing support for -NORID handles
to include -NICAT, -ARIN, and -RIPE handles.

The suffix machinery is also used to work around a problem with
lack of referrals from the Nominet server for .uk: names under
.ac.uk need to be queried directly at JANET's whois server.
2015-05-14 10:31:37 +00:00
Tony Finch
8b6444e7e4 Clean up whois manual.
Document the RA_SERVER environment variable.

Remove the obsolete -R option, and discourage people from trying
to use the Network Solutions server.

Describe the default behaviour in the DESCRIPTION section,
not buried in the options.
2015-05-14 10:30:37 +00:00
Simon J. Gerraty
28a6bc8146 Merge bmake-20150505 improve detection of malformed conditionals. 2015-05-10 22:03:59 +00:00
Baptiste Daroussin
7bc60a1616 For half and reverse line feeds, recognize both SUSv2-style escape-digit
and BSD-style escape-control-char sequences in the input stream.

Submitted by:	schwarze at OpenBSD
Discussed with:	schwarze at OpenBSD
Obtained from:	OpenBSD
2015-05-10 11:41:38 +00:00
Baptiste Daroussin
f23ed79b08 Fix about ten integer overflows and underflows and a handful of logic
errors in line number handling.

Submitted by:	ingo at OpenBSD
Discussed with:	ingo at OpenBSD
Obtained from:	OpenBSD
2015-05-08 22:11:54 +00:00
Baptiste Daroussin
696e43653b Reduce the size to 64 for the commands, 512 was way too large for the purpose
Noticed by:	julian
2015-05-07 21:30:29 +00:00
Gleb Smirnoff
e42e1fcc64 Printing interface names:
o Restore historical behaviour of appending '*' if interface is down,
  and we have enough space to print it (usually we don't). [1]
o Do not truncate interface names when printing in encoded format.
o Report interface flags into encoded format.

PR:		199873 [1]
Sponsored by:	Nginx, Inc.
2015-05-06 16:43:44 +00:00
Baptiste Daroussin
a2ddd55e00 Enlarge the buffer for storing macros as some macros can be longer than 5 2015-05-05 09:54:47 +00:00
Baptiste Daroussin
209bd1c65e Update the list of known roff commands (adding the mdoc package)
Obtained from:	NetBSD
2015-05-05 09:50:21 +00:00
Baptiste Daroussin
955a5eff37 Properly assign open and close brackets and checks memory
Obtained from:	NetBSD
2015-05-05 09:33:32 +00:00
Baptiste Daroussin
ca887f8d07 Ensure we read existing values of the stk table
Obtained from:	NetBSD
2015-05-05 09:29:32 +00:00
Baptiste Daroussin
0a2963a2ac Use stdup(3) and check its return instead from homebrew version using strcpy(3)
and malloc(3)

Obtained from:	NetBSD
2015-05-05 09:26:32 +00:00
Baptiste Daroussin
8916ff53c3 cosmetic fixes
Obtained from:	NetBSD
2015-05-05 09:24:29 +00:00
Baptiste Daroussin
c99acb7302 Apply seom style(9) fixes from NetBSD
Obtained from:	NetBSD
2015-05-05 09:01:42 +00:00
Baptiste Daroussin
224c825745 Prevent useless use of strdup(3)
Obtained from:	NetBSD
2015-05-05 08:25:25 +00:00
Baptiste Daroussin
1dd178d10d Replace homebrewed NIL by NULL 2015-05-05 08:17:40 +00:00
Baptiste Daroussin
179646cc91 Use stdbool instead of homebrewed boolean 2015-05-05 08:15:10 +00:00
Baptiste Daroussin
64a70bfbde Another function to ansify 2015-05-05 07:52:41 +00:00
Baptiste Daroussin
3487fc5d49 Remove unused variables 2015-05-05 07:51:57 +00:00
Baptiste Daroussin
1e0ae120f5 Explicitly use O_RDONLY instead of 0 2015-05-05 07:49:46 +00:00
Baptiste Daroussin
4fc9d67654 Use strlcpy(3) instead of strcpy(3) 2015-05-05 07:47:36 +00:00
Baptiste Daroussin
bd2faad734 upper the warning level to 3 2015-05-05 07:42:40 +00:00
Baptiste Daroussin
c78092e8d0 Another bit of ansification 2015-05-05 07:42:10 +00:00
Baptiste Daroussin
b16000da4b Ansify to allow to work on it later 2015-05-05 07:33:38 +00:00
Baptiste Daroussin
53b89be196 Remove limitation on input lines by using getline(3) 2015-05-04 22:27:55 +00:00
Baptiste Daroussin
72cc039d1a Extend the list of known nroff/troff commands
Obtained from:	heirloom doctools
2015-05-04 22:18:58 +00:00
Baptiste Daroussin
466dd46f7b Take from heirloom's doctools version of checknr(1) some cosmetic fixes
This helps working on synchronising both tools
2015-05-04 22:05:12 +00:00
Brooks Davis
5743dcb3c2 Remove "capability mode sandbox enabled" messages.
These messages serve little purpose and break some consumers.

PR:		199855
Differential Revision:	https://reviews.freebsd.org/D2440
Reviewed by:	rwatson
Approved by:	pjd
MFC after:	1 week
Sponsored by:	DARPA, AFRL
2015-05-04 21:44:51 +00:00
Baptiste Daroussin
2b30fb2639 Parse filename until first space then print the rest of the line after file
inclusion

This is the same behaviour of heirloom's soelim
2015-05-04 18:20:31 +00:00
Baptiste Daroussin
e5ea68e766 Capsicumize col(1) 2015-05-02 12:22:24 +00:00
Baptiste Daroussin
078fd35f79 Actually push the right tests 2015-05-02 12:19:24 +00:00
Baptiste Daroussin
3bf8ad7de2 Add regression test about reverse line feed to col(1) 2015-05-02 12:08:28 +00:00
Baptiste Daroussin
62e2f1e2f4 Add regression tests for soelim(1) 2015-05-02 11:09:58 +00:00
Baptiste Daroussin
b4a0618c44 Improve compatibility groff's soelim
While here implement -C from GNU groff

Reported by:	delphij
2015-05-01 23:54:09 +00:00
Xin LI
6f32f49c02 Correct - handling.
Reported by:	pkg-fallout
X-MFC-with:	r282318
2015-05-01 22:43:26 +00:00
Baptiste Daroussin
363da13804 Replace groff's soelim by soeliminate(1) renamed soelim(1) 2015-05-01 20:08:25 +00:00
Baptiste Daroussin
32c8097270 Remove bundled reallocarray(3) since it is now in libc 2015-05-01 18:32:54 +00:00
Baptiste Daroussin
a9da03ef30 Use defines to improve clarity
MFC after:	2 weeks
2015-05-01 17:33:32 +00:00
Baptiste Daroussin
f6240da93c col: fixing 25 year old bug
Makes col(1) respect POSIX again for escape sequences as decribed in its manpage
The bug was introduced in CSRG in 1990
This also reverts r280911

Differential Revision:	https://reviews.freebsd.org/D2424
Reviewed by:	jhb
MFC after:	2 weeks
2015-05-01 17:18:07 +00:00
Ed Maste
83990d380a Actually add c++filt's Makefile
Missed in r282285

Pointy hat to:	emaste
2015-04-30 22:51:15 +00:00
Ed Maste
0a06cffc15 Add ELF Tool Chain's c++filt to the build
Differential Revision:	https://reviews.freebsd.org/D2408
Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
2015-04-30 21:30:33 +00:00
Edward Tomasz Napierala
82224d7df8 Remove spurious period.
MFC after:	1 month
Sponsored by:	International OCD Foun^W^W^WThe FreeBSD Foundation
2015-04-29 17:01:28 +00:00
Edward Tomasz Napierala
aae2a24b49 Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-29 16:41:49 +00:00
Rene Ladan
483117a646 The Dutch queen abdicated two years ago, the national holiday associated with
her birthday is now associated with the birthday of her son.
2015-04-27 17:04:27 +00:00
Mariusz Zaborski
49ceb674df Add myself (oshogbo) to calendar.freebsd and committers-src.dot.
Approved by:	pjd (mentor)
2015-04-27 16:45:16 +00:00
Jilles Tjoelker
c321006086 hexdump: Don't use uninitialized struct stat. 2015-04-26 21:34:55 +00:00
Maxim Sobolev
da551bb2c2 o Properly init prevtime, so that we don't print bogus value in the
first entry reported by the relative mode (-R).

o Properly print negative offsets, which I guess may happen if
records get re-ordered somehow, possibly due to the locking. Right
now we report huge bogus diff (i.e. 2 seconds or so).
2015-04-25 04:58:08 +00:00
Xin LI
3cddd28ef1 Try alternate addresses more agressively.
Attempt to connect to alternate addresses if the connect doesn't
succeed in 180ms, and cut wait time between connection attempts
in half for each additional, if no connection was established.

Take the first connection to succeed and close the others.

This makes whois more responsive when e.g. IPv6 service took long
time or fail to respond.

PR:		158125
Submitted by:	Mark Andrews <marka isc org> (with changes from me)
MFC after:	2 weeks
2015-04-25 00:51:44 +00:00
Edward Tomasz Napierala
9181358e8a Make nfsstat(1) build with WARNS=6.
Sponsored by:	The FreeBSD Foundation
2015-04-24 07:57:59 +00:00
Edward Tomasz Napierala
722e25522e Remove oldnfs support from nfsstat(1).
Reviewed by:	rmacklem@ (earlier version)
Sponsored by:	The FreeBSD Foundation
2015-04-23 14:36:01 +00:00
John Baldwin
179fa75e6e Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
Simon J. Gerraty
db29cad815 Merge bmake-20150418
PR: 199486
2015-04-21 04:40:38 +00:00
Pedro F. Giffuni
df6e4074c0 patch(1): small include changes.
Mostly to match OpenBSD, no functional change.

Obtained from:	OpenBSD
2015-04-20 22:15:18 +00:00
Eitan Adler
6f9b387301 find.1: Add missing whitespace:
Obtained from:	Dragonfly (dee38d02d51cc8316f82b0263158d2546f2398bc)
2015-04-20 02:23:00 +00:00
Eitan Adler
ba6663d9a1 rpcgen: fix use use of strcmp
strcmp only guarantee that it will return at least 1 if the string B
	is greater than that of string A.
2015-04-19 04:53:28 +00:00
Eitan Adler
e4c6d6e268 calendar: remove useless check
lineline checked for 0 in the while loop condition.  There is no need to
	check for it additionally in the body.

CID:	1288959
MFC After:	1 week
2015-04-19 04:27:50 +00:00
Edward Tomasz Napierala
4e25c86f4c Remove some oldnfs remnants.
Differential Revision:	https://reviews.freebsd.org/D2287
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-18 16:08:06 +00:00
Xin LI
dec32474f0 r281540 was upstreamed as NetBSD r1.108 of gzip.c, note it as merged. 2015-04-16 22:30:57 +00:00
Allan Jude
630a02daae Fix libxo output from uptime command
the libxo output for uptime returned multiple 'uptime' keys, one each for number of days, hours, and minutes of uptime.
This is invalid JSON.
This patch makes the output the raw number of seconds, as well as adding keys for the individual unit values
A string of the original output from the plain-text uptime command is also added

Differential Revision:	https://reviews.freebsd.org/D2063
Reviewed by:	jmg
Approved by:	marcel
Sponsored by:	ScaleEngine Inc.
2015-04-16 22:09:37 +00:00
Bryan Drewery
8ded906d2a Fix SIGINFO race causing final results to be lost to stderr.
If a SIGINFO comes in after the file is read then the 'siginfo' flag is set to
1 and the next call to show_cnt() (at exit) would print the data to stderr
rather than the expected stdout.

This was found with spamming Poudriere with SIGINFO which caused a 'wc -l'
execution to return no data rather than an expected number.

MFC after:	2 weeks
2015-04-16 21:44:35 +00:00
Bryan Drewery
90e8186404 Remove extra flags from r250462.
MFC after:	1 week
2015-04-16 02:24:40 +00:00
Tijl Coosemans
1243a98e38 Remove the const qualifier from iconv(3) to comply with POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html

Adjust all code that calls iconv.

PR:		199099
Exp-run by:	antoine
MFC after:	2 weeks
2015-04-15 09:09:20 +00:00
Xin LI
c1c4677aec When reading in the original file name from gzip header, we read
in PATH_MAX + 1 bytes from the file.  In r281500, strrchr() is
used to strip possible path portion of the file name to mitigate
a possible attack.  Unfortunately, strrchr() expects a buffer
that is NUL-terminated, and since we are processing potentially
untrusted data, we can not assert that be always true.

Solve this by reading in one less byte (now PATH_MAX) and
explicitly terminate the buffer after the read size with NUL.

Reported by:	Coverity
CID:		1264915
X-MFC-with:	281500
MFC after:	13 days
2015-04-15 00:07:21 +00:00
Andrew Turner
da713b9ed2 Disable truss, gprof, and lint on arm64, they don't build.
Sponsored by:	The FreeBSD Foundation
2015-04-14 10:15:58 +00:00
Eitan Adler
340bde8178 ipcs: fix builds that use gcc
gcc gets annoyed by duplicate declarations

Reported by:	sbruno
Reviewed by:	sbruno
2015-04-14 04:52:52 +00:00
Eitan Adler
11f4012fa1 ipcs: fix warnings (WARNS=1 -> WARNS=6)
- fix shadow warnings
	- change type from off_t to size_t which is more correct and avoids
	  signed/unsigned compare
	- use new initializer format to avoid "missing values" warning

Reviewed by:	jhb
2015-04-13 19:58:11 +00:00
Xin LI
0eeac58930 Sync with NetBSD:
- Mention xz(1) in gzip(1).
 - Strip away path from header name when decompressing.

MFC after:	2 weeks
2015-04-13 19:46:30 +00:00
Edward Tomasz Napierala
01d54ad206 Add libxo(3) support to iscsictl(8).
PR:		198396
Submitted by:	Marie Helene Kvello-Aune <marieheleneka at gmail.com>
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-12 09:36:50 +00:00
Baptiste Daroussin
c271fa9295 Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed
2015-04-10 17:50:28 +00:00
Baptiste Daroussin
64026fd83c Remove uneeded link to libkiconv 2015-04-09 21:30:11 +00:00
Baptiste Daroussin
32e5044deb Convert mt(1) and libmt to LIBADD
While here fix missing link to libbsdxml for libmt
Fix overlinking in mt(1)
Make add an indirect libmt dependency on bsdxml to allow static linking if
needed
2015-04-09 21:26:38 +00:00