vt(4): Adjust the cursor position after changing the window size

A new terminal_set_cursor() is added: it wraps the existing
teken_set_cursor() function.

In vtbuf_grow(), the cursor position is adjusted at the end of the
function. In vt_change_font(), we call terminal_set_cursor() just after
terminal_set_winsize_blank(), while the terminal is mute.

This fixes a bug where, after loading a kernel video driver which
increases the terminal window size, the cursor remains at its old
position, in other words, in the middle of the display content.

PR:		194421
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273932 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't prune duplicate services in the expected output from /etc/services on
FreeBSD

Submitted by: pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273933 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Start to allow platforms other than U-Boot to use the FDT code in loader by
moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This
needs to be a new library for linking to work correctly.

Differential Revision:	https://reviews.freebsd.org/D1054
Reviewed by:	ian, rpaulo (earlier version)
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273934 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Port tests to FreeBSD/Linux

Some of the testcases don't work outside of NetBSD, and the behavior of
ether_aton_r differs between FreeBSD, Linux, and NetBSD, and the calls to the
API need to be massaged for FreeBSD and Linux.

Submitted by: pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273935 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Port lib/libc/net/h_dns_server to FreeBSD

Submitted by: pho


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Port lib/libc/sys/t_dup to FreeBSD/Linux

- The requirements differ between FreeBSD/Linux when dealing with oldd/newd
  being equal (both fail with EINVAL, not EBADF)
- Add an EBADF testcase
- Fix compilation issues on clang

In collaboration with: pho


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