Make sure we don't dereference a null pointer


git-svn-id: svn://svn.freebsd.org/base/head@235262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFi386: improve argument passing via btxldr

use related definitions in i386 bootargs.h

Reviewed by:	nyan, jhb
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@235264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Stop lying about default UFS blocksizes.

This catches up with the year-old change to default blocksizes. Also
reduce the variants of spelling gigabyte from 3 down to 2 (GB and GiB).

Suggested by:	arundel (about a year ago now ...)


git-svn-id: svn://svn.freebsd.org/base/head@235265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
According to SUSv4, realpath(3) must fail if
[ENOENT]  A component of file_name does not name an existing file or
    file_name points to an empty string.
[ENOTDIR] A component of the path prefix is not a directory, or the
    file_name argument contains at least one non- <slash> character
    and ends with one or more trailing <slash> characters and the last
    pathname component names an existing file that is neither a
    directory nor a symbolic link to a directory.
Add checks for the listed conditions, and set errno accordingly.

Update the realpath(3) manpage to mention SUS behaviour. Remove the
requirement to include sys/param.h before stdlib.h.

PR:	    128933
MFC after:  3 weeks


git-svn-id: svn://svn.freebsd.org/base/head@235266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a BSD-licensed sort rewrite that was started by me and later completed
with the major functionality and optimizations by Oleg Moskalenko.
It is compatible with the latest version of POSIX and the current GNU sort
version that we have in base.  Beside this, it implements all the
functionality introduced in later versions of GNU sort.  For now, it will
be installed as "bsdsort", keeping GNU sort as the default sort
implementation.


git-svn-id: svn://svn.freebsd.org/base/head@235267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Hook up BSD sort to the build.  By default, it will be installed as
  "bsdsort" and GNU sort will be the default "sort".  When WITH_BSD_SORT
  is set, BSD sort will be the default "sort" and GNU sort will be installed
  as "gnusort".


git-svn-id: svn://svn.freebsd.org/base/head@235268 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Regen


git-svn-id: svn://svn.freebsd.org/base/head@235269 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Prevent error status leak if write to some of the RAID1/1E volume disks
failed while write to some other succeeded. Instead mark disk as failed.
- Make RAID1E less aggressive in failing disks to avoid volume breakage.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@235270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Hack to unbreak boot2 for at91rm9200 boot loader.  When the at91sam
code came in, it moved things around which wound up breaking the
build.  We have to do this bit of a hack to avoid duplication of a lot
of #defines.


git-svn-id: svn://svn.freebsd.org/base/head@235271 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for passing in the board ID.

# This doesn't implement the full Linux boot ABI for arm yet.
# since there's no ATAGs list passed in for r2, and r0 has
# boot options rather than 0 as specified in the standard.
# Commited code to the tree won't touch any of this anyway, but
# future code may be able to use this.


git-svn-id: svn://svn.freebsd.org/base/head@235272 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove obsolte big endian flag.  It is no longer needed.


git-svn-id: svn://svn.freebsd.org/base/head@235273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Add regression tests for BSD sort


git-svn-id: svn://svn.freebsd.org/base/head@235274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Print package name in case an empty pkgdep line is found.

PR:		bin/164378
Submitted by:	Yuri <yuri AT tsoft.com> and many others
Approved by:	flz
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@235276 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This comment has become unmoored from the code to which it applies.
Move it back.


git-svn-id: svn://svn.freebsd.org/base/head@235277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove unused cruft.  We call through memcpy more directly when we
need to move the kernel, so we no longer need this.


git-svn-id: svn://svn.freebsd.org/base/head@235278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove a constant which is only used on non-FreeBSD platform.
(The actual code for the socket option handling has been #ifdefed
out forever...)

MFC after: 3 days.


git-svn-id: svn://svn.freebsd.org/base/head@235280 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219.
This file uses .code16 directives, which are not yet supported by
clang's integrated assembler.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@235281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Only provide the supported features in the SCTP_ASSOC_CHANGE notif
if the state is SCTP_COMM_UP or SCTP_RESTART.
While there, do some cleanups.

MFC after: 3 days


git-svn-id: svn://svn.freebsd.org/base/head@235282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a bug in the handling of association reset request.

MFC after: 3 days


git-svn-id: svn://svn.freebsd.org/base/head@235283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Skip nd6 line with no warning message when the system does not support
INET6.

Spotted by:	flo


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