Catch up with sb_timeo type change in r255138. This fixes
smbfs operation.

PR:		kern/182963
Submitted by:	Tomoaki AOKI <junchoon dec.sakura.ne.jp>
A series of changes tested together as a whole:
+ Add a `-D FILE" command-line option for overriding the path to the
  bsdinstall log file (BSDINSTALL_LOG env var).
+ Document new `-D FILE' in the man page for bsdinstall.
+ If FILE in `-D FILE' begins with a +, debug output goes to stdout
  (interleaved between dialog(1) invocations/output) as well as to FILE
  (minus the leading + of course).
+ If BSDINSTALL_LOG cannot be written, then debugging is disabled (except in
  the case of a leading + in the pathname, wherein debug will still be
  printed to stdout).
+ Update source code formatting style.
+ Fix a dangling participle ("Begun ..." -> "Began ...")
+ Rewrite the docsinstall script (was necessary to abate direct dependency
  on BSDINSTALL_LOG (instead, use fault-tolerant bsdconfig framework which
  displays appropriate errors for package management).
NB: docsinstall is still using pkg(8) after this change.
+ Add additional debug output for dhclient/rtsol/wpa_cliscan
+ Display script errors in a textbox rather than just on stdout
+ Update many coments.
+ Add new f_show_err() API call (like f_show_msg but changes the dialog
  title to "Error")(see bsdconfig's `common.subr').
+ Add new f_eval_catch() API call for executing a command via eval but not
  before logging the command to debug. Several example cases documented in
  API header for function in bsdconfig's `common.subr'.
+ Fix dialog auto-sizing when launched as an rvalue to a pipe for indirected
  scripts (previously would default to 24x80 sizing in this case, now it can
  autosize to full size even when in a pipe chain).
+ Fix bug in f_snprintf if $format argument began with "-"; printf would
  misinterpret as a flag. (this is in bsdcofig's `strings.subr').
+ Add accompanying f_sprintf() and f_vsprintf() to go along with already
  existing f_snprintf() and f_vsnprintf() (see bsdconfig's `strings.subr').
+ Remove some unnecessary default ZFS datasets from the automatic "zfsboot"
  script. Such as: /usr/ports/distfiles /usr/ports/packages /usr/obj /var/db
  /var/empty /var/mail and /var/run (these can all be created as-needed once
  the system is installed).
+ Remove setuid=off for /usr/home (as discussed from last round of CFT).
+ Fix some i18n string violations in "zfsboot".
+ Bolster debugging output in "zfsboot".
+ Fix some string quoting issues in "zfsboot".
+ Fix some variable scope issues in "zfsboot".
+ Change "Create" to "Install" in "zfsboot" main menu.
+ Increase error checking in "zfsboot" (type-check arguments and such).
+ Add call to "graid destroy" killing automatic metadata (part of the series
  of pedantic destructions we do when bootstrapping a new/naked disk).
+ Make judicious use of new f_eval_catch() in "zfsboot".
+ Fixup some variable names for consistency (zfsboot).
+ Fix an underride syntax parameter expansion folly (zfsboot).
+ Confirm layout if not explicitly chosen when blindly proceeding (no
  longer have to touch anything on the ZFS menu if it scares you, just
  choose the omnibus "Install" option at the top and you'll be prompted to
  select vdev type and disks in the layout confirmation dialog).
+ Change numbered menu items to alphabetic for more efficient navigation.
+ Consolidate vdev selection and disk selection into a single stateful
  menu which performs validation and allows backing out to each previous
  menu as you go deeper.
+ Redesign the ``Last Chance'' dialog (still using the same colors, but
  make it conform to a tolerable width and make disks appear in a block-
  quote style indented region).
+ Fix a bug wherein we used the a lowercase variable name by accident
  (actual variable name declared as all-uppercase) at the time of
  initializing fstab(5) (not believed to cause any issues though).
+ Update the geli setup infobox for each provider being initialized
  (not just at the onset -- since each ``geli init'' causes kernel messages
  to push our infobox off-screen).

Reviewed by:	Allan Jude <freebsd@allanjude.com>
Discussed on:	-current
MFC after:	3 days
Semi-revert this one file out of r257842. The ttys(5) stuff, as we
discussed on -current, was not supposed to go in but get solved in
a different way -- e.g., init(8) logic).

Discussed on:   -current
Copy the install log to the deployed /var/log directory so that we have
post-mortem data on how the machine was configured/installed.
I often forget that debugFile can begin with a + for deciding that debug
should be sent to both the file (minus the leading +) and stdout.
Make TCP_KEEP* socket options readable. At least PostgreSQL wants
to read the values.

Reported by:	sobomax
Update aacraid to version 3.2.5.

Full MSI-X interrupt support added.
Timeout and reset handling reworked, firmware flash update test added.
Support for drives with 4KB block size added.
Changes made to avoid exposure of phys. array components by default.

Approved by:	scottl (mentor), emaste (co-mentor)
Fix buildworld when WITH_TESTS is enabled.

The addition of the TESTS knob and its enabling of the build of tests in
lib/libcrypt/tests/ broke the build.  The reason is that we cannot descend
into tests/ subdirectories until all prerequisites have been built, which
in the case of tests may be "a lot of things" (libatf-c in this case).

Ensure that we do not walk tests/ directories during the bootstrapping of
the libraries as part of buildworld.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
Add libatf-c++ to the prebuild libs.

Some tests may require C++ so we must ensure this library exists as part
of the bootstrap process or else they will fail to build.  Do this by
just depending on lib/atf as part of the bootstrap libraries instead of
using lib/atf/libatf-c.

Submitted by:	Garrett Cooper <yaneurabeya at gmail dot com>
Approved by:	rpaulo (mentor)
Subsume the functionality of MK_ATF into MK_TESTS.

There is no reason to keep the two knobs separate: if tests are
enabled, the ATF libraries are required; and if tests are disabled,
the ATF libraries are not necessary.  Keeping the two just serves
to complicate the build.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
Handle the removal of the test suite when WITHOUT_TESTS=yes.

Add all files from /usr/tests to the obsoleted files list when the
build of the tests is disabled via the WITHOUT_TESTS knob.  Do this
automatically so that we do not have to suffer the pain of maintaining
such list by hand.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
Install category Kyuafiles from their category directories.

Move the installation of /usr/tests/lib/Kyuafile from src/tests/lib/
to src/lib/.  This is to keep the src/tests/ hierarchy unaware of the
rest of the tree, which makes things clearer in general.  In particular:

1) Everything related to the construction of /usr/tests/lib/ is kept
   in src/lib/.  There is no need to think about different directories
   and how they relate to each other.  (The same applies for libexec,
   usr.bin, etc. but these are not yet handled.)

2) src/tests becomes the place to keep cross-functional test programs
   and nothing else, which also helps in simplifying things.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
Build and install the atf tests.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE.  In other
words, every architecture is now auto-sizing the kmem arena.  This revision
changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes
mandatory and the definition of VM_KMEM_SIZE becomes optional.

Replace or eliminate all existing definitions of VM_KMEM_SIZE.  With
auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling
for VM_KMEM_SIZE_MIN on most architectures.  Use VM_KMEM_SIZE_MIN for
clarity.

Change kmeminit() so that the effect of defining VM_KMEM_SIZE is similar to
that of setting the tunable vm.kmem_size.  Whereas the macros
VM_KMEM_SIZE_{MAX,MIN,SCALE} have had the same effect as the tunables
vm.kmem_size_{max,min,scale}, the effects of VM_KMEM_SIZE and vm.kmem_size
have been distinct.  In particular, whereas VM_KMEM_SIZE was overridden by
VM_KMEM_SIZE_{MAX,MIN,SCALE} and vm.kmem_size_{max,min,scale}, vm.kmem_size
was not.  Remedy this inconsistency.  Now, VM_KMEM_SIZE can be used to set
the size of the kmem arena at compile-time without that value being
overridden by auto-sizing.

Update the nearby comments to reflect the kmem submap being replaced by the
kmem arena.  Stop duplicating the auto-sizing formula in every machine-
dependent vmparam.h and place it in kmeminit() where auto-sizing takes
place.

Reviewed by:	kib (an earlier version)
Sponsored by:	EMC / Isilon Storage Division
Remove 'inline' from ar9300_init_pll(), it's too big to inline.

Submitted by:	adrian@
Add bits for the AMD features from CPUID function 0x80000001 ECX,
described in the rev. 3.0 of the Kabini BKDG, document 48751.pdf.

Partially based on the patch submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Eliminate an unused macro.
Fix signal delivery for the iBCS2 binaries.  The iBCS2 sysvec uses
current FreeBSD signal trampoline, but does not specifies
sv_sigcode_base, since shared page is not mapped.  This results in the
zero %eip for the signal frame.  Fall back to calculating %eip as
offset from the psstrings when sv_sigcode_base is not initialized.

Reported by:	Rich Naill <rich@enterprisesystems.net>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Fix typo in include guard, found by clang 3.4.

MFC after:	3 days
Initialize variable in sys/x86/iommu/busdma_dmar.c, to avoid possible
uninitialized use.

Reviewed by:	kib