Commit graph

13391 commits

Author SHA1 Message Date
Kyle Evans 8433795d66 grep test: Fix copyright notice
The copyright notice was erroneously introduced as one from the NetBSD
foundation due to it being copied from a file in the NetBSD test suite, but
this file itself is not derived from or supplied with the NetBSD test suite.

MFC after:	3 days
2017-12-03 02:23:29 +00:00
Alan Somers 9ccdc62331 Reap dead code
usr.bin/dc/inout.c
	Reap some dead code that was killed back in 2003 in OpenBSD, in
	version 1.8 of this file.

MFC after:	3 weeks
2017-12-02 06:05:03 +00:00
Konstantin Belousov b05a4a9db7 vmstat: fix style(9) violations and bump WARNS.
Based on the patch by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Sponsored by:	Mysterious Code Ltd. (Pawel),
	  The FreeBSD Foundation (me)
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13228
2017-12-01 22:38:28 +00:00
Eitan Adler f99112ded5 fmt(1): Fix usage of Nm macro 2017-12-01 21:44:23 +00:00
Eitan Adler 5f0345185b Revert license change.
This isn't identical to the one permitted by UCB since
it is copyright multiple people.
2017-12-01 03:22:40 +00:00
Pedro F. Giffuni 64de3fdd58 SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
Pedro F. Giffuni 8820ecc040 SPDX: Fix some cases wrongly attributed to MIT.
In the cases of BSD-style license variants without clauses, use 0BSD for
the time being in lack of a better description.
2017-11-30 15:10:11 +00:00
Eitan Adler 847e9b668f Finish cleaning up license :\ 2017-11-30 08:23:40 +00:00
Eitan Adler 86fdf1748d Remove advertising clause from pr(1)
Permitted by https://www.freebsd.org/copyright/license.html
Renumber 4->3 to be consistent with other files
2017-11-30 07:08:45 +00:00
Xin LI 2404b5d277 Remove unused include.
MFC after:	2 weeks
2017-11-29 09:18:24 +00:00
John Baldwin 9d9fee3eed Replace a reference to a license in another file with the license text.
The relevant file was recently renamed, so the reference was stale.
In addition, explicit licenses are more typical in our sources.
2017-11-29 05:07:54 +00:00
Alan Somers 013953eb5f Add basic tests for ctfconvert(1), fold(1) and rs(1)
Add basic command line parsing test coverage for these utilities.  The tests
were automatically generated based on their man pages.  These tests can be
expanded by hand for more thorough coverage.  The aim is to generate very
basic amount of test coverage for all the utilities in the base system.

Tests generated via: https://github.com/shivansh/smoketestsuite/

Submitted by:	shivansh
Reviewed by:	asomers
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D12424
2017-11-27 20:01:58 +00:00
Pedro F. Giffuni 1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Alexander Motin 5be4479bfd Make ctlstat -n option work reasonably for sparse LUN list.
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2017-11-27 15:24:13 +00:00
Dave Cottlehuber 5ace991266 add myself as ports committer, mentor jrm + swills
Approved by:	jrm
Differential Revision:	https://reviews.freebsd.org/D13268
2017-11-27 14:13:30 +00:00
Edward Tomasz Napierala 7acc357f58 .Xr pmcstat(8) from kgmon(8) and gprof(1).
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-11-27 12:37:14 +00:00
Xin LI 216f72f141 Set errno to EFTYPE instead of EINVAL to be more consistent with the
rest of code.

MFC after:	1 month
2017-11-25 09:03:38 +00:00
John Baldwin ffb6607984 Decode kevent structures logged via ktrace(2) in kdump.
- Add a new KTR_STRUCT_ARRAY ktrace record type which dumps an array of
  structures.

  The structure name in the record payload is preceded by a size_t
  containing the size of the individual structures.  Use this to
  replace the previous code that dumped the kevent arrays dumped for
  kevent().  kdump is now able to decode the kevent structures rather
  than dumping their contents via a hexdump.

  One change from before is that the 'changes' and 'events' arrays are
  not marked with separate 'read' and 'write' annotations in kdump
  output.  Instead, the first array is the 'changes' array, and the
  second array (only present if kevent doesn't fail with an error) is
  the 'events' array.  For kevent(), empty arrays are denoted by an
  entry with an array containing zero entries rather than no record.

- Move kevent decoding tables from truss to libsysdecode.

  This adds three new functions to decode members of struct kevent:
  sysdecode_kevent_filter, sysdecode_kevent_flags, and
  sysdecode_kevent_fflags.

  kdump uses these helper functions to pretty-print kevent fields.

- Move structure definitions for freebsd11 and freebsd32 kevent
  structures to <sys/event.h> so that they can be shared with userland.
  The 32-bit structures are only exposed if _WANT_KEVENT32 is defined.
  The freebsd11 structures are only exposed if _WANT_FREEBSD11_KEVENT is
  defined.  The 32-bit freebsd11 structure requires both.

- Decode freebsd11 kevent structures in truss for the compat11.kevent()
  system call.

- Log 32-bit kevent structures via ktrace for 32-bit compat kevent()
  system calls.

- While here, constify the 'void *data' argument to ktrstruct().

Reviewed by:	kib (earlier version)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D12470
2017-11-25 04:49:12 +00:00
Konstantin Belousov 72f406a92c vmstat: use 64-bit counters from struct vmtotal.
Consistently print counters using unsigned intmax type.

Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Sponsored by:	Mysterious Code Ltd.
Differential revision:	https://reviews.freebsd.org/D13199
2017-11-23 19:10:09 +00:00
Konstantin Belousov d5589c6c60 Use C standard spelling uint64_t for u_int64_t.
Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Sponsored by:	Mysterious Code Ltd.
X-Differential revision:	https://reviews.freebsd.org/D13199
2017-11-23 19:06:44 +00:00
Konstantin Belousov 1b7a3d1f5f Order declarations alphabetically.
Match signess of the format and the value.

Noted by:	bde
Sponsored by:	The FreeBSD Foundation
2017-11-22 22:04:27 +00:00
Niclas Zeising 37ab131446 Fix language in a bunch of error messages.
Reviewed by:		emaste
Approved by:		emaste
MFC after:		1 month
Differential Revision:	D13193
2017-11-22 18:06:41 +00:00
Kyle Evans bc4f0fe358 patch(1): don't assume a match if we run out of context to check
Patches with very little context (-U0 and -U1) could get misapplied if
the file to be patched changes and a hunk is no longer applicable. Matching
with fuzz would be attempted and default to a match when we unexpectedly ran
out of context.

This also affected patches with higher levels of context but had limited
actual context due to the hunk being located near the beginning/end of file.

PR:		74127, 223545 (exp-run)
Reviewed by:	emaste, pfg
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12631
2017-11-22 03:44:19 +00:00
Konstantin Belousov 90dd3e79cc systat: use and correctly display 64bit counters.
Following struct vmtotal changes, make systat use and correctly
display 64-bit counters.  Switch to humanize_number(3) to overcome
homegrown arithmetics limits in pretty printing large numbers.  Use
1024 as a divisor for memory fields to make it consistent with other
tools and users expectations.

Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Sponsored by:	Mysterious Code Ltd.
PR:	2137
Differential revision:	https://reviews.freebsd.org/D13105
2017-11-21 19:55:32 +00:00
Xin LI 90f528e8d7 Support SIGINFO.
Obtained from:	NetBSD
MFC after:	2 weeks
2017-11-21 08:14:30 +00:00
Alan Somers 396c556d77 Add ATF tests for head(1)
Submitted by:	Fred Schlecter <https://github.com/fjs-github>
Reviewed by:	asomers, jilles
MFC after:	3 weeks
Differential Revision:	https://github.com/freebsd/freebsd/pull/127
2017-11-20 22:55:02 +00:00
Ed Maste 5f8eed2f42 Install strings unconditionally
Previously it was enabled by WITH_/WITHOUT_TOOLCHAIN, but it is commonly
expected to be available and may have non-toolchain consumers.  As it
is now taken from the BSD-licensed ELF Tool Chain project, just install
it unconditionally.

PR:		213665, 223725
Reviewed by:	bdrewery
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8398
2017-11-20 20:55:41 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Xin LI b2ea244070 MFV r326007: less v529.
MFC after:	2 weeks
2017-11-20 08:52:33 +00:00
Pedro F. Giffuni df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Andriy Gapon 6effb21323 procstat: fix a crash with -k -a options
The traditional / legacy usage should still be supported.
This fixes a regression in r324619 that introduced a nicer, verb based
interface.

Reviewed by:	brooks
X-MFC with:	r324619
2017-11-16 22:14:49 +00:00
Konstantin Belousov 9898800172 Remove xlint(1).
xlint is currently a fossil.  We have much more useful and alive tools
to do now what xlint did twenty years ago.

I did not cleared some stuff which makes lint operational, in
sys/x86/include and sys/sys, but I might do it as followup.  The
x86/include/ucontext.h and _types.h hacks made to please lint was the
main reason for my initial proposal to classify xlint as obsolete and
to remove it.

Also I do not intend to clear sccs ids.

Reviewed by:	bapt, brooks, emaste, jhb, pfg
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D13015
2017-11-16 14:37:18 +00:00
Benno Rice 0538d7bbe6 Remove all fortune datfiles except freebsd-tips.
Humour is a funny thing. What is funny to one person is not funny to all
people. What is insightful to one person is similarly not universal. The
fortune datfiles have been around a long time and have undoubtedly amused
people but it's time to acknowledge their subjective, and in some cases
at least potentially offensive, nature and stop distributing them with the
imprimatur of the FreeBSD project.

If anyone wishes to distribute these via other mechanisms they are welcome to
check them out of history and do so.

MFC after:	2 days
2017-11-14 21:18:30 +00:00
Warner Losh 0c16b53773 Move zstd from contrib to sys/contrib so it can be used in the
kernel. Adjust the Makefiles that referenced it to the new path.

Sponsored by: Netflix
OK'd by: cem@ and AllanJude@
2017-11-14 05:03:38 +00:00
Mark Felder fa193c587e Remove fortune quotes attributed to or providing admiration of Adolf Hitler
MFC after:	1 week
2017-11-13 21:55:34 +00:00
Xin LI 0ab69d713c find(1): Don't treat statfs() error as fatal in f_fstype, which can happen
when a directory is removed in the middle of find.

Instead of a full err(), allow find to continue, plus print a warning with
exitstatus set when appropriate.

Reported by:	100.chksetuid via gordon
Reviewed by:	jilles
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D13024
2017-11-11 19:18:47 +00:00
Baptiste Daroussin d0ab9cbec0 Remove __unused attributed on arguments that are actually used
MFC after:	3 days
2017-11-11 15:18:25 +00:00
Allan Jude 125996b592 vmstat: fix duplicate key in libxo output
In the libxo output from vmstat, the number of pages that have been
paged out uses the same key name as the number of times pages have been
paged. Appears to have been a typo or copy-pasto.

PR:		222198
Submitted by:	Yavuz Tanriverdi <stemix@gmail.com>
Reviewed by:	phil, garga
Differential Revision:	https://reviews.freebsd.org/D12395
2017-11-11 14:02:21 +00:00
Eitan Adler 1b3cd5ec63 mailaddr(7): wave goodbye
The information here is somewhere between ancient to obsolete.
It refers to a time in the internet's history when manual routing
was still useful, talks about UUCP as if its modern, and refers
to documents which I had trouble tracking down.

It seems unlikely that a manual page in this form would be useful, so
just remove it.

Reviewed By: imp, tsoome, bdrewery(?)
Differential Revision: https://reviews.freebsd.org/D12924
2017-11-11 07:00:40 +00:00
Kyle Evans 752e881db7 Revert r325365
r325365 caused several ports to fail to patch correctly. Revert it for the
time being until an exp-run can be completed.

Requested by:	antoine
Approved by:	emaste (implicit)
2017-11-08 23:11:15 +00:00
Kenneth D. Merry 70a8349311 Add the LTO-8 Type M density code (0x5d, LTO-8M) to libmt and the
mt(1) man page.

LTO-8 Type M (also known as M8) is a pristine LTO-7 cartridge
formatted in a LTO-8 drive in a new, higher density format.  It
has a separate density code, and is only readable in an LTO-8
drive.

lib/libmt/mtlib.c:
	Add the LTO-8 Type M density code to the density table
	in libmt.

usr.bin/mt/mt.1:
	Add the LTO-8 Type M density code to the density
	table in the mt(1) man page.

MFC after:	3 days
Sponsored by:	Spectra Logic
2017-11-03 21:04:22 +00:00
Kyle Evans ed3b305993 patch(1): don't assume a match if we run out of context to check
Patches with very little context (-U0 and -U1) could get misapplied if
the file to be patched changes and a hunk is no longer applicable. Matching
with fuzz would be attempted and default to a match when we unexpectedly ran
out of context.

PR:		74127
Reviewed by:	emaste, pfg
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12631
2017-11-03 17:04:30 +00:00
Simon J. Gerraty e22fef7dc1 Update to bmake-20171028
Ignore empty MAKEOBJDIR[PREFIX]

Reported by:	bdrewery
2017-11-02 20:08:00 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Bryan Drewery 3806950135 DIRDEPS_BUILD: Connect new directories.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:04:07 +00:00
Eitan Adler c92116f340 The !! trick does not apply to all shells
Requested by:	emaste
2017-10-29 20:20:51 +00:00
Eitan Adler 417bdb60ca Update URLs in usr.bin
- http -> https
- contents have moved locations
- removal of URL if I could not find new location
2017-10-29 08:03:21 +00:00
Eitan Adler ff744dbd85 Modernize freebsd-tips a bit
- Prefer UTF-8 over ISO-8859-1
- Remove some references to printing man pages
- Combine duplicate '!!' tips
- 'rehash' is no longer needed
2017-10-29 04:53:33 +00:00
Eitan Adler 7e3f9a3440 Prefer using https over http 2017-10-29 04:41:01 +00:00
Jeremie Le Hen 0696540011 Update manpage date to when the deprecation notice was removed.
Reported by:	bcr
2017-10-27 21:48:02 +00:00