Commit Graph

13542 Commits

Author SHA1 Message Date
kevans
f95c99edc6 od(1): Fix mis-patch from r328188
od_test.sh got duplicated erroneously when it was added in r328188. Dedup.
2018-01-20 03:50:56 +00:00
kevans
8480e27855 od(1): Fix wrong output for some corner cases in multibyte locales.
Restore the original character to print if we used the look-ahead
buffer, but that didn't help -- we either got an illegal sequence
or still can't complete.

PR:		224552
Submitted by:	Yuri Pankov
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13963
2018-01-20 02:49:32 +00:00
kevans
748a3d44a1 dtc(1): Update to upstream ea3c233
Highlights of this update:
- /__local_fixups__ is now generated to be GPL dtc and libfdt compliant
- Compiling with -@ will now cause dtc to assign phandles to all labelled
  nodes
- /include/ and /incbin/ now handle absolute paths correctly
- The manpage now has information about overlays, including how to apply
  them and how to generate them
- Syntactic sugar for overlays is now supported, allowing an overlay DTS
  like:

=
/dts-v1/;
/plugin/;

&foo {
    foo,status = "okay";
};
=

to generate a fragment targetting <&foo>.
2018-01-19 21:20:24 +00:00
jhb
286c310205 Update various statements in vmstat(8) to match reality.
- The process stats are actually thread counts rather than process
  counts.
- Simplify various descriptions to remove mention of stats that are
  updated every 5 seconds (all VM related stats are now "instant",
  only the load average is updated every 5 seconds).
- Don't make any mention of special treatment for processes that have
  been active in the last 20 seconds.  We don't track that stat.
- Rework the description of active virtual memory.  Call it mapped
  virtual memory and explicitly point out it is not the same as the
  active page queue (which corresponds to "Active" in top(1)), and
  also hint at the possible bogusness of the value (e.g. if a process
  maps a single page out of a multiple GB file, the entire file's size
  is considered mapped).
- Simplify a few descriptions that implied their output was a value
  per interval.  All of the "rate" values are per-second rates scaled
  across the interval.
- Update a few comments for 'struct vmtotal' along similar lines.

Reported by:	mwlucas (indirectly)
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13905
2018-01-18 19:43:02 +00:00
tuexen
73677d4c35 Add missing assignment to make sure non-first cmsgs are handled as such. 2018-01-17 10:30:49 +00:00
arichardson
b14a698c09 Allow xinstall and makefs to be crossbuilt on Linux and Mac
I need these tools in order to install the crossbuilt FreeBSD and create a
disk image. Linux does not have a st_flags in struct stat so unfortunately
I need a bunch of ugly ifdefs. The resulting binaries allow me to
sucessfully install a MIPS64 world and create a disk-image that boots.

Reviewed By:	brooks, bdrewery, emaste
Approved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D13307
2018-01-16 21:43:46 +00:00
tuexen
aefeae56df Improve the printing of cmgs when the length is 0. Fix error handling. 2018-01-16 20:02:07 +00:00
tuexen
4df44feae4 Using %p already prints "0x", so don't do it explicitly. 2018-01-16 19:57:30 +00:00
jhb
c3405f6ff4 Rename 'recv' to 'receive' to appease shadow warnings from GCC. 2018-01-16 01:21:07 +00:00
tuexen
ee7f061b88 Keep list sorted. Thanks to jhb@ to pointing out that I put it at the
wrong place in r327919.
2018-01-15 23:17:12 +00:00
tuexen
3c9ef68521 Decode msghdr argument of sendmsg() and recvmsg().
Sponsored by:		Netflix, Inc.
2018-01-15 20:39:42 +00:00
eadler
12b4267ad9 units(1): units(1) free savescr in error condition too
CID:		978392
Reviewed by:	des
MFC After:	1 week
2018-01-15 17:27:43 +00:00
tuexen
4b456d8fb0 Improve support for sctp_generic_recvmsg() and sctp_generic_sendmsg()
and add support for sctp_generic_sendmsg_iov().

Handle the struct iovec argument and the struct sctp_sndrcvinfo
arguments.
2018-01-14 14:33:22 +00:00
tuexen
445752d5e4 Mark the iovec parameters of writev() and readv() as IN and OUT.
This makes truss work on readv() as expected.
2018-01-14 09:51:25 +00:00
dim
7dcc49151a Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
6.0.0 (branches/release_60 r321788).  Upstream has branched for the
6.0.0 release, which should be in about 6 weeks.  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:	3 months
2018-01-14 00:08:34 +00:00
eadler
2fbd0010bc limits(1): also bump .Dd...
PR:		225147
MFC After:	1 week
2018-01-13 21:37:14 +00:00
eadler
4af255a20c limits(1): fix grammar
Submitted by:	yuri
PR:		225147
MFC After:	1 week
2018-01-13 21:36:39 +00:00
dim
d91380862c Merge ^/head r327886 through r327930. 2018-01-13 17:52:55 +00:00
tuexen
9dae44108c Fix a typo introduced in r327919. 2018-01-13 14:10:45 +00:00
tuexen
32d05bc76d Add support for readv() and writev() to truss.
Sponsored by:	Netflix, Inc.
2018-01-13 13:59:35 +00:00
dim
5473ed2089 Build llvm-extract with -lz, and add a few objects to liblldb, both of
which turn out to be needed when you don't use -ffunction-sections.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
2018-01-13 13:53:05 +00:00
jeff
94c7af8ca2 Implement 'domainset', a cpuset based NUMA policy mechanism. This allows
userspace to control NUMA policy administratively and programmatically.

Implement domainset based iterators in the page layer.

Remove the now legacy numa_* syscalls.

Cleanup some header polution created by having seq.h in proc.h.

Reviewed by:	markj, kib
Discussed with:	alc
Tested by:	pho
Sponsored by:	Netflix, Dell/EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D13403
2018-01-12 22:48:23 +00:00
dim
b64d96a23d Merge ^/head r327624 through r327885. 2018-01-12 18:23:35 +00:00
kevans
e6e1cef5d6 vmstat(8): Hook up NetBSD tests
The NetBSD tests for vmstat are basically just a smoke test, ensuring that
executing `vmstat` and `vmstat -s` exit successfully. This is more than we
test now, so go with it.
2018-01-11 16:04:04 +00:00
kevans
0b87c9f682 patch(1): Don't check for NUL bytes in Plan A
Plan A mmap()'s the entire input file and operates on it in memory. The
map(2) call succeeded, so we shouldn't need to bother checking for the NUL
byte as long as we're within our buffer space.

This was clearly intentional to match "the behavior of the original code",
but it creates a discrepancy between Plan A and Plan B that doesn't seem
sensible and it's not inherently wrong to allow a NUL byte.

This change was motivated by the gemspec in net/rubygem-grpc failing to
patch, despite the patch being generated with diff, because a NUL byte was
used as a delimiter in the header briefly in an otherwise text file.

An alternative was considered: to fallback to plan B if plan A won't process
the entire file due to a NUL byte, but I deemed this to be the better option
since plan A isn't failing due to memory limitations and will fail later on
if it's really dealing with a file it shouldn't be.

PR:		224842 (exp-run)
Reported by:	swills
Reviewed by:	emaste, pfg
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13738
2018-01-11 15:01:48 +00:00
kevans
394dafce16 awk(1): Add necessary bits for connecting tests, but leave disconnected
The NetBSD test suite has 24 tests for awk, and we pass exactly 4 of them.
Add the necessary pieces for interested parties to easily connect the
tests and run them, but leave them disconnected for the time being.

Some of these tests outright segfault in our awk, others just exhibit the
wrong behavior.
2018-01-11 05:36:13 +00:00
emaste
124746b920 lld: introduce basic man page
Upstream lld has no man page. Introduce a basic one for FreeBSD based on
ld.lld --help, with a brief introduction and additional detail for some
options.

We'll continue refining this in FreeBSD, and then submit it upstream once
the first round of edits are complete.

Submitted by:	krion, Arshan Khanifar, emaste, bjk
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13813
2018-01-10 16:01:25 +00:00
dim
6a38aa2ea6 Merge ^/head r327341 through r327623. 2018-01-06 16:13:17 +00:00
eadler
008145ac99 morse(6): update documentation
- bump Dd
- use 'r' instead of 'D' from the original submission
2018-01-06 15:52:28 +00:00
lwhsu
0a7ff7d651 Unbreak build after r327614
Approved by:	mjg (on IRC)
Differential Revision:	https://reviews.freebsd.org/D13782
2018-01-06 09:48:04 +00:00
eadler
b25f1d3db6 morse(6): minor nits
- Use copyright comment header
- Make it easier to compile on !FreeBSD
- Diff reduction against DragonFlyBSD
2018-01-06 07:48:17 +00:00
eadler
1ffe779759 morse(6): implement support for decoding morse code
- Use `-r` for "reverse" mode and to match DragonFlyBSD.
- Move defines around to clear up logic
- use `errx` instead of `fprintf` and `exit`

PR:		35109
Submitted By:	philipp.mergenthaler@stud.uni-karlsruhe.de
Submitted on:	2002-02-19
Reviewed by:	kevans
2018-01-06 07:02:24 +00:00
eadler
cb0262a41a units(1): add missing ':' for two short arguments
PR:		209850
MFC After:	3 days
2018-01-05 07:24:43 +00:00
kevans
7cd5ae4925 hexdump(1): Speed up -s flag on devices
Using the -s flag on devices is extraordinarily slow due to using fseek(3) a
little too conservatively. Address this by using fseek on character/block
devices as well, falling back to getchar(3) only if we fail to seek or we're
operating on tape drives, where fseek may succeed while not actually being
supported.

PR:		86485
Submitted by:	arundel (originally; modified since then)
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10939
2018-01-05 01:46:41 +00:00
jilles
4b692c9e1c find: Speed up tests by using touch -d instead of sleep for timestamps
I have verified that the tests still detect the absence of the r327362 fix.
2018-01-04 22:59:24 +00:00
eadler
072a7e0473 morse(6): fix two typod 2018-01-03 17:04:13 +00:00
eadler
b3743a1bd2 morse(6): add a few missing characters
- add ñ, ', and _
- remove lint support
- add missing header for ioctl
2018-01-03 09:08:32 +00:00
oshogbo
dc341d4bc0 NLS data and tz can be cached using caspicum helpers.
Using them we simplifies and unifies sandboxed code.
2018-01-03 07:43:04 +00:00
jilles
7a56c3a9eb find: Link tests to the build 2017-12-31 19:24:13 +00:00
eadler
7d11c67384 man(1): document exit code
man(1) uses standard exit codes, document that.

PR:		223517
Reported by:	wosch
MFC after:	1 week
2017-12-31 00:35:11 +00:00
cem
755675ffee find(1): Fix -newer and -samefile to conform to POSIX[0]
By default, or with the -P flag, find(1) should evaluate paths "physically."
For symlinks, this means using the link itself instead of the target.

Historically (since the import of BSD 4.4-lite from CSRG), find(1) has
failed to refer to the link itself, at least for -newer and -samefile.

[0]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

PR:		222698
Reported by:	Harald Schmalzbauer <bugzilla.freebsd AT omnilan.de>
Sponsored by:	Dell EMC Isilon
2017-12-29 22:08:43 +00:00
dim
49c7ad4b12 Merge ^/head r327169 through r327340. 2017-12-29 12:51:26 +00:00
imp
6d2592d1c1 Free mp on a couple of error paths.
CID: 978387
2017-12-28 05:34:34 +00:00
imp
f849591ba8 Close the fp rather than the fd since we fdopen the fd so we don't
leak the FILE *.

CID: 978383
2017-12-28 05:34:29 +00:00
imp
2fdc0e9691 Close cpfrom in an error case.
CID: 271771
2017-12-28 05:33:49 +00:00
imp
967d3df824 Free data after we're done with it.
CID: 271595, 275337, 1368743
2017-12-28 05:33:44 +00:00
imp
e48f2e83a8 Free inb on error return.
CID: 270099
2017-12-28 05:33:39 +00:00
imp
5f0ec9196a Free some variables before they go out of scope.
CID: 92074, 270099
2017-12-28 05:33:34 +00:00
imp
c447f95dc1 Plug two resource leaks.
CID: 92077, 92074
2017-12-28 05:33:29 +00:00
delphij
32a7549145 Replace send-mail with the more standarized sendmail, we do not create
links for send-mail in mailwrapper so it did not work anyway.

MFC after:	2 weeks
2017-12-27 06:23:50 +00:00