Commit Graph

13197 Commits

Author SHA1 Message Date
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