units(1): don't compare pointers with 0

For better readability, don't compare pointers with 0 or assign 0
to them. Use NULL instead.

Inspired by:	DragonflyBSD
Fix double fclose() in an error case.

CID:		1006120
Found with:	Coverity Prevent(tm)
MFC after:	1 week
mergemaster: Avoid "/var/tmp/temproot disappeared" if there is nothing to
compare.

Because of the change to find in SVN r253886, the entire temproot would be
deleted if it became empty, leading to a confusing message "*** FATAL ERROR:
The temproot directory ${TEMPROOT} has disappeared!"

Note that mergemaster does not do anything useful in this situation anyway
(e.g. put IGNORE_FILES="/etc/group /etc/master.passwd" in
/etc/mergemaster.rc and run mergemaster -p).

As noted in that commit, add -mindepth 1.

PR:		bin/188485
Submitted by:	David Boyd
MFC after:	1 week
Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers
to unwind around the calls from PLT to binder.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Re-indent break statement.

MFC after:	1 week
Update the ath(4) manpage with .. well, updated information.

MFC after:	3 days
Use the correct format specifiers for wide characters and strings of wide
characters.

MFC after:	1 week
Replace a few Solarisisms with their corresponding FreeBSDisms to make a few
printf tests pass.
When merging docsinstall and zfsboot updates to stable/9 it was discovered
that the slightly older dialog(1) requires --separate-output when using the
--checklist widget to force response to produce unquoted values (whereas in
stable/10 --checklist widget without --separate-output will only quote the
checklist labels in the response if the label is multi-word (contains any
whitespace).

Since these enhancements (see revisions 263956 and 264437) were developed
originally on 10, the --separate-output option was omitted. When merged to
stable/9, we (Allan Jude) and I found during testing that the "always-
quoting" of the response was causing things like struct interpolation to
fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for
example -- literal quotes inherited from dialog(1) --checklist response).

To see the behavior, execute the following on stable/9 versus stable/10:

        dialog --checklist disks: 0 0 0 da0 "" off da1 "" off

Check both items and hit enter. On stable/10, the response is:

        da0 da1

On stable/9 the response is:

        "da0" "da1"

If you use the --separate-output option, the response is the same for both:

        da0
        da1

So applying --separate-output on every platform until either one of two
things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or
2) we drop support for stable/9.

MFC after:      3 days
Reviewed by:    Allan Jude
Add a missing break in option parsing.

CID:		1011452
Found with:	Coverity Prevent(tm)
MFC after:	1 week
Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure.
When server doesn't support this request, try to use SMB_INFO_ALLOCATION.
And use SMB_COM_QUERY_INFORMATION_DISK request as fallback.

MFC after:	2 weeks
Fix build for non-INET that was broken by r264469.

MFC after:	2 weeks
Make g_access() KASSERT() more useful.

Sponsored by:	EMC / Isilon Storage Division
Obtained from:	Isilon OneFS
MFC after:	2 weeks
Stop treating LUN 0 as mandatory.  There is no reason to do that.

Suggested by:	mav@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Add support for emulating the byte move and sign extend instructions:
"movsx r/m8, r32" and "movsx r/m8, r64".

Approved by:	grehan (co-mentor)
Make sure not to do I/O for more than MAXPHYS bytes. Doing so can cause
problems in our providers, such as a KASSERT in md(4). We can initiate
I/O for more than MAXPHYS bytes if we've been given a BIO for MAXPHYS
bytes, the blocks from which we're reading couldn't be compressed and
we had compression in preceeding blocks resulting in misalignment of
the blocks we're trying to read relative to the sector. We're forced to
round up the I/O length to make it an multiple of the sector size.

When we detect the condition, we'll reduce the block count and perform
a "short" read. In g_uzip_done() we need to consider the original I/O
length and stop early if we're about to deflate a block that we didn't
read. By using bio_completed in the cloned BIO and not bio_length to
check for this, we automatically and gracefully handle short reads that
our providers may be doing on top of the short reads we may initiate
ourselves.

Obtained from:	Juniper Networks, Inc.
Mention Capsicum.

MFC after:	1 week
Correct sorting.
Local APIC access via 32-bit naturally-aligned loads is merely
suggested in the SDM.  Since some OSes have implemented otherwise
don't be too rigorous in enforcing it.

Approved by:	grehan (co-mentor)
Correct a typo in a device description added in r264257.