filedesc: drop retval argument from do_dup

It was almost always td_retval anyway.

For the one case where it is not, preserve the old value across the call.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Build ttm_agp_backend.c.

Reported by:	dumbbell
MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273902 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix typo.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273903 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use in_localip() instead of handmade implementation.

MFC after:	1 week
Sponsored by:	Yandex LLC


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273904 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Print human-readable error for "route not found" case.

Submitted by:	vsevolod (initial version)
MFC after:	2 weeks
Sponsored by:	Yandex LLC


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273906 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add /etc/rc.d/initrandom, which was removed in r273872.

Noticed by:	ache@


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273907 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix usage of kern_getenv().


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273908 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove the check for packets with broadcast source from if_gif's encapcheck.

The check was recommened in the draft-ietf-ngtrans-mech-05.txt. But it isn't
clear, should it compare the source with all direct broadcast addresses in the
system or not.
RFC 4213 says it is enough to verify that the source address is the address
of the encapsulator, as configured on the decapsulator. And this verification
can be extended by administrator with any other forms of IPv4 ingress filtering.

Discussed with:	glebius, melifaro
Sponsored by:	Yandex LLC


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273909 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use macro ERROUT() to make code more laconic and follow style of other
netgraph code.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov gmail.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273910 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).  This makes the functions type-compatible
with volatile objects and does not require devolatile force, e.g. in
kern_umtx.c.

Requested by:	bde
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273911 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Clean up the types of a few strings to make them const when they are never
written to.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273913 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The command name is a constant, use the correct type.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273914 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the gpiobus locking by using a more sane model where it isn't necessary
hold the gpiobus lock between the gpio calls.

gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus
what to do when the bus is already busy.

When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep
until the bus became free.

With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right
away and then it can act upon.

This fixes the gpioiic(4) locking issues that arises when doing multiple
concurrent access on the bus.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273917 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Change the default log level for iSCSI target from 3 to 1.  It should
have been 1 from the beginning; not sure how it ended up at 3.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
rc.d/geli should not depend on random, as the attach functionality
do not require additional entropy to function.

It would create a circular dependency (not immediately obvious:
geli provides 'disks' and requires 'random' as of r273872,
'random' requires 'FILESYSTEMS', 'FILESYSTEMS' requires 'root',
'root' requires 'swap', and finally 'swap' requires 'disk').


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273919 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sh: Fix corruption of CTL* bytes in positional parameters in redirection.

EXP_REDIR was not being checked for while expanding positional parameters in
redirection, so CTL* bytes were not being prefixed where they should be.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273920 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Rewrite some of the disk setup documentation to be clearer and contain
less obsolete information. Also move the entropy command down the list --
the list is ordered by likelihood of use rather than alphabetically.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
<sys/param.h> is a superset of <sys/types.h> and must always come
first.  Coincidentally, today is the 11th anniversary of this man
page's (and this bug's) first appearance in FreeBSD.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't zero the stats before they are read out.

MFC after: 3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273925 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the build of non-FDT systems by moving the gpiobusvar.h header outside
the FDT #ifdef.

While here remove a few unused headers.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273926 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f