MFC r208811:

Don't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t).

Found with:	Coverity Prevent
CID:		7466, 7467
Approved by:	re (kib)
iMFC r208484: Fix back references in substitute command for pax(1)

pax(1) was trying to copy the back-referenced data from
the match pattern, not the matched data.

Approved by:	re (kib)
MFC r205940:

Remove unused files.

PR:		bin/38256
Approved by:	re (kib)
MFC 199549, 199997, 204158, 207673, and 208901.

Bring in a number of netfront changes:

r199549 | jhb

  Remove commented out reference to if_watchdog and an assignment of zero to
  if_timer.

  Reviewed by:	scottl

r199997 | gibbs

  Add media ioctl support and link notifications so that devd will attempt
  to run dhclient on a netfront (xn) device that is setup for DHCP in
  /etc/rc.conf.

  PR:		kern/136251 (fixed differently than the submitted patch)

r204158 | kmacy

  - make printf conditional
  - fix witness warnings by making configuration lock a mutex

r207673 | joel

  Switch to our preferred 2-clause BSD license.

  Approved by:	kmacy

r208901 | ken

  A number of netfront fixes and stability improvements:

   - Re-enable TSO.  This was broken previously due to CSUM_TSO clearing the
     CSUM_TCP flag, so our checksum flags were incorrectly set going to the
     netback driver.  That was fixed in r206844 in tcp_output.c, so we can
     turn TSO back on here.

   - Fix the way transmit slots are calculated, so that we can't overfill
     the ring.

   - Avoid sending packets with more fragments/segments than netback can
     handle.  The Linux netback code can only handle packets of
     MAX_SKB_FRAGS, which turns out to be 18 on machines with 4K pages.  We
     can easily generate packets with 32 or so fragments with TSO turned on.
     Right now the solution is just to drop the packets (since netback
     doesn't seem to handle it gracefully), but we should come up with a way
     to allow a driver to tell the TCP stack the maximum number of fragments
     it can handle in a single packet.

   - Fix the way the consumer is tracked in the receive path.  It could get
     out of sync fairly easily.

   - Use standard Xen ring macros to make it clearer how netfront is using
     the rings.

   - Get rid of Linux-ish negative errno return values.

   - Added more documentation to the driver.

   - Refactored code to make it easier to read.

   - Some other minor fixes.

  Reviewed by:	gibbs
  Sponsored by:	Spectra Logic

Approved by:	re (bz)
MFC 209029

 3 Fixes -
 a) There was a case where a ICMP message could cause
    us to return leaving a stuck lock on an stcb.
 b) The iterator needed some tweaks to fix its lock
    ordering.
 c) The ITERATOR_LOCK is no longer needed in the freeing
    of a stcb. Now that the timer based one is gone we don't
    have a multiple resume situation. Add to that that there
    was somewhere a path out of the freeing of an assoc that
    did NOT release the iterator_lock.. it was time to clean
    this old code up and in the process fix the lock bug.

Approved by: re (bz)
MFC: r208746

Don't leak memory on destruction.

Reviewed by:	marcel
Approved by:	re (kib)
MFC: r208776

Avoid possible NULL-dereferences.

Found with:	Coverity Prevent(tm)
CID:		3428
Approved by:	re (kib)
MFC: r208777

- In gpart_bootfile_read() fix an off-by-one error preventing the bootstrap
  file to be of maximum size.
- Add special handling required for SMI/VTOC8 disklabel partcode, i.e. avoid
  overwriting the label when writing the bootstrap code to the partition
  starting at 0 and install it to all partitions when the -i option is omitted
  just like geom_sunlabel(4) and sunlabel(8) do by default.
- Add missing prototypes.
- Add const where applicable.

Reviewed by:	marcel
Approved by:	re (kib)
Revert part of r209077 which shouldn't have been MFC'ed, yet.
This is a direct commit to stable/8.

Approved by:	re (kib)
MFC: r208778

- Mention that VTOC8 labels are found in Fujitsu SPARC64 machines as well.
- Add information regarding VTOC8 bootrstrap code and how it's handled with
  r208777 in place.
- Document the mapping of partition types to VTOC8 tags.
- Add examples for VTOC8 to the respective section.
- Eliminated hard sentence breaks.

Reviewed by:	marcel (slightly buggy version)
Approved by:	re (bz)
MFC r208795; additional date -v detail

PR:		147354
Approved by:	re (kib)
MFC r209078:

Detect bit endianness through machine/endian.h.
This fixes xz on big-endian systems.

Tested on:	sparc64 (kindly provided by linimon), amd64
Approved by:	re (kensmith)
MFC r208888,208889,209017:

 - make sure that initialize isb with fstat() on
   input file before using it. (bin/147275)
 - Fix grammar for st_nlink.
 - Style changes.

PR:		bin/147275
Approved by:	re (kensmith)
Adjust the cvs branch for 'make update'.

Approved by:	re (implicit)
Adjust cvs branch tag.

Approved by:	re (implicit)
Adjust __FreeBSD_version to reflect this is the 8.1 release branch.

Approved by:	re (implicit)
Ready for 8.1-RC1.

Approved by:	re (implicit)
MFC: r209138

Update a branch missed in r207537 (committed to stable/8 in r207890).

Approved by:	re (kib)
MFC r209273:
  Fix uninitialized variables that cause a crash when the network is
  initialized and sysinstall is not running as init.

Submitted by:	Nick Mills
Approved by:	cperciva (mentor)
Approved by:	re (kensmith)
MFC r209265:

r209260:

Backout r207970 for now, it can lead to deadlocks.

Reported by:	kan

r209261:

Turn off UMA allocations on all archs by default. It isn't stable even
on amd64.

Reported by:	many

Approved by:	re (kib)