PR/48585: Henning Petersen: Always set errno when returning NULL.
remove unneeded code, and kill parens from return
Specify default SCSI inquiry size (36 bytes) on IOCS_S_INQUIRY() command.

X680x0 SCSI IOCS stalls if SCSI device doesn't return inquiry data
of specified allocation length size on the INQUIRY command,
and it causes hangup on the XM6 based emulators that return only
upto 36 byte inquiry data on SCSI disk emulation.

Many real SCSI-2 hard drives seem to support >100 byte inquiry data,
but at least there is a harddisk that returns only supported inquiry
data size and quits transfer.

The bootloader checks only the device type and there is no reason
to read 100 bytes that includes vender specific data.

Analyzed and reported by GIMONS, a developer of XM6 TypeG emulator,
which also can run NetBSD/x68k.
Remove unused inline version of SCSI IOCS functions.
Fix typo in DF_STATIC_TLS. From Elliott Hughes on tech-userlevel.
Fix uninitialized variable. Harmless: it does not change the behavior
at all.

ok rmind@ christos@
Import atf-0.20:

Experimental version released on February 7th, 2014.

This is the first release without the code for the deprecated tools.  If
you require such code, please fetch a copy of the 0.19 release and extract
the 'tools' directory for your own consumption.

* Removed the deprecated tools.  This includes atf-config, atf-report,
  atf-run and atf-version.
Merge atf-0.20.

The upstream Atffiles are gone so we will just rely on our automatic
generation of such files from bsd.test.mk.
Update reachover build files for atf-0.20.
Note update of atf to 0.20.
Remove defs.hpp.

Because we now own the 'tools' subdirectory in the tree, we can yank some
of the upstream autoconf-related complexity.  Start doing so by removing
defs.hpp and using the real compiler attributes where necessary.
Stop using bconfig.h in the tools code.

Just assume the code is being built for NetBSD for simplicity reasons.
Remove revision.h and associated complexity from atf-version.

Arguably, this was never needed and only made the code and the build system
more complex for no real reason.
Remove portability-related guards from the atf tools.

Just assume we are building for NetBSD given that the tools code is now
owned by the NetBSD tree.
Move sys/arch/amd64/amd64/fpu.c and sys/arch/amd64/include/fpu.h
into sys/arch/x86 in preparation for using the same code for i386.
Add x86/fpu.h
Nothing in i386 uses it yet, but it ends up in destdir so it has to be
released.
Reduce the calls to realloc from brk_string by basing initial argmax guess
on length of input.

Reviewed by: christos
npfctl_print_table: add a "cdb" type.
Remove unused reachover Makefiles.

The content of these was subsumed into the sibling 'tools' subdirectory
during the import of atf-0.19.
Homogenize reachover build file structure with that of kyua-cli:

- Move the majority of the common build definitions to the top-level
  Makefile.inc and ensure this gets included everywhere.
- Move the bconfig.h file to the top-level directory.
- Add a statically-generated defs.h file instead of creating one
  during the build.  Easier to understand and less chances for things
  to go wrong.
- Make sure all files using ATF_VERSION have the right dependency to
  trigger a rebuild when the value changes.
- Clean up stale -I flags.

This is all mostly for simplicity reasons and to reduce the cognitive
load required to understand the build of the atf and kyua-* packages.

I have tested this with both MKKYUA=no/yes and non-clean/clean builds
so hopefully I got the details right.  But if not, let me know please.