Revert r257715.  This breaks the case where devd isn't running.  The
real solution to this is still being discussed and probably won't look
quite like this.
Add an -s option that specifies a path to an alternate etcupdate.sh script
to test.  This allows a non-installed version of the script to be tested
more easily.
Sort option flags and fix the width of the options list.  This is a purely
mechanical change, no content changes.
Bring in libnv library for managing name/value pairs. The following types
are currently supported:

- NV_TYPE_NULL - only name, no data;
- NV_TYPE_BOOL - boolean (true or false);
- NV_TYPE_NUMBER - 64bit unsigned integer;
- NV_TYPE_STRING - C string;
- NV_TYPE_NVLIST - nested nvlist;
- NV_TYPE_DESCRIPTOR - file descriptor;
- NV_TYPE_BINARY - binary data.

For detailed documentation and examples see nv(3) manual page.

Sponsored by:	The FreeBSD Foundation
Add a pre-world mode of updating similar to the -p option that can be
passed to mergemaster.  In this mode, only changes to /etc/master.passwd
and /etc/group are merged to /etc.  In addition, it uses a temporary
tree to stage these changes rather than overwriting the existing
'current' and 'previous' trees so that a full update can be run after
a normal installworld has completed.

MFC after:	2 weeks
Add VM_LAST, a special last element in enum VM_GUEST and use it in CTASSERT
to ensure that vm_guest range is covered by vm_guest_sysctl_names.

Suggested by:	mjg
Regression tests for the libnv library.

Sponsored by:	The FreeBSD Foundation
Check for special status code from FIRMWARE_ACTIVATE command
signifying that a reboot is required to complete activation
of the requested firmware image.

Reported by:	Joe Golio <joseph.golio@emc.com>
Sponsored by:	Intel
MFC after:	3 days
More code eyeballing and fixup:

* Use sbuf_*(9) for printing interesting stuff from sysctls. Much neater, and gets rid of static buffers.

* Use a bitmask to decide which sources to harvest instead of checking inside a structure. Much more general.

* Tidy up the usual comments, constants and variable names.

* Fix module building on amd64.
Move the ioapic device model from userspace into vmm.ko. This is needed for
upcoming in-kernel device emulations like the HPET.

The ioctls VM_IOAPIC_ASSERT_IRQ and VM_IOAPIC_DEASSERT_IRQ are used to
manipulate the ioapic pin state.

Discussed with:	grehan@
Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
This fixes 3 problems in syslogd related to sizing receive buffers...

- A call was misplaced at the wrong level of nested if blocks, so that
  the buffers for unix domain sockets (/dev/log, /dev/klog) were never
  increased at all; they remained at a way-too-small default size of 4096.

- The function that was supposed to double the size of the buffer
  sometimes did nothing, and sometimes installed a wildly-wrong buffer
  size (either too large or too small) due to an unitialized 'slen'
  variable passed to getsockopt().  Most often it doubled the UDP buffers
  from 40k to 80k because accidentally there would be harmless stack
  garbage in the unitialized variables.

- The whole concept of blindly doubling a socket's buffer size without
  knowing what size it started at is a design flaw that has to be called a
  bug.  If the double_rbuf() function had worked at all (I.E., if the
  other two bugs didn't exist) this would lead to UDP sockets having an
  80k buffer while unix dgram sockets get an 8k buffer.  There's nothing
  about the problem being solved that requires larger buffers for UDP than
  for unix dgram sockets -- the buffering requirements are the same
  regardless of socket type.

This change renames the double_rbuf() function to increase_rbuf() and
increases the buffer size on all types of sockets to 80k.  80k was
chosen only because it appears to be the size the original change was
shooting for, and it certainly seems to be reasonably large (I might
have picked 64k in the absence of any historical guidance).

PR:		160433
Submitted by:	me, in 2011.
Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially
transient and shouldn't result in closing the socket and giving up forever.
Increase the stack size for ppc64 from 4 pages to 8.

I found a stack overflow when a coredump was taken onto a ZFS volume with
heavy network activity.  2 DSI traps, plus one DECR trap, along with several
function calls in the stack, overflowed the 4 pages.  8 page stack fixes this.

Discussed with: nwhitehorn
MFC after:	1 week
Fix typo.

Submitted by:	loos
Add support for multiple instances of ftp-proxy
and pflog devices.

PR:	conf/158171
Submitted by:	Thomas Johnson <tom@claimlynx.com>
gcc: Backport fixes for -W parentheses in C++

This fixes GCC 19564:
  http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00868.html
  http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01772.html
  http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00545.html

The patch and its fixes are used by Google in their enhanced gcc-4.2.1
port and predates the license switch in GCC so they are still under
GPLv2.

MFC after:	3 weeks
- Use bit twiddling macro to set IEEE80211_MODE_11A
- On the RT3572 chipset, there's no need to configure BBP register 86
Remove a couple of unused macros.
Somewhat mimic how the devel/subversion port prepopulates
'Sponsored by:' in the FreeBSD commit template.

Support for this has already existed ^/head/contrib/subversion
but it was not enabled in usr.bin/svn/svn/Makefile.

To use the pre-populated 'Sponsored by:' entry, set ORGANIZATION
in make.conf(5), for example:

    ORGANIZATION=   "The FreeBSD Foundation"

Reviewed by:	peter
Sponsored by:	The FreeBSD Foundation
Correctly initialise the 2-chain antenna mask in the link quality table.

The previous code simply hard-coded IWN_ANT_AB which is only correct for
some of the NICs.

Now, if the NIC is a 1-stream TX, you need to set IWN_ANT_AB and _not_
just a single antenna.  The Intel 5100 firmware panics the moment the
link quality table is updated.

So!

* no secondary antenna? Set it to IWN_ANT_AB;
* two-stream device? Transmit on the full transmit antenna configuration.

Tested:

* Intel 5100, STA
* Intel 2200 (eadler)

Obtained from:	Linux iwlwifi