- Center the clock on the user's terminal.
- Check that the terminal is sufficiently large to fully display the
clock (about 61x9.) If not, exit immediately with an error.
- Introduce a short delay in the scrolling when -s is given, so that
it can be better appreciated on syscons(4) and local xterm(1). The
default delay is 120 milliseconds.
- Add a new option, -d, to allow changing the scroll delay to any
duration from 0 to 5000 milliseconds. The -d option implies -s.
- Make it so that, when the optional argument is omitted, the clock
really does run forever. (Before this, it would have stopped after
about 65536 seconds due to wraparound.)

Return a low priority for the "hostb%d" catch-all for pci busses, which will
allow compiled-in bus device drivers such as AGP to attach first. Without
this the probe order is half hazzard and in particular SMP boxes may attach
"hostb" first, preventing AGP from attaching.

Note that AGP will still not load properly from loader.conf or after booting
with kldload. Removing the "hostb" catch-all entirely solves that problem
but some additional investigation must be done first.

Add -w, which prints the full width of the data being represented even if
it overflows the column, and do not truncate the base domain from displayed
host names. This is for programmatic interfaces and for sysops
who really want to see the whole host name.

Compartmentalize the bootstrap/buildtools, the cross-build setup,
and the world stage. /usr/obj/usr/src is now far more readable
(e.g. /usr/obj/usr/src/{btools_i386,ctools_i386_i386,world_i386}).

Use a completely private command path for the world stage of the build.
The bootstrap/buildtools stage compiles all required system programs
(like rm, ln, chmod, etc). At the moment the build compiles everything
it needs, but this can be augmented later to 'cp' the required binaries
into btools_<arch> instead of building them, including potentially copying
the compiler binaries so the ctools_<arch> build could use a private
path too).

The 'buildworld' target now properly removes all object modules for
all major stages. Several new targets have been added to reduce
build times, the most useful of which is 'quickworld', which skips
the btools and ctools stages (they must have already been built).

sys.mk has been augmented to support .nx binaries and .no object
modules, which are built using ${NXCC} and friends, which always uses
the system's native compiler rather then potentially using the
cross-build compiler, for generating helper programs during the build.
This way we do not have to special-case building the helper programs in
an earlier stage as FreeBSD does.

Fix a bug in 'wmake', which simulates the buildworld environment for
piecemeal compilation/testing. It was not using /usr/src/share/mk.

Add additional .ORDER: constraints to better support make -j N
(incomplete). Note that recent changes to the DragonFly scheduler make
it more likely for buildworld to trip over parallel make races.

TOOLS_PREFIX was used to generate cross-compiler directory targets
for exec'd utility binaries and access to libraries and include
files. However, in the new compartmentalized breakdown the cross
compiler's utility binaries will reside in ctools_* while the
include files and libraries are expected to be installed and accessed
in world_*. Add a USRDATA_PREFIX which defaults to TOOLS_PREFIX to
allow the cross compilation stage to separate the two entities.

A large number of targets were doing a mkdir -p openssl. A parallel make
may execute several of these simultaniously, causing mkdir -p to race against
itself. mkdir -p is not atomic (it does a stat and then a later mkdir) and
can fail under these conditions, causing a buildworld -j N to fail, so move
it to its own dependancy.

Add a missing resetpriority() which was causing all newly forked processes
to get realtime priority until the next reschedule. This permanently fixes
the 'jerky X pointer' problem.

Redo the parent estcpu inheritance code, make it much smarter by giving
child processes a small initial batch priority boost relative to the parent
and then allowing them to float back down if they are interactive, and
take this into account when aggregating the child's estcpu back into the
parent when the child exits. This handles initial conditions for batch
jobs.

Fix p_pctcpu and p_estcpu. When the new systimer stuff was put in the
scheduler got its own clock interrupt for scheduling updates which was set
to 10Hz. pctcpu was still being calculated based on 100hz, so change that
to 10hz.

The systimer stuff also broke estcpu, which in turn broke NICE. Change
the estcpu equations to operate properly and get rid of some crufty comments.

Note that NICE really works now. A cpu-bound nice +20 process will get
very little cpu relative to a cpu-bounce nice +0 process, and none relative
to a negatively-niced process. From a standing start each nice level of
difference immediately shifts about 5% of the cpu between processes. Once
the load and estcpu has stabilized (if the processes are cpu-bound), the
difference is around 2% per level, for two processes. When starting a
highly-niced process in the face of lower-niced cpu-bound processes, the
highly-niced process may not get any cpu at all for up to 60 seconds. This
is because the system 1-min loadav is used to scale estcpu.

64-byte-align the test functions so they appear on different cache lines.
It doesn't seem to make much of a difference through for some unknown
reason nop1() seems to have slightly lower overhead then nop2().

Make ALWAYS_MSG the default. This introduces an extra procedural call
level but has the advantage of making the so_pru_*() API functions uniform
across all builds, which we will need for things like the smbfs module.
We will fix up any performance issues down the line.

If XL cannot properly attach it tries to detach to clean up. Unfortunately,
the detach code expects it to have gotten most of the way through the attach
and if it hasn't the system will crash. This commit adds a flag that tells
the detach code whether the attach got far enough along for the detach to
be able to reset the card (and do certain other things).

Fix generation of USB_EVENT_DEVICE_DETACH, which was commented out in
FreeBSD. Incorporate NetBSD rev 1.110 which fixes an access to freed
memory which was previously causing the detach event to crash the system.

Separate the pieces a bit. The usb.ko module does not build EHCI, and
probably isn't stable enough to include EHCI by default yet, so
reorganize the Makefile's into subdirectories so we can build a separate
EHCI companion KLD.

Update the 825xx GigE support. Add a large number of new device id's and
support for the 82541 (e.g. Intel PRO/1000 MT DESKTOP ADAPTER) and 82544.
Also add sysctl support for various interrupt related delay parameters,
and add workarounds for chip issues.

Fix a bug in the recent connectionless commit. When sending a UDP packet
over a connected socket but with a source address of INADDR_ANY, udp_output()
was calling in_pcbladdr() with a NULL sockaddr pointer, causing a null
pointer panic.

Construct a temporary sockaddr_in to pass to in_pcbladdr() with the foreign
address instead. in_pcbladdr() takes an address and returns the interface
source IP address that best characterizes the interface the packet will be
sent out of.

* Use a better fix for revision 1.3 of vfs_init.c (ours).
I have integrated the change from FreeBSD's vfs_init.c
revision 1.59. Serious issues are fixed with this
change and a much more cleaner way of handling disappearing
VFS operation vectors. At least vfs_opv_numops are
allocated and recycled as appropriate. The number of
pre-allocated vfs_opv_numops can be changed at boot time
by a tunable. $FreeBSD$ ID tag updated accordingly.

NOTE: this *removes* the temporary fix committed my dillon@
a few days ago, by giving it a more cleaner solution.

* Use M_VNODE instead of M_TEMP for storing VFS buffers and
vectors.

* Document the functions in this file to make it easier
for file system implementors.

* Cleanup unused variables in vfs_add_vnops().

* Use M_ZERO instead of malloc+bzero.

* Do not panic when a VFS operation is not available,
instead return EOPNOTSUPP. This is better because
the error value can be passed up by the system calls
instead of giving an obscure panic about unavailable
VFS operation. One can run into this when a VFS op
call is made when no filesystem supports that
particular op. A similar change was made by Peter
Wemm in FreeBSD's sys/kern/vfs_init.c.

* Better document the various stages of vfs_opv_recalc().

Note, our value of the minimum number of available VFS operation
vectors is `96' at the moment, since a few tests show that the
previous code initialised to values of between 53-60. The default
probably can be tuned a little bit better; although tunable access
is available at boot to `vfs.opv_numops'.

main() more typically uses 'char **argv' instead of 'char *argv[]'. Remove
the requirement that an empty line be inserted in function definitions without
local variables (the requirement is actually that NO empty line be inserted).
Revamp the documentation on when and when not to use braces around
substatements.

Separate chroot() into kern_chroot(). Rename change_dir() to checkvp_chdir()
and reorganize the code to avoid doing weird things to the passed vnode's
lock and ref count in deep subroutines (which lead to buggy code).

Fix a bug in chdir()/kern_chdir() (the namei data was not being freed in all
cases), and also fix a bug in symlink() (missing zfree in error case).

Fix loading of the SMBFS kernel module. The KMODDEPS line in the SMBFS
Makefile generated incorrect (read fake) symbols; the build system was
pretty satisified but kldload was not and returned ENOEXEC.

Instead, add a Makefile for libiconv as it is supposed to be, because
SMBFS requires it as a module dependency.

Note, the SMBFS module needs to be recompiled for it to work, and the
libiconv KLD needs to be built using the newly added Makefile. Also
rebuild 'libmchain'.