FreeBSD/src 3431172 (r359032)usr.bin/units units.1

Tell the world how to convert gigabytes to bytes with units(1) easily

It turns out that units(1) is not as horrible to use in scripts
as I initially thought. When the --terse flag is combined
with an appropriate output format (set via --output-format),
units(1) is actually capable of producing very nice results.
For example:

    units -o %0.f -t '4 gigabytes' bytes

is is just going to print out the expected value of 4294967296.

There is no time to waste. People have to know about it.

I am adding an example for this at the top of the examples section
because this is what users are most likely looking for.

Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D24096
DeltaFile
+18-5usr.bin/units/units.1
+18-51 files

UnifiedSplitRaw

FreeBSD/src e6de40f (r343117)usr.bin/cmp cmp.c

Fix handling of rights on stdio streams.

- Limit rights on stdio before opening input files.  Otherwise, open()
  may return one of the standard descriptors and we end up limiting
  rights such that we cannot read from one of the input files.
- Use caph_limit_stdio(), which suppresses EBADF, to ensure that
  we don't emit an error if one of the stdio streams is closed.
- Don't bother further limiting rights on stdin when stdin isn't going
  to be used.  Doing so correctly requires checking for a number of
  edge cases, and it doesn't provide any significant benefit.

PR:             234885
Reviewed by:    oshogbo
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D18860
DeltaFile
+7-16usr.bin/cmp/cmp.c
+7-161 files

UnifiedSplitRaw