Commit Graph

13340 Commits

Author SHA1 Message Date
Enji Cooper
8c09935728 Add HAS_TESTS to all Makefiles that use the SUBDIR.${MK_TESTS}+= tests idiom 2017-08-02 08:14:06 +00:00
Enji Cooper
8fe10e175b Revert accidental character conversion for pfg's entry, done in r321886 2017-08-02 00:51:56 +00:00
Taras Korenko
05dee37094 + Add myself to calendar.freebsd. 2017-08-01 20:16:00 +00:00
Tobias C. Berner
b7824a0870 Add joneum to the calendar.freebsd
Reported by:	mckusick
Submitted by:	joneum
2017-08-01 19:29:16 +00:00
Maksim Yevmenkin
02990f3b21 fix sort order 2017-08-01 18:48:09 +00:00
Maksim Yevmenkin
41837538e6 add myself
Requested by:	mckusick
2017-08-01 18:46:24 +00:00
Kirk McKusick
550bff8dfc Add Anne Dickison.
Requested by: Anne Dickison
2017-08-01 18:25:04 +00:00
Lev A. Serebryakov
9143211387 Add myself to the calendar.freebsd
Reported by:	mckusick
2017-08-01 18:05:19 +00:00
Michael Zhilin
6630716fa8 [calendar.freebsd] Add myselft into freebsd.calendar 2017-08-01 11:51:35 +00:00
Marcin Wojtas
945c72c7ae Add myself to calendar
Approved by: cognet (mentor)
2017-08-01 10:11:20 +00:00
Michael Tuexen
4cc853fe94 Add myself to calendar.
Reminded by:	mckusick
2017-08-01 09:26:22 +00:00
Vladimir Kondratyev
388b7f1cc5 Add myself to the calendar
Reminded by:	mckusick
Approved by:	gonzo (mentor)
2017-08-01 07:05:29 +00:00
Jason A. Harmening
31fc8bc32a Add myself to FreeBSD calendar
Requested by:	mckusick
2017-08-01 01:39:54 +00:00
Pedro F. Giffuni
b28eb0a74e Bring my aging self to calendar.freebsd.
Requested by: mckusick
2017-08-01 01:35:23 +00:00
Tobias C. Berner
03515a5191 Add myself to the calendar.freebsd
Reported by:    mckusick
2017-07-31 21:08:31 +00:00
Pawel Pekala
60aea5e323 Add myself to the calendar.freebsd
Reported by:	mckusick
2017-07-31 20:54:23 +00:00
Mateusz Guzik
a398d3d182 Add myself to the calendar.
Prodded by:	invisible peer pressure
2017-07-31 20:15:11 +00:00
Baptiste Daroussin
5543d382a7 Update mandoc to 1.14.2 2017-07-31 19:34:38 +00:00
Matt Joras
3a122598ce Add myself to the calendar.
Reported by:	mckusick
Approved by:	rstone (mentor)
Differential Revision:	https://reviews.freebsd.org/D11797
2017-07-31 18:10:10 +00:00
Eric Joyner
e996c94ed7 Add myself to calendar.freebsd
Reported by:	mckusick
2017-07-31 17:57:44 +00:00
Dru Lavigne
4a1f1e2bd3 Add myself to calendar. 2017-07-31 17:49:47 +00:00
Scott Long
e8df690ae4 Add an entry to the freebsd calendar for myself.
Reported by:	kirk
2017-07-31 15:50:58 +00:00
Jamie Gritton
53ffb44de4 Add myself to the birthday calendar.
Reminded by:	mckusick
2017-07-31 15:29:44 +00:00
Alan Somers
86ee4cb0d6 spellcheck jhale's calendar entry 2017-07-31 15:21:26 +00:00
Yoshihiro Takahashi
17764ab692 Add myself.
Reminded by:	mckusick
2017-07-31 14:53:03 +00:00
Alan Somers
20c4ac1eaf Add myself to the calendar
Reported by:	mckusick
2017-07-31 14:50:42 +00:00
Martin Matuska
0232d57132 Add myself to the calendar
Reminded by:	mckusick
2017-07-31 14:49:44 +00:00
Ravi Pokala
0096681c08 Add my birthday to the FreeBSD calendar
Requested by:	mckusick
2017-07-31 14:42:38 +00:00
Justin Hibbits
08a74c9de1 Add myself to the calendar
Reminded by:	mckusick
2017-07-31 14:16:35 +00:00
Wen Heping
e578390f9a add myself to calendar.freebsd 2017-07-31 13:32:35 +00:00
Nikolai Lifanov
47f4e09b37 add myself to calendar.freebsd 2017-07-31 13:08:47 +00:00
Stanislav Galabov
1336f0f4ae Add myself to calendar
Reminded by: mckusick
2017-07-31 09:46:48 +00:00
Eugene Grosbein
580fb05144 Add myself.
Reminded by:    mckusick
Approved by:	vsevolod (mentor)
2017-07-31 09:18:53 +00:00
Kristof Provost
401b97316c Add myself to calendar
Reminded by:  mckusick
2017-07-31 09:13:18 +00:00
Nick Hibma
0e7703df97 Add my birthday entry to the calendar file. 2017-07-31 08:16:12 +00:00
Romain Tartière
96762f93cb Add myself
Reminded by:	mckusick
2017-07-31 08:11:58 +00:00
Toomas Soome
2dec6fd7be Add myself to calendar
Reminded by:  mckusick
2017-07-31 08:11:05 +00:00
Ruslan Bukin
b5e02bc3c0 Add my birthday. 2017-07-31 08:10:02 +00:00
Emmanuel Vadot
bdf7f6d026 Add myself to calendar
Reminded by:  mckusick
2017-07-31 07:58:29 +00:00
Sepherosa Ziehau
86f832caeb calendar: Add myself.
Reminded by: mckusick
2017-07-31 07:48:08 +00:00
Alexander Motin
ba86ca7c84 Fix singular/plural "users" output.
It was broken during libxo'fication.

PR:		221039
Submitted by:	timur@
MFC after:	1 week
2017-07-27 14:34:57 +00:00
Bjoern A. Zeeb
ae69ad884d After inpcb route caching was put back in place there is no need for
flowtable anymore (as flowtable was never considered to be useful in
the forwarding path).

Reviewed by:		np
Differential Revision:	https://reviews.freebsd.org/D11448
2017-07-27 13:03:36 +00:00
Ed Schouten
cea9310d4e Upgrade to the latest sources generated from the CloudABI specification.
The CloudABI specification has had some minor changes over the last half
year. No substantial features have been added, but some features that
are deemed unnecessary in retrospect have been removed:

- mlock()/munlock():

  These calls tend to be used for two different purposes: real-time
  support and handling of sensitive (cryptographic) material that
  shouldn't end up in swap. The former use case is out of scope for
  CloudABI. The latter may also be handled by encrypting swap.

  Removing this has the advantage that we no longer need to worry about
  having resource limits put in place.

- SOCK_SEQPACKET:

  Support for SOCK_SEQPACKET is rather inconsistent across various
  operating systems. Some operating systems supported by CloudABI (e.g.,
  macOS) don't support it at all. Considering that they are rarely used,
  remove support for the time being.

- getsockname(), getpeername(), etc.:

  A shortcoming of the sockets API is that it doesn't allow you to
  create socket(pair)s, having fake socket addresses associated with
  them. This makes it harder to test applications or transparently
  forward (proxy) connections to them.

  With CloudABI, we're slowly moving networking connectivity into a
  separate daemon called Flower. In addition to passing around socket
  file descriptors, this daemon provides address information in the form
  of arbitrary string labels. There is thus no longer any need for
  requesting socket address information from the kernel itself.

This change also updates consumers of the generated code accordingly.
Even though system calls end up getting renumbered, this won't cause any
problems in practice. CloudABI programs always call into the kernel
through a kernel-supplied vDSO that has the numbers updated as well.

Obtained from:	https://github.com/NuxiNL/cloudabi
2017-07-26 06:57:15 +00:00
Piotr Pawel Stefaniak
fbdbd284ae indent(1): add option -tsn for setting tab size. 2017-07-25 17:04:35 +00:00
Kyle Evans
0e95794283 bsdgrep(1): Don't exit before processing every file
Given an empty pattern (i.e. grep "" A B), bsdgrep(1) would previously exit()
with the appropriate exit code upon encountering an empty file. Likely intended
as an optimization, but this behavior is technically incorrect since an empty
pattern should match every line.

PR:		220924
Reviewed by:	emaste, cem (earlier version), ngie
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D11698
2017-07-25 01:50:37 +00:00
Ed Maste
3f71a0c918 ar: handle partial writes from archive_write_data
libarchive may limit a single archive_write_data call to handling
0x7fffffff bytes. Add a loop to handle partial writes.

Reviewed by:	kib, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D11715
2017-07-24 21:25:49 +00:00
Edward Tomasz Napierala
6e5f5f90ad Improve the ktrace(1) man page to make it slightly more obvious that there
are _two_ options that control its behaviour wrt child processes; slightly
improve the example[1], and add Xrefs.

Discussed with:	wblock [1]
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-07-24 16:58:54 +00:00
Simon J. Gerraty
c7019bf79d Import bmake-20170720
Includes fix for compat handling of interrupts.
2017-07-24 04:38:05 +00:00
Piotr Pawel Stefaniak
3e2c1447d5 indent(1): better alignment of comments on code.
If aligning the beginning of a comment to -cn would mean no space between
code and the comment, align it to the next tab stop.
2017-07-23 20:25:53 +00:00
Piotr Pawel Stefaniak
d0d51a3322 indent(1): rename the profile file.
Currently, indent's testing mechanism will attempt to apply options from
a file named ${test}.pro - and this test's filename is comments.0.
2017-07-23 15:07:52 +00:00
Piotr Pawel Stefaniak
f30beab3a1 indent(1): don't produce unnecessary blank lines.
Don't force a blank line between an opening brace and a block comment -- not
even if -bbb (blank lines before block comments) is on.
2017-07-23 14:33:04 +00:00
Piotr Pawel Stefaniak
a3abcad0b7 indent(1): don't produce unneeded space character in function declarators. 2017-07-23 14:04:45 +00:00
Dimitry Andric
03f9f6aa0d Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.0 (trunk r308421).  Upstream has branched for the 5.0.0 release,
which should be in about a month.  Please report bugs and regressions,
so we can get them into the release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

MFC after:	2 months
2017-07-22 11:08:25 +00:00
Mark Johnston
8781788d2b Fix top(1) output when zfs.ko is loaded but ZFS is not in use.
Reviewed by:	allanjude
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D11693
2017-07-21 23:53:48 +00:00
Dimitry Andric
90a5403fea Merge ^/head r321307 through r321350. 2017-07-21 18:54:34 +00:00
Edward Tomasz Napierala
8fb164a64e Make truss(1) cross-reference dtrace(1) and bump .Dd.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-07-21 13:58:51 +00:00
Edward Tomasz Napierala
279e48d5be Use more usual formatting for the EXAMPLES section of truss(1).
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-07-21 13:50:59 +00:00
Edward Tomasz Napierala
c5ed286463 Use more usual formatting for the EXAMPLES section of ktrace(1).
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-07-21 13:27:25 +00:00
Dimitry Andric
7a0f27890a Merge ^/head r321239 through r321306. 2017-07-20 20:37:23 +00:00
Enji Cooper
8490e4c207 procstat(8): clarify program usage
- Visualize mutually exclusive options and their corresponding
  arguments.
- Try to make the subtleties that are expressed in the code, and
  potentially in the manpages, more apparent.
2017-07-20 05:43:48 +00:00
Mark Johnston
75a14d2220 Decode FreeBSD11 fstatat calls. 2017-07-19 23:34:28 +00:00
Dimitry Andric
2fef18f836 Merge ^/head r320994 through r321238. 2017-07-19 19:43:10 +00:00
Enji Cooper
274b460b60 Use more flexible expression for replacing t_diff in
contrib/netbsd-tests/usr.bin/diff/t_diff.sh with the name of the script via
`basename $0`.

This was a change I forgot to port over from
^/head/gnu/usr.bin/diff/tests/Makefile@r272787.
2017-07-19 18:30:16 +00:00
Enji Cooper
7250a09527 Expose the ILP32/LP64 programming environments based on
__ILP32__/__LP64__ instead of by architecture.

The list was incomplete (previous commits purged invalid architectures,
like __alpha__, but failed to add new ones). It's best to base the symbol
presence on whether or not the architecture is ILP32 / LP64 capable, per
the compiler.

This fixes the ILP32/LP64 program environments on some architectures like
arm64, and by proxy fixes the tests on those architectures.

MFC after:	1 month
Reviewed by:	no one (timed out on feedback from imp)
Differential Revision:	D10787
2017-07-17 18:12:08 +00:00
Enji Cooper
4017abe27c Add tests that exercise -q, like -rq and add tests that test -q like -Nrq
MFC after:	2 months
MFC with:	r321076, r321077, r321078
2017-07-17 18:07:53 +00:00
Enji Cooper
2d920b13cb Fix exit status with -rq when there is a file in one directory but not another,
i.e., when print_only is called.

Prior to this change, -rq was always returning 0. After this change it will
return 1 if there is a difference between two directories.

This fixes compatibility with GNU diff and unbreaks backwards compatibility
expectations.

Found when trying to extend diff_test:brief_format_test.

MFC after:	2 months
MFC with:	r321076, r321077
2017-07-17 18:06:42 +00:00
Enji Cooper
4574a545d2 Add some tests for brief (--brief/-q) format
MFC after:	2 months
MFC with:	r321076
2017-07-17 17:50:50 +00:00
Enji Cooper
4d8c579095 Don't emit "diff: diff <options> arguments" when diffing files if
-q is specified.

This improves compatibility with GNU diff.

Found by accident with `diff -Nrq /usr/tests /usr/tests.new | grep Kyuafile`.

MFC after:	2 months
Relnotes:	yes
2017-07-17 17:36:04 +00:00
Simon J. Gerraty
8695518c44 Import bmake-20170711 2017-07-15 21:19:27 +00:00
Dimitry Andric
03f072d13d Merge ^/head r320971 through r320993. 2017-07-14 17:38:44 +00:00
Kenneth D. Merry
683b025ade Add IBM TS1155 density codes to libmt and the mt(1) man page.
These are taken directly from the density report from a TS1155
tape drive.  (Using mt getdensity)

lib/libmt/mtlib.c:
	Add 3592B5 encrypted/unencrypted density codes, and bpmm/bpi
	values.  The bpmm/bpi values are the same as TS1150, but
	there are 50% more tracks.

usr.bin/mt/mt.1:
	Add 3592B5 encrypted/unencrypted density codes, bpmm/bpi
	values and number of tracks.  Bump the man page date.

MFC after:	3 days
Sponsored by:	Spectra Logic
2017-07-14 16:45:46 +00:00
Dimitry Andric
d2043ca373 Merge ^/head r320573 through r320970. 2017-07-13 22:01:38 +00:00
Dimitry Andric
c439438675 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update
build glue.
2017-07-13 21:58:45 +00:00
Kyle Evans
b5ddde39ac Add some basic tests for hexdump(1)'s various output flags. Formatting
tests are omitted for this initial run as there are still some bugs to work
out there.

This covers -s flag testing on devices and non-devices that would have
caught breakage found in PR 219173 as well as other subtle breakage caused
locally.

Reviewed by:	cem, ngie
Approved by:	cem (acting co-mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11279
2017-07-13 03:52:54 +00:00
Martin Matuska
8bad9d67f0 MFV r320924:
Bump libarchive to 3.3.2

Vendor changes:
  PR #901: don't depend on stdin in a testcase

MFC after:	1 week
2017-07-13 00:28:36 +00:00
Warner Losh
14bcf3e185 Added new tool for doing experiments with SDIO card.
Due to its experimental nature, it's not yet connected to the build.

Submitted by: Ilya Babulin
2017-07-09 17:05:48 +00:00
Alan Somers
761e666303 stdbuf(1): Add buffer definition "B" to the usage message
This option has been missing from the usage message ever since the program
was first imported.

Submitted by:	shivansh
Reviewed by:	asomers
MFC after:	3 weeks
Sponsored by:	Google, Inc (GSoC 2017)
Differential Revision:	https://reviews.freebsd.org/D11529
2017-07-08 17:08:42 +00:00
Kyle Evans
26e1c38fbb Update copyright e-mail address to @FreeBSD.org address
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D11508
2017-07-06 19:53:30 +00:00
Enji Cooper
13464e4a44 Chase upstream change deprecating LIBXO_OPTIONS similar to r320521
LIBXO_OPTIONS was deprecated in favor of the --libxo options.

Inspired by:	https://github.com/Juniper/libxo (02272d5c6d7d)
2017-07-06 08:05:57 +00:00
Enji Cooper
faef91fab6 :l_flag:: be more aggressive when normalizing whitespace
Save output from ls -ldT and stat -l, then normalize all repeating whitespace using
sed to single column spaces.

This makes the test flexible with single-digit days, etc, similar to r320723. This
approach is just a bit more of a hammer approach because of how the columns are
ordered/spaced in both ls and stat.

MFC after:	1 week
MFC with:	r319841
2017-07-06 07:37:03 +00:00
Enji Cooper
5e8e7af348 Use %e instead of %d with x_output_date(..)
stat -x doesn't 0-fill days so %d is inappropriate. %e is correct.

MFC after:	1 week
MFC with:	r319841
2017-07-06 06:15:44 +00:00
Enji Cooper
01df7d10a5 Remove SUBDIR ordering/uniquifying in *bin/Makefile
After the addition of SUBDIR.yes, uniquifying/ordering the SUBDIRs doesn't
make a whole lot of sense, and it's in effect a half measure.

Ordering SUBDIR (after adding SUBDIR.yes to it) in bsd.subdir.mk is a
separate change that warrants more discussion/testing, because while
the SUBDIR_PARALLEL work largely fixed dependency ordering for SUBDIRs,
there might be downstream FreeBSD consumers that rely on the SUBDIR
ordering.

MFC after:	2 months
Reviewed by:	bdrewery
Differential Revision:	D11398
2017-07-06 04:15:30 +00:00
Allan Jude
1f3f7ac7ba Add deprecation notices for all rcmd tools
Submitted by:	bcr
Reviewed by:	emaste, bapt, jhl
MFC after:	immediate
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11471
2017-07-04 15:44:30 +00:00
Pedro F. Giffuni
85823a601c patch(1): add support for git generated diffs.
Sometimes patches coming from other places have extra a/ and b/
directories prepended to filenames.

Obtained from:	OpenBSD (CVS rev. 1.57, 1.58)
2017-07-02 21:00:30 +00:00
Dimitry Andric
f6e653bb10 Merge ^/head r320398 through r320572. 2017-07-02 11:48:07 +00:00
Dimitry Andric
a580b01494 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and update
build glue.
2017-07-02 11:41:15 +00:00
John Baldwin
51645e836d Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps.
Process core notes for a 32-bit process running on a 64-bit host need to
use 32-bit structures so that the note layout matches the layout of notes
of a core dump of a 32-bit process under a 32-bit kernel.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D11407
2017-06-29 21:31:13 +00:00
Greg Lehey
d12f826bb0 Spelling. 2017-06-28 00:50:51 +00:00
Dimitry Andric
a3604b95ed Merge ^/head r320042 through r320397. 2017-06-27 06:44:32 +00:00
Dimitry Andric
edd7eaddc8 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and update
build glue.
2017-06-27 06:40:39 +00:00
Warner Losh
1b224b09e9 Sort the compat11.* syscalls I added. Remove duplicate compat11.stat.
Submitted by: jhb@
2017-06-26 22:48:04 +00:00
Edward Tomasz Napierala
deb808ad3b Improve terminology in a comment.
Suggested by:	ian
MFC after:	2 weeks
2017-06-26 16:08:28 +00:00
Edward Tomasz Napierala
dd99f75ce6 Make resizewin(1) do flushing by using TCSAFLUSH instead of TCSANOW
followed by tcflush(3).  This works just as well and is more elegant.

Suggested by:	bde
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-06-26 13:14:41 +00:00
Rick Macklem
2d44649837 Add RPC count reporting for the two new RPCs added by r320322.
This is a content change.

PR:		219550
MFC after:	2 weeks
2017-06-24 20:09:23 +00:00
Maxim Sobolev
b5273808ce Doh, fix some botched "fix" in r320277.
Reported by:	cem
MFC after:	6 weeks
2017-06-23 23:11:05 +00:00
Emmanuel Vadot
b2dba1f64b dtc: Update to upstream 9ce35ff8
- Add "compatible with gpl dtc X.Y.Z" to version output so U-Boot doesn't complain
 - Fix cross reference node

This fixes some Allwinner DTS (and probably others).
2017-06-23 20:21:53 +00:00
Warner Losh
8207f12d6a Decode FreeBSD 11 compat stat, fstat and lstat calls. 2017-06-23 18:06:46 +00:00
Maxim Sobolev
e978052623 Don't leak file descriptor in some cases.
Reported by:	cem
MFC after:	6 weeks
2017-06-23 17:39:00 +00:00
Conrad Meyer
3452510890 join(1): Fix field ordering for -v output
Per POSIX, join(1) (in modes other than -o) is a concatenation of selected
character fields.  The joined field is first, followed by fields in the
order they occurred in the input files.

Our join(1) utility previously handled this correctly for lines with a match
in the other file.  But it failed to order output fields correctly for
unmatched lines, printed in -a and -v modes.

A simple test case is:

$ touch a
$ echo "2 1" > b
$ join -v2 -2 2 a b
1 2

PR:		217711
Reported by:	alt.j2-4o4s2yon at yopmail.com
Sponsored by:	Dell EMC Isilon
2017-06-22 02:19:39 +00:00
Emmanuel Vadot
8b4debd261 dtc: Update to upstream 917526
- Add missing "typename" in divmod's  "using" of binary_operator_base::result.
2017-06-20 18:29:01 +00:00
Bryan Drewery
c99b67a794 Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP.
Since buildenv exports SYSROOT all of these uses will now look in
WORLDTMP by default.

sys/boot/efi/loader/Makefile
        A LIBSTAND hack is no longer required for buildenv.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-06-19 20:47:24 +00:00
Maxim Sobolev
bc3b2c5545 o Move logic that determines size of the input image into its own
file. That logic has grown quite significantly now;

o add a special handling for the snapshot images. Those have some
  extra headers at the end of the image and we don't need those
  in the output image really.

MFC after:	6 weeks
2017-06-17 02:58:31 +00:00
Konstantin Belousov
2b34e84335 Add abstime kqueue(2) timers and expand struct kevent members.
This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which
specifies that the data field contains absolute time to fire the
event.

To make this useful, data member of the struct kevent must be extended
to 64bit.  Using the opportunity, I also added ext members.  This
changes struct kevent almost to Apple struct kevent64, except I did
not changed type of ident and udata, the later would cause serious API
incompatibilities.

The type of ident was kept uintptr_t since EVFILT_AIO returns a
pointer in this field, and e.g. CHERI is sensitive to the type
(discussed with brooks, jhb).

Unlike Apple kevent64, symbol versioning allows us to claim ABI
compatibility and still name the new syscall kevent(2).  Compat shims
are provided for both host native and compat32.

Requested by:	bapt
Reviewed by:	bapt, brooks, ngie (previous version)
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D11025
2017-06-17 00:57:26 +00:00
Dimitry Andric
4198293b25 Merge ^/head r319801 through r320041. 2017-06-17 00:14:54 +00:00
Dimitry Andric
24d58133b7 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and update
build glue.
2017-06-17 00:09:34 +00:00
John Baldwin
a4110f9ffa Decode arguments to sched_* family of system calls.
This includes decoding both scheduler policy constants and the sched_param
structure for sched_get_priority_max(), sched_get_priority_min(),
sched_getparam(), sched_getscheduler(), sched_rr_get_interval(),
sched_setparam(), and sched_setscheduler().
2017-06-16 20:03:09 +00:00
Phil Shafer
264104f268 Merge libxo-0.8.2:
- xohtml: Add "-w" option to pull support files from gh_pages
- Add "upload-xohtml-files" target to publish support files in gh_pages/
- add HISTORY/AUTHORS section to man pages
- xohtml: Add div.units as standard CSS text
- Don't treat values as format strings; they are not
- add "-p" to "mkdir -p build" in setup.sh
- add test case for {U:%%} (from df.c)
- detect end-of-string in '%' and '' escaping
- make xo_simple_field, for common simple cases
- xohtml: nuke "n" in "echo" commands
- rename "format" to "fmt" for consistency; same for "str" to "value"
- update test cases

Submitted by:	phil
2017-06-16 06:29:21 +00:00
Olivier Houchard
f3360c54b1 style(9) fixes.
Reported by:	cem
2017-06-13 16:19:32 +00:00
Stephen J. Kiernan
ee27b3cd98 The variable nargv is allocated but never freed, so free it when the it
is no longer used.

Submitted by:	Thomas Rix <trix@juniper.net>
Reviewed by:	ed
Approved by:	sjg (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9652
2017-06-13 15:50:16 +00:00
Pietro Cerutti
e9dd5a0c73 Handle partial writes
Reported by:	ed
Reviewed by:	cognet
Approved by:	cognet
2017-06-13 13:26:50 +00:00
Pietro Cerutti
dadfd1ed33 Improve yes' throughput
On my system, this brings up the throughput from ~20 to ~600 MiB/s.

Inspired by: https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/

Reviewed by:	cognet
Approved by:	cognet
2017-06-13 12:35:01 +00:00
Ed Maste
e47ea033a1 hexdump: actually enter capability mode on last file
Reviewed by:	cem, Kyle Evans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10897
2017-06-13 01:05:55 +00:00
Allan Jude
2fcfba285e top: Missing man page update for r319866
MFC after:	3 days
2017-06-12 19:54:42 +00:00
Allan Jude
d9a7232865 top: Change the way the ZFS ARC compression ratio is calculated
Based on feedback from OpenZFS developers Matt Ahrens and George Wilson,
the calculation of the ratio no longer takes in to account overhead.

The old formula could result in reporting a negative compression ratio

This could confuse the user or give a false impression that there would be
an advantage to disabling the compressed ARC feature.

The new formula will more closely match an average of the on-disk
compression ratio, as reported by the ZFS property 'compressratio'

MFC after:	3 days
Sponsored by:	ScaleEngine Inc.
2017-06-12 19:51:57 +00:00
Enji Cooper
74c9a5910c Add some initial basic tests for du(1)
Tests that exercise the following flags are added in this commit:
- -A
- -H
- -I
- -g
- -h
- -k
- -m

Additional tests will be added soon.

MFC after:	1 month
2017-06-12 07:43:58 +00:00
Enji Cooper
29d65f1cb4 Add some testcases for diff --side-by-side support
These are were created proactively, in anticipation of the support being
fully implemented sometime in the future.

The tests currently fail on ^/head@r319845, however. Expect them to fail.

PR:		219933
Tested with:	gdiff
2017-06-12 05:11:43 +00:00
Enji Cooper
9bd154b8e6 du(1): trivial whitespace cleanup
MFC after:	1 month
2017-06-12 02:42:39 +00:00
Enji Cooper
64a82bcd4e Add initial tests for stat(1)
Testcases for -H, -L, and -f haven't been implemented yet, in part due
to additional complexity needed to validate the features:
* -H and -f will require an external "helper" program to display/modify
  the state/permissions for a given path.
* -L is being covered partially via the -n testcase today.

MFC after:	1 month
2017-06-12 00:21:55 +00:00
Enji Cooper
39aed6d61a stat(1): sort flags in the DESCRIPTION section
-x's description should come after -t's description.

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-11 21:23:54 +00:00
Enji Cooper
21860bf938 Write up some basic tests for readlink(1)
The tests exercise -f (f_flag), -n (n_flag), and no arguments (basic).

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-06-11 21:13:12 +00:00
Andriy Gapon
40ea8d27de fstat: catch up with r318997 and use 64 bits to store fsid
Discussed with:	kib
2017-06-10 20:38:52 +00:00
Dimitry Andric
db17bf38c5 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and update
build glue.
2017-06-10 19:17:14 +00:00
Dimitry Andric
686fb94a00 Merge ^/head r319548 through r319778. 2017-06-10 13:22:49 +00:00
John Baldwin
3cd40bc360 Decode arguments to rtprio() and rtprio_thread(). 2017-06-10 01:32:35 +00:00
John Baldwin
66ba8943a1 Decode arguments to rtprio_thread() (same as rtprio()). 2017-06-10 01:32:18 +00:00
John Baldwin
4152441f44 Decode the 'howto' argument to reboot(). 2017-06-10 01:22:40 +00:00
John Baldwin
dd0c462cf5 Decode the arguments to quotactl(). 2017-06-10 00:53:00 +00:00
John Baldwin
5ac1c7ac34 Decode the arguments to ptrace().
This does not decode structures returned by ptrace().
2017-06-10 00:45:07 +00:00
John Baldwin
ad419d3377 Decode arguments to getpriority() and setpriority(). 2017-06-10 00:37:02 +00:00
John Baldwin
9483ab16d4 Fix decoding of setpriority() arguments.
The PRIO_* 'which' value is stored in the first argument to setpriority(2),
not the last.  While here, decode the arguments to getpriority(2).
2017-06-10 00:35:45 +00:00
Gleb Smirnoff
779f106aa1 Listening sockets improvements.
o Separate fields of struct socket that belong to listening from
  fields that belong to normal dataflow, and unionize them.  This
  shrinks the structure a bit.
  - Take out selinfo's from the socket buffers into the socket. The
    first reason is to support braindamaged scenario when a socket is
    added to kevent(2) and then listen(2) is cast on it. The second
    reason is that there is future plan to make socket buffers pluggable,
    so that for a dataflow socket a socket buffer can be changed, and
    in this case we also want to keep same selinfos through the lifetime
    of a socket.
  - Remove struct struct so_accf. Since now listening stuff no longer
    affects struct socket size, just move its fields into listening part
    of the union.
  - Provide sol_upcall field and enforce that so_upcall_set() may be called
    only on a dataflow socket, which has buffers, and for listening sockets
    provide solisten_upcall_set().

o Remove ACCEPT_LOCK() global.
  - Add a mutex to socket, to be used instead of socket buffer lock to lock
    fields of struct socket that don't belong to a socket buffer.
  - Allow to acquire two socket locks, but the first one must belong to a
    listening socket.
  - Make soref()/sorele() to use atomic(9).  This allows in some situations
    to do soref() without owning socket lock.  There is place for improvement
    here, it is possible to make sorele() also to lock optionally.
  - Most protocols aren't touched by this change, except UNIX local sockets.
    See below for more information.

o Reduce copy-and-paste in kernel modules that accept connections from
  listening sockets: provide function solisten_dequeue(), and use it in
  the following modules: ctl(4), iscsi(4), ng_btsocket(4), ng_ksocket(4),
  infiniband, rpc.

o UNIX local sockets.
  - Removal of ACCEPT_LOCK() global uncovered several races in the UNIX
    local sockets.  Most races exist around spawning a new socket, when we
    are connecting to a local listening socket.  To cover them, we need to
    hold locks on both PCBs when spawning a third one.  This means holding
    them across sonewconn().  This creates a LOR between pcb locks and
    unp_list_lock.
  - To fix the new LOR, abandon the global unp_list_lock in favor of global
    unp_link_lock.  Indeed, separating these two locks didn't provide us any
    extra parralelism in the UNIX sockets.
  - Now call into uipc_attach() may happen with unp_link_lock hold if, we
    are accepting, or without unp_link_lock in case if we are just creating
    a socket.
  - Another problem in UNIX sockets is that uipc_close() basicly did nothing
    for a listening socket.  The vnode remained opened for connections.  This
    is fixed by removing vnode in uipc_close().  Maybe the right way would be
    to do it for all sockets (not only listening), simply move the vnode
    teardown from uipc_detach() to uipc_close()?

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D9770
2017-06-08 21:30:34 +00:00
Baptiste Daroussin
45c2cf11d2 Import mandoc snapshot 2017-06-08
It implements missing man(7) macros used in base by kerberos/ntp and makes them
supported by mandoc.

This import should have been done before the removal of groff.

Reported by:	gordon
2017-06-08 19:40:00 +00:00
John Baldwin
114aeee03b Decode arguments passed to msync(). 2017-06-08 08:10:57 +00:00
John Baldwin
8acc8e78ea Decode flags passed to mount(), nmount(), and unmount(). 2017-06-08 08:07:51 +00:00
John Baldwin
94bde7556c Decode arguments to mlock(), mlockall(), and munlock(). 2017-06-08 04:50:50 +00:00
John Baldwin
2d9c998859 Decode arguments to minherit(). 2017-06-08 04:45:13 +00:00
John Baldwin
26606dcaa7 Decode arguments passed to extended attribute related system calls.
The cmd argument passed to extattrctl() is not decoded as a string constant
but is just printed in hex.  The value is filesystem-specific but in
practice is only used with UFS1 filesystems.
2017-06-08 04:31:15 +00:00
John Baldwin
7ce44f08f5 Decode arguments to ACL related system calls.
This only decodes the raw arguments but not the contents of the struct acl
objects.
2017-06-08 03:51:17 +00:00
Pedro F. Giffuni
12300d3aa0 patch: if reading fails, do not go into infinite loop asking for a filename.
This can happen if no tty is available.

Obtained from:	OpenBSD (CVS rev 1.54)
MFC after:	5 days
2017-06-08 03:15:08 +00:00
Richard Gallamore
d4a698487c Add myself (ultima) as a new port committer.
Reviewed by:	matthew (mentor), lifanov (mentor)
Approved by:	matthew (mentor), lifanov (mentor)
Differential Revision:	https://reviews.freebsd.org/D11089
2017-06-08 01:42:32 +00:00
Baptiste Daroussin
8609431e84 Remove leftovers from groff removal
Reported by:	rpokala
2017-06-07 23:41:33 +00:00
Baptiste Daroussin
738919c039 Remove groff from base
All manpages in base are now compatible with mandoc(1), all roff documentation
will be relocated in the doc tree. man(1) can now use groff from the ports tree
if it needs.

Also remove checknr(1) and colcrt(1) which are only useful with groff.

Approved by:	(no objections on the mailing lists)
2017-06-07 23:00:34 +00:00
Stephen J. Kiernan
366dbfa5c0 The memory assigned to the local variable 'copy' needs to be freed.
Found using clang's static analyzer - scan-build

Submitted by:	Thomas Rix <trix@juniper.net>
Reviewed by:	ed
Approved by:	sjg (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9663
2017-06-06 21:40:35 +00:00
John Baldwin
b60a095b93 Decode arguments to dup, dup2, getdirentries, pread, and pwrite.
- dup and dup2 print fd arguments in decimal.
- pread and pwrite are similar to read and write with the addition of the
  file offset.
- getdirentries displays the output entries as a string for now and also
  prints the value returned in *basep.  Eventually the buffer for
  getdirentries should perhaps be decoded as an array of dirent
  structures.

PR:		214885
Submitted by:	Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM>
2017-06-05 05:25:50 +00:00
Colin Percival
0bf051f957 Delete obsolete paragraph; primes(6) is now able to list primes for the
full range up to 2^64 - 1.

MFC after:	1 week
2017-06-04 02:45:18 +00:00
Colin Percival
ade8bcee50 Using results from
J. Sorenson and J. Webster, Strong pseudoprimes to twelve prime
    bases, Math. Comp. 86(304):985-1003, 2017.
teach primes(6) to enumerate primes up to 2^64 - 1.  Until Sorenson
and Webster's paper, we did not know how many strong speudoprime tests
were required when testing alleged primes between 3825123056546413051
and 2^64 - 1.

Reported by:	Luiz Henrique de Figueiredo
Relnotes:	primes(6) now enumerates primes beyond 3825123056546413050,
		up to a new limit of 2^64 - 1.
MFC After:	1 week
2017-06-04 02:36:37 +00:00
Dimitry Andric
a14eb6db99 Merge ^/head r319480 through r319547. 2017-06-03 18:21:50 +00:00
John Baldwin
ee8aa41dca Decode the 'who' argument passed to getrusage().
Add a new sysdecode_getrusage_who() which decodes the RUSAGE_* constant
passed as the first argument to getrusage().  Use this function in both
kdump and truss to decode the first argument to getrusage().

PR:		215448
Submitted by:	Anton Yuzhaninov <citrin+pr@citrin.ru>
MFC after:	1 month
2017-06-03 14:22:15 +00:00
John Baldwin
ebb2cc40d1 Decode the argument passed to cap_getmode().
The returned integer value is output.
2017-06-02 22:35:18 +00:00
Stephen J. Kiernan
e2005cef7f Fix a memory leak with last
free memory allocated to 'buf'

Submitted by:	Thomas Rix <trix@juniper.net>
Reviewed by:	ed
Approved by:	sjg (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9850
2017-06-02 20:25:25 +00:00