summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
committersjg <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
commit65145fa4c81da358fcbc3b650156dab705dfa34e (patch)
tree55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /tools
parent60ff4eb0dff94a04d75d0d52a3957aaaf5f8c693 (diff)
parente6b664c390af88d4a87208bc042ce503da664c3b (diff)
downloadFreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.zip
FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.tar.gz
Merge sync of head
Diffstat (limited to 'tools')
-rw-r--r--tools/bsdbox/Makefile2
-rw-r--r--tools/bsdbox/Makefile.base2
-rw-r--r--tools/build/Makefile8
-rwxr-xr-xtools/build/check-links.sh124
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc3944
-rw-r--r--tools/build/options/WITHOUT_AUTOFS4
-rw-r--r--tools/build/options/WITHOUT_BHYVE6
-rw-r--r--tools/build/options/WITHOUT_BOOTPARAMD3
-rw-r--r--tools/build/options/WITHOUT_BOOTPD3
-rw-r--r--tools/build/options/WITHOUT_BSDINSTALL5
-rw-r--r--tools/build/options/WITHOUT_CCD4
-rw-r--r--tools/build/options/WITHOUT_CROSS_COMPILER6
-rw-r--r--tools/build/options/WITHOUT_CXX2
-rw-r--r--tools/build/options/WITHOUT_EE5
-rw-r--r--tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS9
-rw-r--r--tools/build/options/WITHOUT_FILE4
-rw-r--r--tools/build/options/WITHOUT_FINGER5
-rw-r--r--tools/build/options/WITHOUT_FTP5
-rw-r--r--tools/build/options/WITHOUT_GPIB2
-rw-r--r--tools/build/options/WITHOUT_HAST4
-rw-r--r--tools/build/options/WITHOUT_INCLUDES3
-rw-r--r--tools/build/options/WITHOUT_INETD3
-rw-r--r--tools/build/options/WITHOUT_ISCSI4
-rw-r--r--tools/build/options/WITHOUT_RADIUS_SUPPORT5
-rw-r--r--tools/build/options/WITHOUT_RBOOTD3
-rw-r--r--tools/build/options/WITHOUT_RCS7
-rw-r--r--tools/build/options/WITHOUT_SYSCALL_COMPAT2
-rw-r--r--tools/build/options/WITHOUT_TALK5
-rw-r--r--tools/build/options/WITHOUT_TCP_WRAPPERS4
-rw-r--r--tools/build/options/WITHOUT_TFTP5
-rw-r--r--tools/build/options/WITHOUT_TIMED3
-rw-r--r--tools/build/options/WITHOUT_WARNS2
-rw-r--r--tools/build/options/WITH_FMAKE2
-rw-r--r--tools/build/options/WITH_INFO4
-rw-r--r--tools/build/stdlib.h42
-rw-r--r--tools/debugscripts/netstat-anr.gdb163
-rw-r--r--tools/regression/aio/aiop/Makefile2
-rw-r--r--tools/regression/aio/aiop/aiop.c112
-rw-r--r--tools/regression/aio/aiotest/Makefile9
-rw-r--r--tools/regression/aio/aiotest/aiotest.c702
-rw-r--r--tools/regression/aio/kqueue/aio_kqueue.c207
-rw-r--r--tools/regression/aio/kqueue/lio/Makefile6
-rw-r--r--tools/regression/aio/kqueue/lio/lio_kqueue.c242
-rw-r--r--tools/regression/execve/Makefile70
-rw-r--r--tools/regression/execve/doexec.c58
-rw-r--r--tools/regression/execve/execve.t27
-rw-r--r--tools/regression/execve/tests/badinterplen4
-rw-r--r--tools/regression/execve/tests/devnullscript4
-rw-r--r--tools/regression/execve/tests/goodaout.c47
-rw-r--r--tools/regression/execve/tests/goodscript4
-rw-r--r--tools/regression/execve/tests/nonexistshell4
-rw-r--r--tools/regression/execve/tests/scriptarg4
-rw-r--r--tools/regression/execve/tests/scriptarg-nospace4
-rw-r--r--tools/regression/fifo/fifo_create/Makefile7
-rw-r--r--tools/regression/fifo/fifo_create/fifo_create.c285
-rw-r--r--tools/regression/fifo/fifo_io/Makefile7
-rw-r--r--tools/regression/fifo/fifo_io/fifo_io.c1409
-rw-r--r--tools/regression/fifo/fifo_misc/Makefile7
-rw-r--r--tools/regression/fifo/fifo_misc/fifo_misc.c336
-rw-r--r--tools/regression/fifo/fifo_open/Makefile7
-rw-r--r--tools/regression/fifo/fifo_open/fifo_open.c476
-rw-r--r--tools/regression/file/closefrom/closefrom.c2
-rw-r--r--tools/regression/file/dup/Makefile7
-rw-r--r--tools/regression/file/dup/dup.c386
-rw-r--r--tools/regression/file/dup/dup.t10
-rw-r--r--tools/regression/file/fcntlflags/Makefile7
-rw-r--r--tools/regression/file/fcntlflags/Makefile.depend17
-rw-r--r--tools/regression/file/fcntlflags/fcntlflags.c110
-rw-r--r--tools/regression/file/fcntlflags/fcntlflags.t10
-rw-r--r--tools/regression/file/flock/Makefile9
-rw-r--r--tools/regression/file/flock/flock.c1594
-rw-r--r--tools/regression/file/ftruncate/Makefile7
-rw-r--r--tools/regression/file/ftruncate/ftruncate.c177
-rw-r--r--tools/regression/file/newfileops_on_fork/Makefile8
-rw-r--r--tools/regression/file/newfileops_on_fork/newfileops_on_fork.c121
-rw-r--r--tools/regression/gaithrstress/gaithrstress.c10
-rw-r--r--tools/regression/kqueue/Makefile21
-rw-r--r--tools/regression/kqueue/common.h78
-rw-r--r--tools/regression/kqueue/config.h13
-rw-r--r--tools/regression/kqueue/main.c284
-rw-r--r--tools/regression/kqueue/proc.c255
-rw-r--r--tools/regression/kqueue/read.c324
-rw-r--r--tools/regression/kqueue/signal.c199
-rw-r--r--tools/regression/kqueue/timer.c178
-rw-r--r--tools/regression/kqueue/user.c129
-rw-r--r--tools/regression/kqueue/vnode.c266
-rw-r--r--tools/regression/lib/libc/gen/test-wordexp.c15
-rw-r--r--tools/regression/lib/libc/stdio/test-fmemopen.t15
-rw-r--r--tools/regression/lib/libc/stdio/test-open_memstream.c2
-rw-r--r--tools/regression/lib/libc/stdio/test-open_wmemstream.c2
-rw-r--r--tools/regression/mmap/Makefile6
-rw-r--r--tools/regression/mmap/mmap.c96
-rw-r--r--tools/regression/mqueue/Makefile5
-rw-r--r--tools/regression/mqueue/mqtest1/Makefile9
-rw-r--r--tools/regression/mqueue/mqtest1/mqtest1.c52
-rw-r--r--tools/regression/mqueue/mqtest2/Makefile9
-rw-r--r--tools/regression/mqueue/mqtest2/mqtest2.c93
-rw-r--r--tools/regression/mqueue/mqtest3/Makefile9
-rw-r--r--tools/regression/mqueue/mqtest3/mqtest3.c109
-rw-r--r--tools/regression/mqueue/mqtest4/Makefile9
-rw-r--r--tools/regression/mqueue/mqtest4/mqtest4.c115
-rw-r--r--tools/regression/mqueue/mqtest5/Makefile9
-rw-r--r--tools/regression/mqueue/mqtest5/mqtest5.c122
-rw-r--r--tools/regression/netinet/arphold/arphold.c2
-rw-r--r--tools/regression/p1003_1b/Makefile1
-rw-r--r--tools/regression/p1003_1b/fifo.c14
-rw-r--r--tools/regression/p1003_1b/main.c1
-rw-r--r--tools/regression/p1003_1b/prutil.c9
-rw-r--r--tools/regression/p1003_1b/sched.c26
-rw-r--r--tools/regression/p1003_1b/yield.c2
-rw-r--r--tools/regression/sockets/accept_fd_leak/Makefile4
-rw-r--r--tools/regression/sockets/accept_fd_leak/accept_fd_leak.c52
-rw-r--r--tools/regression/sockets/accf_data_attach/Makefile4
-rw-r--r--tools/regression/sockets/accf_data_attach/accf_data_attach.c2
-rw-r--r--tools/regression/sockets/fstat/Makefile2
-rw-r--r--tools/regression/sockets/fstat/fstat.c2
-rw-r--r--tools/regression/sockets/kqueue/Makefile1
-rw-r--r--tools/regression/sockets/kqueue/kqueue.c4
-rw-r--r--tools/regression/sockets/listen_backlog/Makefile2
-rw-r--r--tools/regression/sockets/listen_backlog/listen_backlog.c5
-rw-r--r--tools/regression/sockets/listenclose/Makefile2
-rw-r--r--tools/regression/sockets/listenclose/listenclose.c2
-rw-r--r--tools/regression/sockets/pr_atomic/Makefile2
-rw-r--r--tools/regression/sockets/pr_atomic/pr_atomic.c14
-rw-r--r--tools/regression/sockets/reconnect/Makefile2
-rw-r--r--tools/regression/sockets/reconnect/reconnect.c36
-rw-r--r--tools/regression/sockets/rtsocket/Makefile2
-rw-r--r--tools/regression/sockets/rtsocket/rtsocket.c2
-rw-r--r--tools/regression/sockets/sblock/Makefile2
-rw-r--r--tools/regression/sockets/sblock/sblock.c12
-rw-r--r--tools/regression/sockets/sendfile/sendfile.c8
-rw-r--r--tools/regression/sockets/shutdown/Makefile2
-rw-r--r--tools/regression/sockets/shutdown/shutdown.c2
-rw-r--r--tools/regression/sockets/sigpipe/Makefile2
-rw-r--r--tools/regression/sockets/sigpipe/sigpipe.c2
-rw-r--r--tools/regression/sockets/so_setfib/Makefile10
-rw-r--r--tools/regression/sockets/so_setfib/so_setfib.c11
-rw-r--r--tools/regression/sockets/so_setfib/so_setfib.t59
-rw-r--r--tools/regression/sockets/socketpair/Makefile2
-rw-r--r--tools/regression/sockets/socketpair/socketpair.c2
-rw-r--r--tools/regression/sockets/unix_bindconnect/Makefile2
-rw-r--r--tools/regression/sockets/unix_bindconnect/unix_bindconnect.c10
-rw-r--r--tools/regression/sockets/unix_close_race/Makefile2
-rw-r--r--tools/regression/sockets/unix_close_race/unix_close_race.c15
-rw-r--r--tools/regression/sockets/unix_passfd/Makefile2
-rw-r--r--tools/regression/sockets/unix_passfd/unix_passfd.c8
-rw-r--r--tools/regression/sockets/unix_sendtorace/Makefile2
-rw-r--r--tools/regression/sockets/unix_sendtorace/unix_sendtorace.c23
-rw-r--r--tools/regression/sockets/unix_socket/Makefile2
-rw-r--r--tools/regression/sockets/unix_socket/unix_socket.c2
-rw-r--r--tools/regression/sockets/unix_sorflush/Makefile2
-rw-r--r--tools/regression/sockets/unix_sorflush/unix_sorflush.c2
-rw-r--r--tools/regression/sockets/zerosend/zerosend.c6
-rw-r--r--tools/regression/sysvshm/shmtest.c57
-rw-r--r--tools/regression/usr.bin/env/regress-env.rgdata39
-rw-r--r--tools/regression/usr.bin/env/regress-sb.rb1
-rw-r--r--tools/test/README1
-rw-r--r--tools/test/dtrace/Makefile394
-rw-r--r--tools/tools/ath/athaggrstats/Makefile4
-rw-r--r--tools/tools/ath/athratestats/main.c3
-rw-r--r--tools/tools/ath/athstats/Makefile10
-rw-r--r--tools/tools/ath/athstats/athstats.c45
-rw-r--r--tools/tools/cxgbetool/Makefile2
-rw-r--r--tools/tools/cxgbetool/cxgbetool.8490
-rw-r--r--tools/tools/cxgbtool/cxgbtool.c1
-rw-r--r--tools/tools/ether_reflect/ether_reflect.14
-rw-r--r--tools/tools/iwn/iwnstats/iwn_ioctl.c1
-rw-r--r--tools/tools/makeroot/makeroot.83
-rwxr-xr-xtools/tools/makeroot/makeroot.sh12
-rw-r--r--tools/tools/mwl/mwlstats/Makefile4
-rwxr-xr-xtools/tools/nanobsd/defaults.sh983
-rw-r--r--tools/tools/nanobsd/fill_pkg.sh8
-rw-r--r--tools/tools/nanobsd/gateworks/Files/root/.profile2
-rw-r--r--tools/tools/nanobsd/gateworks/G23482
-rw-r--r--tools/tools/nanobsd/gateworks/G23582
-rwxr-xr-x[-rw-r--r--]tools/tools/nanobsd/nanobsd.sh960
-rw-r--r--tools/tools/nanobsd/pcengines/ALIX_DSK6
-rw-r--r--tools/tools/nanobsd/pcengines/ALIX_NFS9
-rw-r--r--tools/tools/nanobsd/pcengines/Files/root/.cshrc2
-rw-r--r--tools/tools/nanobsd/pcengines/Files/root/.login2
-rw-r--r--tools/tools/nanobsd/pcengines/common.conf1
-rw-r--r--tools/tools/nanobsd/rescue/Files/root/.cshrc2
-rwxr-xr-xtools/tools/nanobsd/rescue/build.sh11
-rw-r--r--tools/tools/nanobsd/rescue/common20
-rw-r--r--tools/tools/net80211/wlanstats/Makefile4
-rw-r--r--tools/tools/netmap/pkt-gen.c73
-rw-r--r--tools/tools/npe/npestats/Makefile4
-rw-r--r--tools/tools/qrndtest/Makefile (renamed from tools/regression/aio/kqueue/Makefile)7
-rw-r--r--tools/tools/qrndtest/README4
-rw-r--r--tools/tools/qrndtest/r.c81
-rwxr-xr-xtools/tools/shlib-compat/shlib-compat.py85
-rw-r--r--tools/tools/shlib-compat/test/Makefile.inc2
-rwxr-xr-xtools/tools/shlib-compat/test/regress.sh2
-rw-r--r--tools/tools/sysbuild/sysbuild.sh11
-rw-r--r--tools/tools/tscdrift/tscdrift.c2
-rw-r--r--tools/tools/usbtest/Makefile4
-rw-r--r--tools/tools/vimage/vimage.84
197 files changed, 6320 insertions, 10774 deletions
diff --git a/tools/bsdbox/Makefile b/tools/bsdbox/Makefile
index aaf6ab9..7189f43 100644
--- a/tools/bsdbox/Makefile
+++ b/tools/bsdbox/Makefile
@@ -55,7 +55,7 @@ CRUNCH_SRCDIRS+= bin
# setuid binaries - they use these libraries. PAM needs to be
# built dynamically or it tries to build _all_ of the modules
# statically - and that ends very badly.
-CRUNCH_SHLIBS+= -lc -lutil -lcrypt
+CRUNCH_SHLIBS+= -lc -lutil -lcrypt -lxo -lgpio
CRUNCH_LIBS+= -lkvm -lmemstat -lnetgraph
CRUNCH_LIBS+= -lcrypt -ledit -ll -ltermcapw
diff --git a/tools/bsdbox/Makefile.base b/tools/bsdbox/Makefile.base
index 1429b09..4eb7056 100644
--- a/tools/bsdbox/Makefile.base
+++ b/tools/bsdbox/Makefile.base
@@ -6,7 +6,7 @@
#
CRUNCH_PROGS_sbin+= dmesg sysctl init reboot
CRUNCH_PROGS_bin+= ls cat dd df cp hostname kill mkdir sleep ps
-CRUNCH_PROGS_bin+= ln rm hostname kenv
+CRUNCH_PROGS_bin+= ln rm hostname kenv mv expr
CRUNCH_PROGS_usr.bin+= true false hexdump tail nc w head uname tset
CRUNCH_PROGS_usr.sbin+= gpioctl
CRUNCH_ALIAS_w= uptime
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 6aead63..2617d8d 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -25,6 +25,14 @@ CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis \
-I${.CURDIR}/../../lib/libc/include
.endif
+_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true
+.if ${_WITH_REALLOCARRAY} == 0
+.PATH: ${.CURDIR}/../../lib/libc/stdlib
+INCS+= stdlib.h
+SRCS+= reallocarray.c
+CFLAGS+= -I${.CURDIR}/../../lib/libc/include
+.endif
+
.if empty(SRCS)
SRCS= dummy.c
.endif
diff --git a/tools/build/check-links.sh b/tools/build/check-links.sh
index 28e52b5..57c9437 100755
--- a/tools/build/check-links.sh
+++ b/tools/build/check-links.sh
@@ -1,37 +1,111 @@
#!/bin/sh
# $FreeBSD$
-mime=$(file --mime-type $1)
+libkey() {
+ libkey="lib_symbols_$1"
+ patterns=[.+,/-]
+ replacement=_
+ while :; do
+ case " ${libkey} " in
+ *${patterns}*)
+ libkey="${libkey%%${patterns}*}${replacement}${libkey#*${patterns}}"
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+ return 0
+}
+
+ret=0
+CHECK_UNRESOLVED=1
+VERBOSE_RESOLVED=0
+while getopts "Uv" flag; do
+ case "${flag}" in
+ U) CHECK_UNRESOLVED=0 ;;
+ v) VERBOSE_RESOLVED=1 ;;
+ esac
+done
+shift $((OPTIND-1))
+
+mime=$(file -L --mime-type $1)
+isbin=0
case $mime in
-*application/x-executable);;
+*application/x-executable) isbin=1 ;;
*application/x-sharedlib);;
*) echo "Not an elf file" >&2 ; exit 1;;
esac
+# Gather all symbols from the target
+unresolved_symbols=$(nm -u -D --format=posix "$1" | awk '$2 == "U" {print $1}' | tr '\n' ' ')
+[ ${isbin} -eq 1 ] && bss_symbols=$(nm -D --format=posix "$1" | awk '$2 == "B" && $4 != "" {print $1}' | tr '\n' ' ')
+ldd_libs=$(ldd $(realpath $1) | awk '{print $1 ":" $3}')
+
# Check for useful libs
-list_libs=""
-for lib in $(readelf -d $1 | awk '$2 == "(NEEDED)" { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do
- echo -n "checking if $lib is needed: "
- libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }')
- list_libs="$list_libs $libpath"
- foundone=0
- for fct in $(nm -D $libpath | awk '$2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do
- nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break
- done
- if [ $foundone -eq 1 ]; then
- echo "yes"
- else
- echo "no"
- fi
+list_libs=
+resolved_symbols=
+for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do
+ echo -n "checking if $lib is needed: "
+ if [ -n "${lib##/*}" ]; then
+ for libpair in ${ldd_libs}; do
+ case "${libpair}" in
+ ${lib}:*) libpath="${libpair#*:}" && break ;;
+ esac
+ done
+ else
+ libpath="${lib}"
+ fi
+ list_libs="$list_libs $lib"
+ foundone=
+ lib_symbols="$(nm -D --defined-only --format=posix "${libpath}" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')"
+ if [ ${CHECK_UNRESOLVED} -eq 1 ]; then
+ # Save the global symbols for this lib
+ libkey "${lib}"
+ setvar "${libkey}" "${lib_symbols}"
+ fi
+ for fct in ${lib_symbols}; do
+ case " ${unresolved_symbols} ${bss_symbols} " in
+ *\ ${fct}\ *) foundone="${fct}" && break ;;
+ esac
+ done
+ if [ -n "${foundone}" ]; then
+ echo "yes... ${foundone}"
+ else
+ echo "no"
+ ret=1
+ fi
done
-for sym in $(nm -D $1 | awk '$1 == "U" { print $2 }'); do
- found=0
- for l in ${list_libs} ; do
- nm -D $l | awk -v s=$sym '($2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break
- done
- if [ $found -eq 0 ]; then
- echo "Unresolved symbol $sym"
- fi
-done
+if [ ${CHECK_UNRESOLVED} -eq 1 ]; then
+ # Add in crt1 symbols
+ list_libs="${list_libs} crt1.o"
+ lib_symbols="$(nm --defined-only --format=posix "/usr/lib/crt1.o" | awk '$2 ~ /C|R|D|T|W|B|V/ {print $1}' | tr '\n' ' ')"
+ # Save the global symbols for this lib
+ libkey "crt1.o"
+ setvar "${libkey}" "${lib_symbols}"
+
+ # Now search libs for all symbols and report missing ones.
+ for sym in ${unresolved_symbols}; do
+ found=0
+ for lib in ${list_libs}; do
+ libkey "${lib}"
+ eval "lib_symbols=\"\${${libkey}}\""
+ # lib_symbols now contains symbols for the lib.
+ case " ${lib_symbols} " in
+ *\ ${sym}\ *)
+ [ ${VERBOSE_RESOLVED} -eq 1 ] &&
+ echo "Resolved symbol ${sym} from ${lib}"
+ found=1
+ break
+ ;;
+ esac
+ done
+ if [ $found -eq 0 ]; then
+ echo "Unresolved symbol $sym"
+ ret=1
+ fi
+ done
+fi
+exit ${ret}
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index d77cef2..ed39f7d 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -6,6 +6,7 @@
#
.if ${MK_ACCT} == no
+OLD_FILES+=etc/rc.d/accounting
OLD_FILES+=etc/periodic/daily/310.accounting
OLD_FILES+=usr/sbin/accton
OLD_FILES+=usr/sbin/sa
@@ -14,6 +15,8 @@ OLD_FILES+=usr/share/man/man8/sa.8.gz
.endif
.if ${MK_ACPI} == no
+OLD_FILES+=etc/devd/asus.conf
+OLD_FILES+=etc/rc.d/power_profile
OLD_FILES+=usr/sbin/acpiconf
OLD_FILES+=usr/sbin/acpidb
OLD_FILES+=usr/sbin/acpidump
@@ -26,6 +29,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz
.if ${MK_AMD} == no
OLD_FILES+=etc/amd.map
+OLD_FILES+=etc/rc.d/amd
OLD_FILES+=usr/bin/pawd
OLD_FILES+=usr/sbin/amd
OLD_FILES+=usr/sbin/amq
@@ -48,6 +52,8 @@ OLD_FILES+=usr/share/man/man8/wire-test.8.gz
.endif
.if ${MK_APM} == no
+OLD_FILES+=etc/rc.d/apm
+OLD_FILES+=etc/rc.d/apmd
OLD_FILES+=etc/apmd.conf
OLD_FILES+=usr/sbin/apm
OLD_FILES+=usr/share/examples/etc/apmd.conf
@@ -56,6 +62,7 @@ OLD_FILES+=usr/share/man/man8/amd64/apmconf.8.gz
.endif
.if ${MK_AT} == no
+OLD_FILES+=etc/pam.d/atrun
OLD_FILES+=usr/bin/at
OLD_FILES+=usr/bin/atq
OLD_FILES+=usr/bin/atrm
@@ -144,11 +151,76 @@ OLD_FILES+=usr/share/man/man8/authpf.8.gz
OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz
.endif
+.if ${MK_AUTOFS} == no
+OLD_FILES+=etc/autofs/include_ldap
+OLD_FILES+=etc/autofs/special_hosts
+OLD_FILES+=etc/autofs/special_media
+OLD_FILES+=etc/autofs/special_null
+OLD_FILES+=etc/auto_master
+OLD_FILES+=etc/rc.d/automount
+OLD_FILES+=etc/rc.d/automountd
+OLD_FILES+=etc/rc.d/autounmountd
+OLD_FILES+=usr/sbin/automount
+OLD_FILES+=usr/sbin/automountd
+OLD_FILES+=usr/sbin/autounmountd
+OLD_FILES+=usr/share/man/man5/autofs.5.gz
+OLD_FILES+=usr/share/man/man5/auto_master.5.gz
+OLD_FILES+=usr/share/man/man8/automount.8.gz
+OLD_FILES+=usr/share/man/man8/automountd.8.gz
+OLD_FILES+=usr/share/man/man8/autounmountd.8.gz
+OLD_DIRS+=etc/autofs
+.endif
+
+.if ${MK_BHYVE} == no
+OLD_FILES+=usr/sbin/bhyve
+OLD_FILES+=usr/sbin/bhyvectl
+OLD_FILES+=usr/sbin/bhyveload
+OLD_FILES+=usr/share/examples/bhyve/vmrun.sh
+OLD_FILES+=usr/share/man/man8/bhyve.8.gz
+OLD_FILES+=usr/share/man/man8/bhyveload.8.gz
+OLD_DIRS+=usr/share/examples/bhyve
+.endif
+
+.if ${MK_BINUTILS} == no
+OLD_FILES+=usr/bin/as
+OLD_FILES+=usr/bin/ld
+OLD_FILES+=usr/bin/objcopy
+OLD_FILES+=usr/bin/objdump
+OLD_FILES+=usr/bin/readelf
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.x
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xbn
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xc
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xd
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xdc
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xdw
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xn
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xr
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xs
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xsc
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xsw
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xu
+OLD_FILES+=usr/libdata/ldscripts/elf_x86_64_fbsd.xw
+OLD_FILES+=usr/share/man/man1/as.1.gz
+OLD_FILES+=usr/share/man/man1/ld.1.gz
+OLD_FILES+=usr/share/man/man1/objcopy.1.gz
+OLD_FILES+=usr/share/man/man1/objdump.1.gz
+OLD_FILES+=usr/share/man/man1/readelf.1.gz
+OLD_FILES+=usr/share/man/man7/as.7.gz
+OLD_FILES+=usr/share/man/man7/ld.7.gz
+OLD_FILES+=usr/share/man/man7/ldint.7.gz
+OLD_FILES+=usr/share/man/man7/binutils.7.gz
+.endif
+
.if ${MK_BLUETOOTH} == no
OLD_FILES+=etc/bluetooth/hcsecd.conf
OLD_FILES+=etc/bluetooth/hosts
OLD_FILES+=etc/bluetooth/protocols
+OLD_FILES+=etc/defaults/bluetooth.device.conf
OLD_DIRS+=etc/bluetooth
+OLD_FILES+=etc/rc.d/bluetooth
+OLD_FILES+=etc/rc.d/bthidd
+OLD_FILES+=etc/rc.d/hcsecd
+OLD_FILES+=etc/rc.d/ubthidhci
OLD_FILES+=usr/bin/bthost
OLD_FILES+=usr/bin/btsockstat
OLD_FILES+=usr/bin/rfcomm_sppd
@@ -185,6 +257,7 @@ OLD_FILES+=usr/lib32/libsdp.so
OLD_LIBS+=usr/lib32/libsdp.so.4
OLD_FILES+=usr/lib32/libsdp_p.a
.endif
+OLD_FILES+=usr/sbin/ath3kfw
OLD_FILES+=usr/sbin/bcmfw
OLD_FILES+=usr/sbin/bt3cfw
OLD_FILES+=usr/sbin/bthidcontrol
@@ -198,6 +271,7 @@ OLD_FILES+=usr/sbin/l2ping
OLD_FILES+=usr/sbin/rfcomm_pppd
OLD_FILES+=usr/sbin/sdpcontrol
OLD_FILES+=usr/sbin/sdpd
+OLD_FILES+=usr/share/examples/etc/defaults/bluetooth.device.conf
OLD_FILES+=usr/share/man/man1/bthost.1.gz
OLD_FILES+=usr/share/man/man1/btsockstat.1.gz
OLD_FILES+=usr/share/man/man1/rfcomm_sppd.1.gz
@@ -255,6 +329,7 @@ OLD_FILES+=usr/share/man/man3/sdp_search.3.gz
OLD_FILES+=usr/share/man/man3/sdp_unregister_service.3.gz
OLD_FILES+=usr/share/man/man3/sdp_uuid2desc.3.gz
OLD_FILES+=usr/share/man/man5/hcsecd.conf.5.gz
+OLD_FILES+=usr/share/man/man8/ath3kfw.8.gz
OLD_FILES+=usr/share/man/man8/bcmfw.8.gz
OLD_FILES+=usr/share/man/man8/bt3cfw.8.gz
OLD_FILES+=usr/share/man/man8/bthidcontrol.8.gz
@@ -270,9 +345,215 @@ OLD_FILES+=usr/share/man/man8/sdpcontrol.8.gz
OLD_FILES+=usr/share/man/man8/sdpd.8.gz
.endif
-#.if ${MK_BOOT} == no
-# to be filled in
-#.endif
+.if ${MK_BOOT} == no
+OLD_FILES+=boot/beastie.4th
+OLD_FILES+=boot/boot
+OLD_FILES+=boot/boot0
+OLD_FILES+=boot/boot0sio
+OLD_FILES+=boot/boot1
+OLD_FILES+=boot/boot1.efi
+OLD_FILES+=boot/boot1.efifat
+OLD_FILES+=boot/boot2
+OLD_FILES+=boot/brand.4th
+OLD_FILES+=boot/cdboot
+OLD_FILES+=boot/check-password.4th
+OLD_FILES+=boot/color.4th
+OLD_FILES+=boot/defaults/loader.conf
+OLD_FILES+=boot/delay.4th
+OLD_FILES+=boot/device.hints
+OLD_FILES+=boot/frames.4th
+OLD_FILES+=boot/gptboot
+OLD_FILES+=boot/gptzfsboot
+OLD_FILES+=boot/loader
+OLD_FILES+=boot/loader.4th
+OLD_FILES+=boot/loader.efi
+OLD_FILES+=boot/loader.help
+OLD_FILES+=boot/loader.rc
+OLD_FILES+=boot/mbr
+OLD_FILES+=boot/menu-commands.4th
+OLD_FILES+=boot/menu.4th
+OLD_FILES+=boot/menu.rc
+OLD_FILES+=boot/menusets.4th
+OLD_FILES+=boot/pcibios.4th
+OLD_FILES+=boot/pmbr
+OLD_FILES+=boot/pxeboot
+OLD_FILES+=boot/screen.4th
+OLD_FILES+=boot/shortcuts.4th
+OLD_FILES+=boot/support.4th
+OLD_FILES+=boot/userboot.so
+OLD_FILES+=boot/version.4th
+OLD_FILES+=boot/zfsboot
+OLD_FILES+=boot/zfsloader
+OLD_FILES+=usr/lib/kgzldr.o
+OLD_FILES+=usr/share/man/man5/loader.conf.5.gz
+OLD_FILES+=usr/share/man/man8/beastie.4th.8.gz
+OLD_FILES+=usr/share/man/man8/brand.4th.8.gz
+OLD_FILES+=usr/share/man/man8/check-password.4th.8.gz
+OLD_FILES+=usr/share/man/man8/color.4th.8.gz
+OLD_FILES+=usr/share/man/man8/delay.4th.8.gz
+OLD_FILES+=usr/share/man/man8/gptboot.8.gz
+OLD_FILES+=usr/share/man/man8/gptzfsboot.8.gz
+OLD_FILES+=usr/share/man/man8/loader.4th.8.gz
+OLD_FILES+=usr/share/man/man8/loader.8.gz
+OLD_FILES+=usr/share/man/man8/menu.4th.8.gz
+OLD_FILES+=usr/share/man/man8/menusets.4th.8.gz
+OLD_FILES+=usr/share/man/man8/pxeboot.8.gz
+OLD_FILES+=usr/share/man/man8/version.4th.8.gz
+OLD_FILES+=usr/share/man/man8/zfsboot.8.gz
+OLD_FILES+=usr/share/man/man8/zfsloader.8.gz
+.endif
+
+.if ${MK_BSD_CPIO} == no
+OLD_FILES+=usr/bin/bsdcpio
+OLD_FILES+=usr/bin/cpio
+OLD_FILES+=usr/share/man/man1/bsdcpio.1.gz
+OLD_FILES+=usr/share/man/man1/cpio.1.gz
+.endif
+
+.if ${MK_BSDINSTALL} == no
+OLD_FILES+=usr/libexec/bsdinstall/adduser
+OLD_FILES+=usr/libexec/bsdinstall/auto
+OLD_FILES+=usr/libexec/bsdinstall/autopart
+OLD_FILES+=usr/libexec/bsdinstall/checksum
+OLD_FILES+=usr/libexec/bsdinstall/config
+OLD_FILES+=usr/libexec/bsdinstall/distextract
+OLD_FILES+=usr/libexec/bsdinstall/distfetch
+OLD_FILES+=usr/libexec/bsdinstall/docsinstall
+OLD_FILES+=usr/libexec/bsdinstall/entropy
+OLD_FILES+=usr/libexec/bsdinstall/hostname
+OLD_FILES+=usr/libexec/bsdinstall/jail
+OLD_FILES+=usr/libexec/bsdinstall/keymap
+OLD_FILES+=usr/libexec/bsdinstall/mirrorselect
+OLD_FILES+=usr/libexec/bsdinstall/mount
+OLD_FILES+=usr/libexec/bsdinstall/netconfig
+OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4
+OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6
+OLD_FILES+=usr/libexec/bsdinstall/partedit
+OLD_FILES+=usr/libexec/bsdinstall/rootpass
+OLD_FILES+=usr/libexec/bsdinstall/script
+OLD_FILES+=usr/libexec/bsdinstall/scriptedpart
+OLD_FILES+=usr/libexec/bsdinstall/services
+OLD_FILES+=usr/libexec/bsdinstall/time
+OLD_FILES+=usr/libexec/bsdinstall/umount
+OLD_FILES+=usr/libexec/bsdinstall/wlanconfig
+OLD_FILES+=usr/libexec/bsdinstall/zfsboot
+OLD_FILES+=usr/sbin/bsdinstall
+OLD_FILES+=usr/share/man/man8/bsdinstall.8.gz
+OLD_FILES+=usr/share/man/man8/sade.8.gz
+OLD_DIRS+=usr/libexec/bsdinstall
+.endif
+
+.if ${MK_BSNMP} == no
+OLD_FILES+=etc/snmpd.config
+OLD_FILES+=etc/rc.d/bsnmpd
+OLD_FILES+=usr/bin/bsnmpget
+OLD_FILES+=usr/bin/bsnmpset
+OLD_FILES+=usr/bin/bsnmpwalk
+OLD_FILES+=usr/include/bsnmp/asn1.h
+OLD_FILES+=usr/include/bsnmp/bridge_snmp.h
+OLD_FILES+=usr/include/bsnmp/snmp.h
+OLD_FILES+=usr/include/bsnmp/snmp_atm.h
+OLD_FILES+=usr/include/bsnmp/snmp_mibII.h
+OLD_FILES+=usr/include/bsnmp/snmp_netgraph.h
+OLD_FILES+=usr/include/bsnmp/snmpagent.h
+OLD_FILES+=usr/include/bsnmp/snmpclient.h
+OLD_FILES+=usr/include/bsnmp/snmpmod.h
+OLD_FILES+=usr/lib/libbsnmp.a
+OLD_FILES+=usr/lib/libbsnmp.so
+OLD_LIBS+=usr/lib/libbsnmp.so.6
+OLD_FILES+=usr/lib/libbsnmp_p.a
+OLD_FILES+=usr/lib/libbsnmptools.a
+OLD_FILES+=usr/lib/libbsnmptools.so
+OLD_LIBS+=usr/lib/libbsnmptools.so.0
+OLD_FILES+=usr/lib/libbsnmptools_p.a
+OLD_FILES+=usr/lib/snmp_atm.so
+OLD_LIBS+=usr/lib/snmp_atm.so.6
+OLD_FILES+=usr/lib/snmp_bridge.so
+OLD_LIBS+=usr/lib/snmp_bridge.so.6
+OLD_FILES+=usr/lib/snmp_hast.so
+OLD_LIBS+=usr/lib/snmp_hast.so.6
+OLD_FILES+=usr/lib/snmp_hostres.so
+OLD_LIBS+=usr/lib/snmp_hostres.so.6
+OLD_FILES+=usr/lib/snmp_lm75.so
+OLD_LIBS+=usr/lib/snmp_lm75.so.6
+OLD_FILES+=usr/lib/snmp_mibII.so
+OLD_LIBS+=usr/lib/snmp_mibII.so.6
+OLD_FILES+=usr/lib/snmp_netgraph.so
+OLD_LIBS+=usr/lib/snmp_netgraph.so.6
+OLD_FILES+=usr/lib/snmp_pf.so
+OLD_LIBS+=usr/lib/snmp_pf.so.6
+OLD_FILES+=usr/lib/snmp_target.so
+OLD_LIBS+=usr/lib/snmp_target.so.6
+OLD_FILES+=usr/lib/snmp_usm.so
+OLD_LIBS+=usr/lib/snmp_usm.so.6
+OLD_FILES+=usr/lib/snmp_vacm.so
+OLD_LIBS+=usr/lib/snmp_vacm.so.6
+OLD_FILES+=usr/lib/snmp_wlan.so
+OLD_LIBS+=usr/lib/snmp_wlan.so.6
+OLD_FILES+=usr/lib32/libbsnmp.a
+OLD_FILES+=usr/lib32/libbsnmp.so
+OLD_LIBS+=usr/lib32/libbsnmp.so.6
+OLD_FILES+=usr/lib32/libbsnmp_p.a
+OLD_FILES+=usr/sbin/bsnmpd
+OLD_FILES+=usr/sbin/gensnmptree
+OLD_FILES+=usr/share/examples/etc/snmpd.config
+OLD_FILES+=usr/share/man/man1/bsnmpd.1.gz
+OLD_FILES+=usr/share/man/man1/bsnmpget.1.gz
+OLD_FILES+=usr/share/man/man1/bsnmpset.1.gz
+OLD_FILES+=usr/share/man/man1/bsnmpwalk.1.gz
+OLD_FILES+=usr/share/man/man1/gensnmptree.1.gz
+OLD_FILES+=usr/share/man/man3/asn1.3.gz
+OLD_FILES+=usr/share/man/man3/bsnmpagent.3.gz
+OLD_FILES+=usr/share/man/man3/bsnmpclient.3.gz
+OLD_FILES+=usr/share/man/man3/bsnmplib.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_bridge.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_hast.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_hostres.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_lm75.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_mibII.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_netgraph.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_target.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_usm.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_vacm.3.gz
+OLD_FILES+=usr/share/man/man3/snmp_wlan.3.gz
+OLD_FILES+=usr/share/man/man3/snmpmod.3.gz
+OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def
+OLD_FILES+=usr/share/snmp/defs/atm_tree.def
+OLD_FILES+=usr/share/snmp/defs/bridge_tree.def
+OLD_FILES+=usr/share/snmp/defs/hast_tree.def
+OLD_FILES+=usr/share/snmp/defs/hostres_tree.def
+OLD_FILES+=usr/share/snmp/defs/lm75_tree.def
+OLD_FILES+=usr/share/snmp/defs/mibII_tree.def
+OLD_FILES+=usr/share/snmp/defs/netgraph_tree.def
+OLD_FILES+=usr/share/snmp/defs/pf_tree.def
+OLD_FILES+=usr/share/snmp/defs/target_tree.def
+OLD_FILES+=usr/share/snmp/defs/tree.def
+OLD_FILES+=usr/share/snmp/defs/usm_tree.def
+OLD_FILES+=usr/share/snmp/defs/vacm_tree.def
+OLD_FILES+=usr/share/snmp/defs/wlan_tree.def
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-BRIDGE-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HAST-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-HOSTRES-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-IP-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-LM75-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-MIB2-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-NETGRAPH.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-SNMPD.txt
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-WIRELESS-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/BRIDGE-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/FOKUS-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/FREEBSD-MIB.txt
+OLD_FILES+=usr/share/snmp/mibs/RSTP-MIB.txt
+OLD_DIRS+=usr/include/bsnmp
+OLD_DIRS+=usr/share/snmp
+OLD_DIRS+=usr/share/snmp/defs
+OLD_DIRS+=usr/share/snmp/mibs
+.endif
.if ${MK_CALENDAR} == no
OLD_FILES+=etc/periodic/daily/300.calendar
@@ -359,10 +640,64 @@ OLD_FILES+=usr/share/man/man1/calendar.1.gz
.endif
.if ${MK_CASPER} == no
+OLD_FILES+=etc/casper/system.dns
+OLD_FILES+=etc/casper/system.grp
+OLD_FILES+=etc/casper/system.pwd
+OLD_FILES+=etc/casper/system.random
+OLD_FILES+=etc/casper/system.sysctl
OLD_FILES+=etc/rc.d/casperd
+OLD_LIBS+=lib/libcapsicum.so.0
OLD_LIBS+=lib/libcasper.so.0
+OLD_FILES+=libexec/casper/dns
+OLD_FILES+=libexec/casper/grp
+OLD_FILES+=libexec/casper/pwd
+OLD_FILES+=libexec/casper/random
+OLD_FILES+=libexec/casper/sysctl
OLD_FILES+=sbin/casper
+OLD_FILES+=sbin/casperd
+OLD_FILES+=usr/include/libcapsicum.h
+OLD_FILES+=usr/include/libcapsicum_dns.h
+OLD_FILES+=usr/include/libcapsicum_grp.h
+OLD_FILES+=usr/include/libcapsicum_pwd.h
+OLD_FILES+=usr/include/libcapsicum_random.h
+OLD_FILES+=usr/include/libcapsicum_service.h
+OLD_FILES+=usr/include/libcapsicum_sysctl.h
+OLD_FILES+=usr/include/libcasper.h
+OLD_FILES+=usr/lib/libcapsicum.a
+OLD_FILES+=usr/lib/libcapsicum.so
+OLD_FILES+=usr/lib/libcapsicum_p.a
OLD_FILES+=usr/lib/libcasper.a
+OLD_FILES+=usr/lib/libcasper.so
+OLD_FILES+=usr/lib/libcasper_p.a
+OLD_FILES+=usr/lib32/libcapsicum.a
+OLD_FILES+=usr/lib32/libcapsicum.so
+OLD_LIBS+=usr/lib32/libcapsicum.so.0
+OLD_FILES+=usr/lib32/libcapsicum_p.a
+OLD_FILES+=usr/lib32/libcasper.a
+OLD_FILES+=usr/lib32/libcasper.so
+OLD_LIBS+=usr/lib32/libcasper.so.0
+OLD_FILES+=usr/lib32/libcasper_p.a
+OLD_FILES+=usr/share/man/man3/cap_clone.3.gz
+OLD_FILES+=usr/share/man/man3/cap_close.3.gz
+OLD_FILES+=usr/share/man/man3/cap_init.3.gz
+OLD_FILES+=usr/share/man/man3/cap_limit_get.3.gz
+OLD_FILES+=usr/share/man/man3/cap_limit_set.3.gz
+OLD_FILES+=usr/share/man/man3/cap_recv_nvlist.3.gz
+OLD_FILES+=usr/share/man/man3/cap_send_nvlist.3.gz
+OLD_FILES+=usr/share/man/man3/cap_service_open.3.gz
+OLD_FILES+=usr/share/man/man3/cap_sock.3.gz
+OLD_FILES+=usr/share/man/man3/cap_unwrap.3.gz
+OLD_FILES+=usr/share/man/man3/cap_wrap.3.gz
+OLD_FILES+=usr/share/man/man3/cap_xfer_nvlist.3.gz
+OLD_FILES+=usr/share/man/man3/libcapsicum.3.gz
+OLD_FILES+=usr/share/man/man8/casperd.8.gz
+.endif
+
+.if ${MK_CCD} == no
+OLD_FILES+=etc/rc.d/ccd
+OLD_FILES+=sbin/ccdconfig
+OLD_FILES+=usr/share/man/man4/ccd.4.gz
+OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz
.endif
.if ${MK_CDDL} == no
@@ -388,7 +723,6 @@ OLD_FILES+=usr/lib/dtrace/signal.d
OLD_FILES+=usr/lib/dtrace/tcp.d
OLD_FILES+=usr/lib/dtrace/udp.d
OLD_FILES+=usr/lib/dtrace/unistd.d
-OLD_DIRS+=usr/lib/dtrace
OLD_FILES+=usr/lib/libavl.a
OLD_FILES+=usr/lib/libavl.so
OLD_FILES+=usr/lib/libavl_p.a
@@ -409,7 +743,6 @@ OLD_FILES+=usr/lib/libuutil.so
OLD_FILES+=usr/lib/libuutil_p.a
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_FILES+=usr/lib32/dtrace/drti.o
-OLD_DIRS+=usr/lib32/dtrace
OLD_FILES+=usr/lib32/libavl.a
OLD_FILES+=usr/lib32/libavl.so
OLD_LIBS+=usr/lib32/libavl.so.2
@@ -435,9 +768,28 @@ OLD_FILES+=usr/lib32/libuutil.so
OLD_LIBS+=usr/lib32/libuutil.so.2
OLD_FILES+=usr/lib32/libuutil_p.a
.endif
+OLD_LIBS+=lib/libdtrace.so.2
OLD_FILES+=usr/sbin/dtrace
OLD_FILES+=usr/sbin/lockstat
OLD_FILES+=usr/share/man/man1/dtrace.1.gz
+OLD_FILES+=usr/share/dtrace/disklatency
+OLD_FILES+=usr/share/dtrace/disklatencycmd
+OLD_FILES+=usr/share/dtrace/hotopen
+OLD_FILES+=usr/share/dtrace/nfsclienttime
+OLD_FILES+=usr/share/dtrace/toolkit/execsnoop
+OLD_FILES+=usr/share/dtrace/toolkit/hotkernel
+OLD_FILES+=usr/share/dtrace/toolkit/hotuser
+OLD_FILES+=usr/share/dtrace/toolkit/opensnoop
+OLD_FILES+=usr/share/dtrace/toolkit/procsystime
+OLD_FILES+=usr/share/dtrace/tcpconn
+OLD_FILES+=usr/share/dtrace/tcpstate
+OLD_FILES+=usr/share/dtrace/tcptrack
+OLD_FILES+=usr/share/dtrace/udptrack
+OLD_FILES+=usr/share/man/man1/dtrace.1.gz
+OLD_DIRS+=usr/lib/dtrace
+OLD_DIRS+=usr/lib32/dtrace
+OLD_DIRS+=usr/share/dtrace/toolkit
+OLD_DIRS+=usr/share/dtrace
.endif
.if ${MK_ZFS} == no
@@ -489,42 +841,67 @@ OLD_FILES+=usr/bin/clang++
OLD_FILES+=usr/bin/clang-cpp
OLD_FILES+=usr/bin/clang-tblgen
OLD_FILES+=usr/bin/tblgen
-OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_aes.h
-OLD_FILES+=usr/include/clang/3.4.1/__wmmintrin_pclmul.h
-OLD_FILES+=usr/include/clang/3.4.1/altivec.h
-OLD_FILES+=usr/include/clang/3.4.1/ammintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/arm_neon.h
-OLD_FILES+=usr/include/clang/3.4.1/avx2intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/avxintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/bmi2intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/bmiintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/cpuid.h
-OLD_FILES+=usr/include/clang/3.4.1/emmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/f16cintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/fma4intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/fmaintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/immintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/lzcntintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/mm3dnow.h
-OLD_FILES+=usr/include/clang/3.4.1/mm_malloc.h
-OLD_FILES+=usr/include/clang/3.4.1/mmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/module.map
-OLD_FILES+=usr/include/clang/3.4.1/nmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/pmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/popcntintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/prfchwintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/rdseedintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/rtmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/shaintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/smmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/tbmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/tmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/wmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/x86intrin.h
-OLD_FILES+=usr/include/clang/3.4.1/xmmintrin.h
-OLD_FILES+=usr/include/clang/3.4.1/xopintrin.h
-OLD_DIRS+=usr/include/clang/3.4.1
-OLD_DIRS+=usr/include/clang
+OLD_FILES+=usr/lib/clang/3.6.0/include/__stddef_max_align_t.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_aes.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_pclmul.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/adxintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/altivec.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/ammintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/arm_acle.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/arm_neon.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx2intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512bwintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512erintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512fintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlbwintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avx512vlintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/avxintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/bmi2intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/bmiintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/cpuid.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/emmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/f16cintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/fma4intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/fmaintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/ia32intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/immintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/lzcntintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/mm3dnow.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/mm_malloc.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/mmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/module.modulemap
+OLD_FILES+=usr/lib/clang/3.6.0/include/nmmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/pmmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/popcntintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/prfchwintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/rdseedintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/rtmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/shaintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/smmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/tbmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/tmmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/wmmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/x86intrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/xmmintrin.h
+OLD_FILES+=usr/lib/clang/3.6.0/include/xopintrin.h
+OLD_DIRS+=usr/lib/clang/3.6.0/include
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan-x86_64.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-arm.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-i386.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.san-i386.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.san-x86_64.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan-i386.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan-x86_64.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a
+OLD_FILES+=usr/lib/clang/3.6.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a
+OLD_DIRS+=usr/lib/clang/3.6.0/lib/freebsd
+OLD_DIRS+=usr/lib/clang/3.6.0/lib
+OLD_DIRS+=usr/lib/clang/3.6.0
+OLD_DIRS+=usr/lib/clang
OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT
OLD_DIRS+=usr/share/doc/llvm/clang
OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex
@@ -546,13 +923,12 @@ OLD_FILES+=usr/bin/llvm-bcanalyzer
OLD_FILES+=usr/bin/llvm-diff
OLD_FILES+=usr/bin/llvm-dis
OLD_FILES+=usr/bin/llvm-extract
-OLD_FILES+=usr/bin/llvm-ld
OLD_FILES+=usr/bin/llvm-link
OLD_FILES+=usr/bin/llvm-mc
OLD_FILES+=usr/bin/llvm-nm
OLD_FILES+=usr/bin/llvm-objdump
OLD_FILES+=usr/bin/llvm-rtdyld
-OLD_FILES+=usr/bin/llvm-stub
+OLD_FILES+=usr/bin/llvm-symbolizer
OLD_FILES+=usr/bin/macho-dump
OLD_FILES+=usr/bin/opt
OLD_FILES+=usr/share/man/man1/bugpoint.1.gz
@@ -564,9 +940,9 @@ OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz
OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz
OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz
OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-ld.1.gz
OLD_FILES+=usr/share/man/man1/llvm-link.1.gz
OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz
OLD_FILES+=usr/share/man/man1/opt.1.gz
.endif
@@ -591,18 +967,52 @@ OLD_FILES+=usr/share/man/man1/ctm_smail.1.gz
OLD_FILES+=usr/share/man/man5/ctm.5.gz
.endif
+.if ${MK_CUSE} == no
+OLD_FILES+=usr/include/fs/cuse/cuse_defs.h
+OLD_FILES+=usr/include/fs/cuse/cuse_ioctl.h
+OLD_FILES+=usr/include/cuse.h
+OLD_FILES+=usr/lib/libcuse.a
+OLD_LIBS+=usr/lib/libcuse.so.1
+OLD_FILES+=usr/lib/libcuse_p.a
+OLD_FILES+=usr/share/man/man3/cuse.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_alloc_unit_number.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_alloc_unit_number_by_id.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_copy_in.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_copy_out.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_create.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_destroy.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_get_current.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_get_per_file_handle.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_get_priv0.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_get_priv1.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_set_per_file_handle.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_set_priv0.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_dev_set_priv1.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_free_unit_number.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_free_unit_number_by_id.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_get_local.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_got_peer_signal.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_init.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_is_vmalloc_addr.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_poll_wakeup.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_set_local.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_uninit.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_vmalloc.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_vmfree.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_vmoffset.3.gz
+OLD_FILES+=usr/share/man/man3/cuse_wait_and_process.3.gz
+OLD_DIRS+=usr/include/fs/cuse
+.endif
+
# devd(8) not listed here on purpose
.if ${MK_CXX} == no
OLD_FILES+=usr/bin/CC
OLD_FILES+=usr/bin/c++
+.if ${MK_ELFTOOLCHAIN_TOOLS} == no
OLD_FILES+=usr/bin/c++filt
+.endif
OLD_FILES+=usr/bin/g++
OLD_FILES+=usr/libexec/cc1plus
-.if ${MK_GCC} == no
-OLD_FILES+=usr/bin/gperf
-OLD_FILES+=usr/share/info/gperf.info.gz
-OLD_FILES+=usr/share/man/man1/gperf.1.gz
-.endif
.endif
.if ${MK_FMTREE} == no
@@ -1198,6 +1608,36 @@ OLD_FILES+=usr/share/dict/words
OLD_DIRS+=usr/share/dict
.endif
+.if ${MK_DMAGENT} == no
+OLD_FILES+=etc/dma/dma.conf
+OLD_FILES+=usr/libexec/dma
+OLD_FILES+=usr/libexec/dma-mbox-create
+OLD_FILES+=usr/share/man/man8/dma.8.gz
+OLD_FILES+=usr/share/examples/dma/mailer.conf
+.endif
+
+.if ${MK_EE} == no
+OLD_FILES+=usr/bin/edit
+OLD_FILES+=usr/bin/ee
+OLD_FILES+=usr/bin/ree
+OLD_FILES+=usr/share/man/man1/edit.1.gz
+OLD_FILES+=usr/share/man/man1/ee.1.gz
+OLD_FILES+=usr/share/man/man1/ree.1.gz
+OLD_FILES+=usr/share/nls/C/ee.cat
+OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/ee.cat
+OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/ee.cat
+OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat
+OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat
+.endif
+
+.if ${MK_ELFTOOLCHAIN_TOOLS} == no
+OLD_FILES+=usr/bin/elfcopy
+OLD_FILES+=usr/share/man/man1/elfcopy.1.gz
+.endif
+
#.if ${MK_EXAMPLES} == no
# to be filled in
#.endif
@@ -1213,6 +1653,19 @@ OLD_FILES+=usr/share/man/man1/fdwrite.1.gz
OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz
.endif
+.if ${MK_FORTH} == no
+OLD_FILES+=usr/share/man/man5/loader.conf.5.gz
+OLD_FILES+=usr/share/man/man8/beastie.4th.8.gz
+OLD_FILES+=usr/share/man/man8/brand.4th.8.gz
+OLD_FILES+=usr/share/man/man8/check-password.4th.8.gz
+OLD_FILES+=usr/share/man/man8/color.4th.8.gz
+OLD_FILES+=usr/share/man/man8/delay.4th.8.gz
+OLD_FILES+=usr/share/man/man8/loader.4th.8.gz
+OLD_FILES+=usr/share/man/man8/menu.4th.8.gz
+OLD_FILES+=usr/share/man/man8/menusets.4th.8.gz
+OLD_FILES+=usr/share/man/man8/version.4th.8.gz
+.endif
+
.if ${MK_FREEBSD_UPDATE} == no
OLD_FILES+=etc/freebsd-update.conf
OLD_FILES+=usr/sbin/freebsd-update
@@ -1222,21 +1675,18 @@ OLD_FILES+=usr/share/man/man8/freebsd-update.8.gz
.endif
.if ${MK_GAMES} == no
-OLD_FILES+=usr/games/bcd
-OLD_FILES+=usr/games/caesar
-OLD_FILES+=usr/games/factor
-OLD_FILES+=usr/games/fortune
-OLD_FILES+=usr/games/grdc
-OLD_FILES+=usr/games/morse
-OLD_FILES+=usr/games/number
-OLD_FILES+=usr/games/pom
-OLD_FILES+=usr/games/ppt
-OLD_FILES+=usr/games/primes
-OLD_FILES+=usr/games/random
-OLD_FILES+=usr/games/rot13
-OLD_FILES+=usr/games/strfile
-OLD_FILES+=usr/games/unstr
-OLD_DIRS+=usr/games
+OLD_FILES+=usr/bin/caesar
+OLD_FILES+=usr/bin/factor
+OLD_FILES+=usr/bin/fortune
+OLD_FILES+=usr/bin/grdc
+OLD_FILES+=usr/bin/morse
+OLD_FILES+=usr/bin/number
+OLD_FILES+=usr/bin/pom
+OLD_FILES+=usr/bin/primes
+OLD_FILES+=usr/bin/random
+OLD_FILES+=usr/bin/rot13
+OLD_FILES+=usr/bin/strfile
+OLD_FILES+=usr/bin/unstr
OLD_FILES+=usr/share/games/fortune/fortunes
OLD_FILES+=usr/share/games/fortune/fortunes.dat
OLD_FILES+=usr/share/games/fortune/freebsd-tips
@@ -1255,7 +1705,6 @@ OLD_FILES+=usr/share/games/fortune/zippy
OLD_FILES+=usr/share/games/fortune/zippy.dat
OLD_DIRS+=usr/share/games/fortune
OLD_DIRS+=usr/share/games
-OLD_FILES+=usr/share/man/man6/bcd.6.gz
OLD_FILES+=usr/share/man/man6/caesar.6.gz
OLD_FILES+=usr/share/man/man6/factor.6.gz
OLD_FILES+=usr/share/man/man6/fortune.6.gz
@@ -1263,7 +1712,6 @@ OLD_FILES+=usr/share/man/man6/grdc.6.gz
OLD_FILES+=usr/share/man/man6/morse.6.gz
OLD_FILES+=usr/share/man/man6/number.6.gz
OLD_FILES+=usr/share/man/man6/pom.6.gz
-OLD_FILES+=usr/share/man/man6/ppt.6.gz
OLD_FILES+=usr/share/man/man6/primes.6.gz
OLD_FILES+=usr/share/man/man6/random.6.gz
OLD_FILES+=usr/share/man/man6/rot13.6.gz
@@ -1272,11 +1720,14 @@ OLD_FILES+=usr/share/man/man8/unstr.8.gz
.endif
.if ${MK_GCC} == no
+.if ${MK_ELFTOOLCHAIN_TOOLS} == no
OLD_FILES+=usr/bin/c++filt
+.endif
OLD_FILES+=usr/bin/g++
OLD_FILES+=usr/bin/gcc
OLD_FILES+=usr/bin/gcov
OLD_FILES+=usr/bin/gcpp
+OLD_FILES+=usr/bin/gperf
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
OLD_FILES+=usr/include/gcc/4.2/__wmmintrin_aes.h
OLD_FILES+=usr/include/gcc/4.2/__wmmintrin_pclmul.h
@@ -1296,16 +1747,25 @@ OLD_FILES+=usr/include/gcc/4.2/altivec.h
OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h
OLD_FILES+=usr/include/gcc/4.2/spe.h
.endif
+OLD_FILES+=usr/include/omp.h
+OLD_FILES+=usr/lib/libgcov.a
+OLD_FILES+=usr/lib/libgomp.a
+OLD_FILES+=usr/lib/libgomp.so
+OLD_LIBS+=usr/lib/libgomp.so.1
+OLD_FILES+=usr/lib/libgomp_p.a
OLD_FILES+=usr/libexec/cc1
OLD_FILES+=usr/libexec/cc1plus
OLD_FILES+=usr/share/info/cpp.info.gz
OLD_FILES+=usr/share/info/cppinternals.info.gz
OLD_FILES+=usr/share/info/gcc.info.gz
OLD_FILES+=usr/share/info/gccint.info.gz
+OLD_FILES+=usr/share/info/gperf.info.gz
OLD_FILES+=usr/share/man/man1/g++.1.gz
OLD_FILES+=usr/share/man/man1/gcc.1.gz
OLD_FILES+=usr/share/man/man1/gcov.1.gz
OLD_FILES+=usr/share/man/man1/gcpp.1.gz
+OLD_FILES+=usr/share/man/man1/gperf.1.gz
+OLD_FILES+=usr/share/man/man1/gperf.7.gz
.endif
.if ${MK_GCOV} == no
@@ -1326,28 +1786,38 @@ OLD_FILES+=usr/share/man/man1/gdbserver.1.gz
OLD_FILES+=usr/share/man/man1/kgdb.1.gz
.endif
-.if ${MK_GPIB} == no
-OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h
-OLD_FILES+=usr/include/dev/ieee488/tnt4882.h
-OLD_FILES+=usr/include/dev/ieee488/ugpib.h
-OLD_FILES+=usr/include/dev/ieee488/upd7210.h
-OLD_DIRS+=usr/include/dev/ieee488
-OLD_FILES+=usr/include/gpib/gpib.h
-OLD_DIRS+=usr/include/gpib
-OLD_FILES+=usr/lib/libgpib.a
-OLD_FILES+=usr/lib/libgpib.so
-OLD_LIBS+=usr/lib/libgpib.so.3
-OLD_FILES+=usr/lib/libgpib_p.a
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
-OLD_FILES+=usr/lib32/libgpib.a
-OLD_FILES+=usr/lib32/libgpib.so
-OLD_LIBS+=usr/lib32/libgpib.so.3
-OLD_FILES+=usr/lib32/libgpib_p.a
-.endif
-.endif
-
.if ${MK_GPIO} == no
+OLD_FILES+=usr/include/libgpio.h
+OLD_FILES+=usr/lib/libgpio.a
+OLD_FILES+=usr/lib/libgpio.so
+OLD_LIBS+=usr/lib/libgpio.so.0
+OLD_FILES+=usr/lib/libgpio_p.a
+OLD_FILES+=usr/lib32/libgpio.a
+OLD_FILES+=usr/lib32/libgpio.so
+OLD_LIBS+=usr/lib32/libgpio.so.0
+OLD_FILES+=usr/lib32/libgpio_p.a
OLD_FILES+=usr/sbin/gpioctl
+OLD_FILES+=usr/share/man/man3/gpio.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_close.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_open.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_open_device.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_config.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_get.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_high.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_input.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_invin.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_invout.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_list.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_low.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_opendrain.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_output.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_pulldown.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_pullup.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_pulsate.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_pushpull.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_set.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_set_flags.3.gz
+OLD_FILES+=usr/share/man/man3/gpio_pin_tristate.3.gz
OLD_FILES+=usr/share/man/man8/gpioctl.8.gz
.endif
@@ -1377,12 +1847,81 @@ OLD_FILES+=usr/bin/post-grohtml
OLD_FILES+=usr/bin/pre-grohtml
OLD_FILES+=usr/bin/psroff
OLD_FILES+=usr/bin/refer
-OLD_FILES+=usr/bin/soelim
OLD_FILES+=usr/bin/tbl
OLD_FILES+=usr/bin/tfmtodit
OLD_FILES+=usr/bin/troff
OLD_FILES+=usr/bin/vgrind
OLD_FILES+=usr/libexec/vfontedpr
+OLD_FILES+=usr/share/dict/eign
+OLD_FILES+=usr/share/doc/papers/beyond43.ascii.gz
+OLD_FILES+=usr/share/doc/papers/bio.ascii.gz
+OLD_FILES+=usr/share/doc/papers/contents.ascii.gz
+OLD_FILES+=usr/share/doc/papers/devfs.ascii.gz
+OLD_FILES+=usr/share/doc/papers/diskperf.ascii.gz
+OLD_FILES+=usr/share/doc/papers/fsinterface.ascii.gz
+OLD_FILES+=usr/share/doc/papers/hwpmc.ascii.gz
+OLD_FILES+=usr/share/doc/papers/jail.ascii.gz
+OLD_FILES+=usr/share/doc/papers/kernmalloc.ascii.gz
+OLD_FILES+=usr/share/doc/papers/kerntune.ascii.gz
+OLD_FILES+=usr/share/doc/papers/malloc.ascii.gz
+OLD_FILES+=usr/share/doc/papers/newvm.ascii.gz
+OLD_FILES+=usr/share/doc/papers/releng.ascii.gz
+OLD_FILES+=usr/share/doc/papers/sysperf.ascii.gz
+OLD_FILES+=usr/share/doc/papers/timecounter.ascii.gz
+OLD_FILES+=usr/share/doc/psd/01.cacm/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/02.implement/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/03.iosys/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/04.uprog/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/05.sysman/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/06.Clang/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/12.make/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/13.rcs/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/13.rcs/rcs_func.ascii.gz
+OLD_FILES+=usr/share/doc/psd/15.yacc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/16.lex/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/17.m4/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/18.gprof/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/20.ipctut/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/21.ipc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/22.rpcgen/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/23.rpc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/24.xdr/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/25.xdrrfc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/26.rpcrfc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/27.nfsrfc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/psd/Title.ascii.gz
+OLD_FILES+=usr/share/doc/psd/contents.ascii.gz
+OLD_FILES+=usr/share/doc/smm/01.setup/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/02.config/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/03.fsck/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/04.quotas/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/05.fastfs/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/06.nfs/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/07.lpd/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/08.sendmailop/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/11.timedop/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/12.timed/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/18.net/paper.ascii.gz
+OLD_FILES+=usr/share/doc/smm/Title.ascii.gz
+OLD_FILES+=usr/share/doc/smm/contents.ascii.gz
+OLD_FILES+=usr/share/doc/usd/04.csh/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/05.dc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/06.bc/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/07.mail/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz
+OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz
+OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz
+OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/18.msdiffs/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/19.memacros/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/20.meref/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/21.troff/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/22.trofftut/paper.ascii.gz
+OLD_FILES+=usr/share/doc/usd/Title.ascii.gz
+OLD_FILES+=usr/share/doc/usd/contents.ascii.gz
OLD_FILES+=usr/share/groff_font/devX100-12/CB
OLD_FILES+=usr/share/groff_font/devX100-12/CBI
OLD_FILES+=usr/share/groff_font/devX100-12/CI
@@ -1714,7 +2253,6 @@ OLD_FILES+=usr/share/man/man1/pfbtops.1.gz
OLD_FILES+=usr/share/man/man1/pic.1.gz
OLD_FILES+=usr/share/man/man1/psroff.1.gz
OLD_FILES+=usr/share/man/man1/refer.1.gz
-OLD_FILES+=usr/share/man/man1/soelim.1.gz
OLD_FILES+=usr/share/man/man1/tbl.1.gz
OLD_FILES+=usr/share/man/man1/tfmtodit.1.gz
OLD_FILES+=usr/share/man/man1/troff.1.gz
@@ -1737,8 +2275,6 @@ OLD_FILES+=usr/share/man/man7/groff_mmse.7.gz
OLD_FILES+=usr/share/man/man7/groff_ms.7.gz
OLD_FILES+=usr/share/man/man7/groff_trace.7.gz
OLD_FILES+=usr/share/man/man7/groff_www.7.gz
-OLD_FILES+=usr/share/man/man7/man.7.gz
-OLD_FILES+=usr/share/man/man7/mdoc.7.gz
OLD_FILES+=usr/share/man/man7/mdoc.samples.7.gz
OLD_FILES+=usr/share/man/man7/me.7.gz
OLD_FILES+=usr/share/man/man7/mm.7.gz
@@ -1918,6 +2454,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz
OLD_FILES+=usr/share/man/man8/gssd.8.gz
.endif
+.if ${MK_HAST} == no
+OLD_FILES+=sbin/hastctl
+OLD_FILES+=sbin/hastd
+OLD_FILES+=usr/share/examples/hast/ucarp.sh
+OLD_FILES+=usr/share/examples/hast/ucarp_down.sh
+OLD_FILES+=usr/share/examples/hast/ucarp_up.sh
+OLD_FILES+=usr/share/examples/hast/vip-down.sh
+OLD_FILES+=usr/share/examples/hast/vip-up.sh
+OLD_FILES+=usr/share/man/man5/hast.conf.5.gz
+OLD_FILES+=usr/share/man/man8/hastctl.8.gz
+OLD_FILES+=usr/share/man/man8/hastd.8.gz
+OLD_DIRS+=usr/share/examples/hast
+.endif
+
.if ${MK_HESIOD} == no
OLD_FILES+=usr/bin/hesinfo
OLD_FILES+=usr/include/hesiod.h
@@ -1926,9 +2476,76 @@ OLD_FILES+=usr/share/man/man3/hesiod.3.gz
OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz
.endif
-#.if ${MK_HTML} == no
-# to be filled in
-#.endif
+.if ${MK_HTML} == no
+OLD_FILES+=usr/share/doc/ncurses/hackguide.html
+OLD_FILES+=usr/share/doc/ncurses/ncurses-intro.html
+OLD_FILES+=usr/share/doc/ntp/accopt.html
+OLD_FILES+=usr/share/doc/ntp/assoc.html
+OLD_FILES+=usr/share/doc/ntp/audio.html
+OLD_FILES+=usr/share/doc/ntp/authopt.html
+OLD_FILES+=usr/share/doc/ntp/build.html
+OLD_FILES+=usr/share/doc/ntp/clockopt.html
+OLD_FILES+=usr/share/doc/ntp/config.html
+OLD_FILES+=usr/share/doc/ntp/confopt.html
+OLD_FILES+=usr/share/doc/ntp/copyright.html
+OLD_FILES+=usr/share/doc/ntp/debug.html
+OLD_FILES+=usr/share/doc/ntp/driver1.html
+OLD_FILES+=usr/share/doc/ntp/driver10.html
+OLD_FILES+=usr/share/doc/ntp/driver11.html
+OLD_FILES+=usr/share/doc/ntp/driver12.html
+OLD_FILES+=usr/share/doc/ntp/driver16.html
+OLD_FILES+=usr/share/doc/ntp/driver18.html
+OLD_FILES+=usr/share/doc/ntp/driver19.html
+OLD_FILES+=usr/share/doc/ntp/driver2.html
+OLD_FILES+=usr/share/doc/ntp/driver20.html
+OLD_FILES+=usr/share/doc/ntp/driver22.html
+OLD_FILES+=usr/share/doc/ntp/driver26.html
+OLD_FILES+=usr/share/doc/ntp/driver27.html
+OLD_FILES+=usr/share/doc/ntp/driver28.html
+OLD_FILES+=usr/share/doc/ntp/driver29.html
+OLD_FILES+=usr/share/doc/ntp/driver3.html
+OLD_FILES+=usr/share/doc/ntp/driver30.html
+OLD_FILES+=usr/share/doc/ntp/driver32.html
+OLD_FILES+=usr/share/doc/ntp/driver33.html
+OLD_FILES+=usr/share/doc/ntp/driver34.html
+OLD_FILES+=usr/share/doc/ntp/driver35.html
+OLD_FILES+=usr/share/doc/ntp/driver36.html
+OLD_FILES+=usr/share/doc/ntp/driver37.html
+OLD_FILES+=usr/share/doc/ntp/driver4.html
+OLD_FILES+=usr/share/doc/ntp/driver5.html
+OLD_FILES+=usr/share/doc/ntp/driver6.html
+OLD_FILES+=usr/share/doc/ntp/driver7.html
+OLD_FILES+=usr/share/doc/ntp/driver8.html
+OLD_FILES+=usr/share/doc/ntp/driver9.html
+OLD_FILES+=usr/share/doc/ntp/extern.html
+OLD_FILES+=usr/share/doc/ntp/hints.html
+OLD_FILES+=usr/share/doc/ntp/howto.html
+OLD_FILES+=usr/share/doc/ntp/index.html
+OLD_FILES+=usr/share/doc/ntp/kern.html
+OLD_FILES+=usr/share/doc/ntp/ldisc.html
+OLD_FILES+=usr/share/doc/ntp/measure.html
+OLD_FILES+=usr/share/doc/ntp/miscopt.html
+OLD_FILES+=usr/share/doc/ntp/monopt.html
+OLD_FILES+=usr/share/doc/ntp/mx4200data.html
+OLD_FILES+=usr/share/doc/ntp/notes.html
+OLD_FILES+=usr/share/doc/ntp/ntpd.html
+OLD_FILES+=usr/share/doc/ntp/ntpdate.html
+OLD_FILES+=usr/share/doc/ntp/ntpdc.html
+OLD_FILES+=usr/share/doc/ntp/ntpq.html
+OLD_FILES+=usr/share/doc/ntp/ntptime.html
+OLD_FILES+=usr/share/doc/ntp/ntptrace.html
+OLD_FILES+=usr/share/doc/ntp/parsedata.html
+OLD_FILES+=usr/share/doc/ntp/parsenew.html
+OLD_FILES+=usr/share/doc/ntp/patches.html
+OLD_FILES+=usr/share/doc/ntp/porting.html
+OLD_FILES+=usr/share/doc/ntp/pps.html
+OLD_FILES+=usr/share/doc/ntp/prefer.html
+OLD_FILES+=usr/share/doc/ntp/quick.html
+OLD_FILES+=usr/share/doc/ntp/rdebug.html
+OLD_FILES+=usr/share/doc/ntp/refclock.html
+OLD_FILES+=usr/share/doc/ntp/release.html
+OLD_FILES+=usr/share/doc/ntp/tickadj.html
+.endif
.if ${MK_ICONV} == no
OLD_FILES+=usr/bin/iconv
@@ -1960,9 +2577,11 @@ OLD_FILES+=usr/sbin/ndp
OLD_FILES+=usr/sbin/rip6query
OLD_FILES+=usr/sbin/route6d
OLD_FILES+=usr/sbin/rrenumd
+OLD_FILES+=usr/sbin/rtadvctl
OLD_FILES+=usr/sbin/rtadvd
OLD_FILES+=usr/sbin/rtsold
OLD_FILES+=usr/sbin/traceroute6
+OLD_FILES+=usr/share/doc/IPv6/IMPLEMENTATION
OLD_FILES+=usr/share/man/man5/rrenumd.conf.5.gz
OLD_FILES+=usr/share/man/man5/rtadvd.conf.5.gz
OLD_FILES+=usr/share/man/man8/ip6addrctl.8.gz
@@ -1972,6 +2591,7 @@ OLD_FILES+=usr/share/man/man8/ping6.8.gz
OLD_FILES+=usr/share/man/man8/rip6query.8.gz
OLD_FILES+=usr/share/man/man8/route6d.8.gz
OLD_FILES+=usr/share/man/man8/rrenumd.8.gz
+OLD_FILES+=usr/share/man/man8/rtadvctl.8.gz
OLD_FILES+=usr/share/man/man8/rtadvd.8.gz
OLD_FILES+=usr/share/man/man8/rtsol.8.gz
OLD_FILES+=usr/share/man/man8/rtsold.8.gz
@@ -1982,40 +2602,6 @@ OLD_FILES+=usr/share/man/man8/traceroute6.8.gz
OLD_FILES+=rescue/ping6
.endif
-.if ${MK_INFO} == no
-OLD_FILES+=usr/bin/info
-OLD_FILES+=usr/bin/infokey
-OLD_FILES+=usr/bin/install-info
-OLD_FILES+=usr/bin/makeinfo
-OLD_FILES+=usr/bin/texindex
-OLD_FILES+=usr/share/info/am-utils.info.gz
-OLD_FILES+=usr/share/info/as-utils.info.gz
-OLD_FILES+=usr/share/info/binutils.info.gz
-OLD_FILES+=usr/share/info/com_err.info.gz
-OLD_FILES+=usr/share/info/diff.info.gz
-OLD_FILES+=usr/share/info/gdb.info.gz
-OLD_FILES+=usr/share/info/gdbint.info.gz
-OLD_FILES+=usr/share/info/gperf.info.gz
-OLD_FILES+=usr/share/info/grep.info.gz
-OLD_FILES+=usr/share/info/groff.info.gz
-OLD_FILES+=usr/share/info/heimdal.info.gz
-OLD_FILES+=usr/share/info/history.info.gz
-OLD_FILES+=usr/share/info/info-stnd.info.gz
-OLD_FILES+=usr/share/info/info.info.gz
-OLD_FILES+=usr/share/info/ld.info.gz
-OLD_FILES+=usr/share/info/regex.info.gz
-OLD_FILES+=usr/share/info/rluserman.info.gz
-OLD_FILES+=usr/share/info/stabs.info.gz
-OLD_FILES+=usr/share/info/texinfo.info.gz
-OLD_FILES+=usr/share/man/man1/info.1.gz
-OLD_FILES+=usr/share/man/man1/infokey.1.gz
-OLD_FILES+=usr/share/man/man1/install-info.1.gz
-OLD_FILES+=usr/share/man/man1/makeinfo.1.gz
-OLD_FILES+=usr/share/man/man1/texindex.1.gz
-OLD_FILES+=usr/share/man/man5/info.5.gz
-OLD_FILES+=usr/share/man/man5/texinfo.5.gz
-.endif
-
.if ${MK_IPFILTER} == no
OLD_FILES+=etc/periodic/security/510.ipfdenied
OLD_FILES+=etc/periodic/security/610.ipf6denied
@@ -2110,16 +2696,41 @@ OLD_FILES+=usr/share/man/man8/ipfwpcap.8.gz
OLD_FILES+=usr/share/man/man8/natd.8.gz
.endif
+.if ${MK_ISCSI} == no
+OLD_FILES+=etc/rc.d/iscsictl
+OLD_FILES+=etc/rc.d/iscsid
+OLD_FILES+=sbin/iscontrol
+OLD_FILES+=usr/bin/iscsictl
+OLD_FILES+=usr/sbin/iscsid
+OLD_FILES+=usr/share/man/man4/iscsi.4.gz
+OLD_FILES+=usr/share/man/man4/iscsi_initiator.4.gz
+OLD_FILES+=usr/share/man/man5/iscsi.conf.5.gz
+OLD_FILES+=usr/share/man/man8/iscontrol.8.gz
+OLD_FILES+=usr/share/man/man8/iscsictl.8.gz
+OLD_FILES+=usr/share/man/man8/iscsid.8.gz
+.endif
+
.if ${MK_JAIL} == no
+OLD_FILES+=etc/rc.d/jail
OLD_FILES+=usr/sbin/jail
OLD_FILES+=usr/sbin/jexec
OLD_FILES+=usr/sbin/jls
+OLD_FILES+=usr/share/man/man5/jail.conf.5.gz
OLD_FILES+=usr/share/man/man8/jail.8.gz
OLD_FILES+=usr/share/man/man8/jexec.8.gz
OLD_FILES+=usr/share/man/man8/jls.8.gz
.endif
+.if ${MK_KDUMP} == no
+OLD_FILES+=usr/bin/kdump
+OLD_FILES+=usr/bin/truss
+OLD_FILES+=usr/share/man/man1/kdump.1.gz
+OLD_FILES+=usr/share/man/man1/truss.1.gz
+.endif
+
.if ${MK_KERBEROS} == no
+OLD_FILES+=etc/rc.d/ipropd_master
+OLD_FILES+=etc/rc.d/ipropd_slave
OLD_FILES+=usr/bin/compile_et
OLD_FILES+=usr/bin/hxtool
OLD_FILES+=usr/bin/kadmin
@@ -3093,6 +3704,22 @@ OLD_FILES+=usr/share/man/man8/string2key.8.gz
OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz
.endif
+.if ${MK_KERBEROS_SUPPORT} == no
+OLD_FILES+=usr/bin/compile_et
+OLD_FILES+=usr/include/com_err.h
+OLD_FILES+=usr/include/com_right.h
+OLD_FILES+=usr/lib/libcom_err.a
+OLD_FILES+=usr/lib/libcom_err.so
+OLD_LIBS+=usr/lib/libcom_err.so.5
+OLD_FILES+=usr/lib/libcom_err_p.a
+OLD_FILES+=usr/lib32/libcom_err.a
+OLD_FILES+=usr/lib32/libcom_err.so
+OLD_LIBS+=usr/lib32/libcom_err.so.5
+OLD_FILES+=usr/lib32/libcom_err_p.a
+OLD_FILES+=usr/share/man/man1/compile_et.1.gz
+OLD_FILES+=usr/share/man/man3/com_err.3.gz
+.endif
+
.if ${MK_LDNS} == no
OLD_FILES+=usr/lib/private/libldns.a
OLD_FILES+=usr/lib/private/libldns.so
@@ -3113,6 +3740,21 @@ OLD_FILES+=usr/bin/host
OLD_FILES+=usr/share/man/man1/host.1.gz
.endif
+.if ${MK_LEGACY_CONSOLE} == no
+OLD_FILES+=usr/sbin/kbdcontrol
+OLD_FILES+=usr/sbin/kbdmap
+OLD_FILES+=usr/sbin/moused
+OLD_FILES+=usr/sbin/vidcontrol
+OLD_FILES+=usr/sbin/vidfont
+OLD_FILES+=usr/share/man/man1/kbdcontrol.1.gz
+OLD_FILES+=usr/share/man/man1/kbdmap.1.gz
+OLD_FILES+=usr/share/man/man1/vidcontrol.1.gz
+OLD_FILES+=usr/share/man/man1/vidfont.1.gz
+OLD_FILES+=usr/share/man/man5/kbdmap.5.gz
+OLD_FILES+=usr/share/man/man5/keymap.5.gz
+OLD_FILES+=usr/share/man/man8/moused.8.gz
+.endif
+
#.if ${MK_LIB32} == no
# to be filled in
#.endif
@@ -3135,6 +3777,7 @@ OLD_FILES+=usr/include/c++/v1/__functional_base_03
OLD_FILES+=usr/include/c++/v1/__hash_table
OLD_FILES+=usr/include/c++/v1/__locale
OLD_FILES+=usr/include/c++/v1/__mutex_base
+OLD_FILES+=usr/include/c++/v1/__refstring
OLD_FILES+=usr/include/c++/v1/__split_buffer
OLD_FILES+=usr/include/c++/v1/__sso_allocator
OLD_FILES+=usr/include/c++/v1/__std_stream
@@ -3178,8 +3821,12 @@ OLD_FILES+=usr/include/c++/v1/cwctype
OLD_FILES+=usr/include/c++/v1/cxxabi.h
OLD_FILES+=usr/include/c++/v1/deque
OLD_FILES+=usr/include/c++/v1/exception
+OLD_FILES+=usr/include/c++/v1/experimental/__config
OLD_FILES+=usr/include/c++/v1/experimental/dynarray
OLD_FILES+=usr/include/c++/v1/experimental/optional
+OLD_FILES+=usr/include/c++/v1/experimental/string_view
+OLD_FILES+=usr/include/c++/v1/experimental/type_traits
+OLD_FILES+=usr/include/c++/v1/experimental/utility
OLD_FILES+=usr/include/c++/v1/ext/__hash
OLD_FILES+=usr/include/c++/v1/ext/hash_map
OLD_FILES+=usr/include/c++/v1/ext/hash_set
@@ -3209,6 +3856,7 @@ OLD_FILES+=usr/include/c++/v1/ratio
OLD_FILES+=usr/include/c++/v1/regex
OLD_FILES+=usr/include/c++/v1/scoped_allocator
OLD_FILES+=usr/include/c++/v1/set
+OLD_FILES+=usr/include/c++/v1/shared_mutex
OLD_FILES+=usr/include/c++/v1/sstream
OLD_FILES+=usr/include/c++/v1/stack
OLD_FILES+=usr/include/c++/v1/stdexcept
@@ -3218,6 +3866,103 @@ OLD_FILES+=usr/include/c++/v1/strstream
OLD_FILES+=usr/include/c++/v1/system_error
OLD_FILES+=usr/include/c++/v1/tgmath.h
OLD_FILES+=usr/include/c++/v1/thread
+OLD_FILES+=usr/include/c++/v1/tr1/__bit_reference
+OLD_FILES+=usr/include/c++/v1/tr1/__config
+OLD_FILES+=usr/include/c++/v1/tr1/__debug
+OLD_FILES+=usr/include/c++/v1/tr1/__functional_03
+OLD_FILES+=usr/include/c++/v1/tr1/__functional_base
+OLD_FILES+=usr/include/c++/v1/tr1/__functional_base_03
+OLD_FILES+=usr/include/c++/v1/tr1/__hash_table
+OLD_FILES+=usr/include/c++/v1/tr1/__locale
+OLD_FILES+=usr/include/c++/v1/tr1/__mutex_base
+OLD_FILES+=usr/include/c++/v1/tr1/__refstring
+OLD_FILES+=usr/include/c++/v1/tr1/__split_buffer
+OLD_FILES+=usr/include/c++/v1/tr1/__sso_allocator
+OLD_FILES+=usr/include/c++/v1/tr1/__std_stream
+OLD_FILES+=usr/include/c++/v1/tr1/__tree
+OLD_FILES+=usr/include/c++/v1/tr1/__tuple
+OLD_FILES+=usr/include/c++/v1/tr1/__tuple_03
+OLD_FILES+=usr/include/c++/v1/tr1/__undef_min_max
+OLD_FILES+=usr/include/c++/v1/tr1/algorithm
+OLD_FILES+=usr/include/c++/v1/tr1/array
+OLD_FILES+=usr/include/c++/v1/tr1/atomic
+OLD_FILES+=usr/include/c++/v1/tr1/bitset
+OLD_FILES+=usr/include/c++/v1/tr1/cassert
+OLD_FILES+=usr/include/c++/v1/tr1/ccomplex
+OLD_FILES+=usr/include/c++/v1/tr1/cctype
+OLD_FILES+=usr/include/c++/v1/tr1/cerrno
+OLD_FILES+=usr/include/c++/v1/tr1/cfenv
+OLD_FILES+=usr/include/c++/v1/tr1/cfloat
+OLD_FILES+=usr/include/c++/v1/tr1/chrono
+OLD_FILES+=usr/include/c++/v1/tr1/cinttypes
+OLD_FILES+=usr/include/c++/v1/tr1/ciso646
+OLD_FILES+=usr/include/c++/v1/tr1/climits
+OLD_FILES+=usr/include/c++/v1/tr1/clocale
+OLD_FILES+=usr/include/c++/v1/tr1/cmath
+OLD_FILES+=usr/include/c++/v1/tr1/codecvt
+OLD_FILES+=usr/include/c++/v1/tr1/complex
+OLD_FILES+=usr/include/c++/v1/tr1/complex.h
+OLD_FILES+=usr/include/c++/v1/tr1/condition_variable
+OLD_FILES+=usr/include/c++/v1/tr1/csetjmp
+OLD_FILES+=usr/include/c++/v1/tr1/csignal
+OLD_FILES+=usr/include/c++/v1/tr1/cstdarg
+OLD_FILES+=usr/include/c++/v1/tr1/cstdbool
+OLD_FILES+=usr/include/c++/v1/tr1/cstddef
+OLD_FILES+=usr/include/c++/v1/tr1/cstdint
+OLD_FILES+=usr/include/c++/v1/tr1/cstdio
+OLD_FILES+=usr/include/c++/v1/tr1/cstdlib
+OLD_FILES+=usr/include/c++/v1/tr1/cstring
+OLD_FILES+=usr/include/c++/v1/tr1/ctgmath
+OLD_FILES+=usr/include/c++/v1/tr1/ctime
+OLD_FILES+=usr/include/c++/v1/tr1/cwchar
+OLD_FILES+=usr/include/c++/v1/tr1/cwctype
+OLD_FILES+=usr/include/c++/v1/tr1/deque
+OLD_FILES+=usr/include/c++/v1/tr1/exception
+OLD_FILES+=usr/include/c++/v1/tr1/forward_list
+OLD_FILES+=usr/include/c++/v1/tr1/fstream
+OLD_FILES+=usr/include/c++/v1/tr1/functional
+OLD_FILES+=usr/include/c++/v1/tr1/future
+OLD_FILES+=usr/include/c++/v1/tr1/initializer_list
+OLD_FILES+=usr/include/c++/v1/tr1/iomanip
+OLD_FILES+=usr/include/c++/v1/tr1/ios
+OLD_FILES+=usr/include/c++/v1/tr1/iosfwd
+OLD_FILES+=usr/include/c++/v1/tr1/iostream
+OLD_FILES+=usr/include/c++/v1/tr1/istream
+OLD_FILES+=usr/include/c++/v1/tr1/iterator
+OLD_FILES+=usr/include/c++/v1/tr1/limits
+OLD_FILES+=usr/include/c++/v1/tr1/list
+OLD_FILES+=usr/include/c++/v1/tr1/locale
+OLD_FILES+=usr/include/c++/v1/tr1/map
+OLD_FILES+=usr/include/c++/v1/tr1/memory
+OLD_FILES+=usr/include/c++/v1/tr1/mutex
+OLD_FILES+=usr/include/c++/v1/tr1/new
+OLD_FILES+=usr/include/c++/v1/tr1/numeric
+OLD_FILES+=usr/include/c++/v1/tr1/ostream
+OLD_FILES+=usr/include/c++/v1/tr1/queue
+OLD_FILES+=usr/include/c++/v1/tr1/random
+OLD_FILES+=usr/include/c++/v1/tr1/ratio
+OLD_FILES+=usr/include/c++/v1/tr1/regex
+OLD_FILES+=usr/include/c++/v1/tr1/scoped_allocator
+OLD_FILES+=usr/include/c++/v1/tr1/set
+OLD_FILES+=usr/include/c++/v1/tr1/shared_mutex
+OLD_FILES+=usr/include/c++/v1/tr1/sstream
+OLD_FILES+=usr/include/c++/v1/tr1/stack
+OLD_FILES+=usr/include/c++/v1/tr1/stdexcept
+OLD_FILES+=usr/include/c++/v1/tr1/streambuf
+OLD_FILES+=usr/include/c++/v1/tr1/string
+OLD_FILES+=usr/include/c++/v1/tr1/strstream
+OLD_FILES+=usr/include/c++/v1/tr1/system_error
+OLD_FILES+=usr/include/c++/v1/tr1/tgmath.h
+OLD_FILES+=usr/include/c++/v1/tr1/thread
+OLD_FILES+=usr/include/c++/v1/tr1/tuple
+OLD_FILES+=usr/include/c++/v1/tr1/type_traits
+OLD_FILES+=usr/include/c++/v1/tr1/typeindex
+OLD_FILES+=usr/include/c++/v1/tr1/typeinfo
+OLD_FILES+=usr/include/c++/v1/tr1/unordered_map
+OLD_FILES+=usr/include/c++/v1/tr1/unordered_set
+OLD_FILES+=usr/include/c++/v1/tr1/utility
+OLD_FILES+=usr/include/c++/v1/tr1/valarray
+OLD_FILES+=usr/include/c++/v1/tr1/vector
OLD_FILES+=usr/include/c++/v1/tuple
OLD_FILES+=usr/include/c++/v1/type_traits
OLD_FILES+=usr/include/c++/v1/typeindex
@@ -3230,6 +3975,14 @@ OLD_FILES+=usr/include/c++/v1/unwind.h
OLD_FILES+=usr/include/c++/v1/utility
OLD_FILES+=usr/include/c++/v1/valarray
OLD_FILES+=usr/include/c++/v1/vector
+OLD_FILES+=usr/lib32/libc++.a
+OLD_FILES+=usr/lib32/libc++.so
+OLD_LIBS+=usr/lib32/libc++.so.1
+OLD_FILES+=usr/lib32/libc++_p.a
+OLD_FILES+=usr/lib32/libcxxrt.a
+OLD_FILES+=usr/lib32/libcxxrt.so
+OLD_LIBS+=usr/lib32/libcxxrt.so.1
+OLD_FILES+=usr/lib32/libcxxrt_p.a
OLD_DIRS+=usr/include/c++/v1/experimental
OLD_DIRS+=usr/include/c++/v1/ext
OLD_DIRS+=usr/include/c++/v1
@@ -3239,9 +3992,1039 @@ OLD_DIRS+=usr/include/c++/v1
# to be filled in
#.endif
-#.if ${MK_LOCALES} == no
-# to be filled in
-#.endif
+.if ${MK_LOCALES} == no
+OLD_FILES+=usr/share/locale/UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/af_ZA.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/af_ZA.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/af_ZA.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/af_ZA.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/af_ZA.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/af_ZA.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/af_ZA.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/am_ET.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/am_ET.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/am_ET.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/am_ET.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/am_ET.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/am_ET.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/be_BY.CP1131/LC_COLLATE
+OLD_FILES+=usr/share/locale/be_BY.CP1131/LC_CTYPE
+OLD_FILES+=usr/share/locale/be_BY.CP1131/LC_MESSAGES
+OLD_FILES+=usr/share/locale/be_BY.CP1131/LC_MONETARY
+OLD_FILES+=usr/share/locale/be_BY.CP1131/LC_NUMERIC
+OLD_FILES+=usr/share/locale/be_BY.CP1131/LC_TIME
+OLD_FILES+=usr/share/locale/be_BY.CP1251/LC_COLLATE
+OLD_FILES+=usr/share/locale/be_BY.CP1251/LC_CTYPE
+OLD_FILES+=usr/share/locale/be_BY.CP1251/LC_MESSAGES
+OLD_FILES+=usr/share/locale/be_BY.CP1251/LC_MONETARY
+OLD_FILES+=usr/share/locale/be_BY.CP1251/LC_NUMERIC
+OLD_FILES+=usr/share/locale/be_BY.CP1251/LC_TIME
+OLD_FILES+=usr/share/locale/be_BY.ISO8859-5/LC_COLLATE
+OLD_FILES+=usr/share/locale/be_BY.ISO8859-5/LC_CTYPE
+OLD_FILES+=usr/share/locale/be_BY.ISO8859-5/LC_MESSAGES
+OLD_FILES+=usr/share/locale/be_BY.ISO8859-5/LC_MONETARY
+OLD_FILES+=usr/share/locale/be_BY.ISO8859-5/LC_NUMERIC
+OLD_FILES+=usr/share/locale/be_BY.ISO8859-5/LC_TIME
+OLD_FILES+=usr/share/locale/be_BY.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/be_BY.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/be_BY.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/be_BY.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/be_BY.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/be_BY.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/bg_BG.CP1251/LC_COLLATE
+OLD_FILES+=usr/share/locale/bg_BG.CP1251/LC_CTYPE
+OLD_FILES+=usr/share/locale/bg_BG.CP1251/LC_MESSAGES
+OLD_FILES+=usr/share/locale/bg_BG.CP1251/LC_MONETARY
+OLD_FILES+=usr/share/locale/bg_BG.CP1251/LC_NUMERIC
+OLD_FILES+=usr/share/locale/bg_BG.CP1251/LC_TIME
+OLD_FILES+=usr/share/locale/bg_BG.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/bg_BG.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/bg_BG.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/bg_BG.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/bg_BG.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/bg_BG.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_AD.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/ca_AD.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_AD.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_AD.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_AD.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_AD.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_AD.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_ES.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/ca_ES.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_ES.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_ES.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_ES.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_ES.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_ES.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_FR.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/ca_FR.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_FR.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_FR.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_FR.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_FR.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_FR.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_IT.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/ca_IT.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ca_IT.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ca_IT.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ca_IT.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ca_IT.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ca_IT.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/cs_CZ.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/cs_CZ.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/cs_CZ.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/cs_CZ.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/cs_CZ.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/cs_CZ.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/cs_CZ.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/cs_CZ.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/cs_CZ.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/cs_CZ.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/cs_CZ.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/cs_CZ.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/da_DK.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/da_DK.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/da_DK.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/da_DK.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/da_DK.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/da_DK.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/da_DK.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_AT.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/de_AT.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_AT.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_AT.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_AT.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_AT.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_AT.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_CH.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/de_CH.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_CH.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_CH.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_CH.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_CH.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_CH.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_DE.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/de_DE.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/de_DE.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/de_DE.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/de_DE.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/de_DE.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/de_DE.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/el_GR.ISO8859-7/LC_COLLATE
+OLD_FILES+=usr/share/locale/el_GR.ISO8859-7/LC_CTYPE
+OLD_FILES+=usr/share/locale/el_GR.ISO8859-7/LC_MESSAGES
+OLD_FILES+=usr/share/locale/el_GR.ISO8859-7/LC_MONETARY
+OLD_FILES+=usr/share/locale/el_GR.ISO8859-7/LC_NUMERIC
+OLD_FILES+=usr/share/locale/el_GR.ISO8859-7/LC_TIME
+OLD_FILES+=usr/share/locale/el_GR.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/el_GR.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/el_GR.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/el_GR.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/el_GR.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/el_GR.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_AU.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/en_AU.US-ASCII/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_AU.US-ASCII/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_AU.US-ASCII/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_AU.US-ASCII/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_AU.US-ASCII/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_AU.US-ASCII/LC_TIME
+OLD_FILES+=usr/share/locale/en_AU.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_AU.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_AU.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_AU.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_AU.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_AU.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_CA.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/en_CA.US-ASCII/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_CA.US-ASCII/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_CA.US-ASCII/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_CA.US-ASCII/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_CA.US-ASCII/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_CA.US-ASCII/LC_TIME
+OLD_FILES+=usr/share/locale/en_CA.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_CA.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_CA.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_CA.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_CA.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_CA.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_GB.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/en_GB.US-ASCII/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_GB.US-ASCII/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_GB.US-ASCII/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_GB.US-ASCII/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_GB.US-ASCII/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_GB.US-ASCII/LC_TIME
+OLD_FILES+=usr/share/locale/en_GB.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_GB.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_GB.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_GB.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_GB.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_GB.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/en_IE.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_IE.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_IE.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_IE.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_IE.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_IE.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_NZ.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/en_NZ.US-ASCII/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_NZ.US-ASCII/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_NZ.US-ASCII/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_NZ.US-ASCII/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_NZ.US-ASCII/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_NZ.US-ASCII/LC_TIME
+OLD_FILES+=usr/share/locale/en_NZ.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_NZ.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_NZ.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_NZ.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_NZ.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_NZ.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/en_US.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_US.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_US.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_US.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_US.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_US.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_US.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/en_US.US-ASCII/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_US.US-ASCII/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_US.US-ASCII/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_US.US-ASCII/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_US.US-ASCII/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_US.US-ASCII/LC_TIME
+OLD_FILES+=usr/share/locale/en_US.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/en_US.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/en_US.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/en_US.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/en_US.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/en_US.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/es_ES.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/es_ES.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/es_ES.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/es_ES.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/es_ES.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/es_ES.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/es_ES.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/et_EE.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/et_EE.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/et_EE.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/et_EE.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/et_EE.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/et_EE.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/et_EE.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/et_EE.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/et_EE.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/et_EE.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/et_EE.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/et_EE.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/eu_ES.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/eu_ES.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/eu_ES.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/eu_ES.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/eu_ES.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/eu_ES.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/eu_ES.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fi_FI.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/fi_FI.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/fi_FI.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/fi_FI.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fi_FI.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/fi_FI.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fi_FI.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_BE.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/fr_BE.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_BE.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_BE.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_BE.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_BE.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_BE.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_CA.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/fr_CA.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_CA.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_CA.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_CA.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_CA.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_CA.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_CH.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/fr_CH.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_CH.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_CH.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_CH.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_CH.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_CH.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_FR.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/fr_FR.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/fr_FR.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/fr_FR.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/fr_FR.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/fr_FR.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/fr_FR.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/he_IL.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/he_IL.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/he_IL.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/he_IL.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/he_IL.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/he_IL.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/hi_IN.ISCII-DEV/LC_COLLATE
+OLD_FILES+=usr/share/locale/hi_IN.ISCII-DEV/LC_CTYPE
+OLD_FILES+=usr/share/locale/hi_IN.ISCII-DEV/LC_MESSAGES
+OLD_FILES+=usr/share/locale/hi_IN.ISCII-DEV/LC_MONETARY
+OLD_FILES+=usr/share/locale/hi_IN.ISCII-DEV/LC_NUMERIC
+OLD_FILES+=usr/share/locale/hi_IN.ISCII-DEV/LC_TIME
+OLD_FILES+=usr/share/locale/hr_HR.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/hr_HR.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/hr_HR.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/hr_HR.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/hr_HR.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/hr_HR.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/hr_HR.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/hr_HR.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/hr_HR.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/hr_HR.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/hr_HR.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/hr_HR.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/hu_HU.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/hu_HU.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/hu_HU.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/hu_HU.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/hu_HU.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/hu_HU.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/hu_HU.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/hu_HU.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/hu_HU.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/hu_HU.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/hu_HU.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/hu_HU.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/hy_AM.ARMSCII-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/hy_AM.ARMSCII-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/hy_AM.ARMSCII-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/hy_AM.ARMSCII-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/hy_AM.ARMSCII-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/hy_AM.ARMSCII-8/LC_TIME
+OLD_FILES+=usr/share/locale/hy_AM.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/hy_AM.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/hy_AM.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/hy_AM.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/hy_AM.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/hy_AM.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/is_IS.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/is_IS.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/is_IS.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/is_IS.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/is_IS.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/is_IS.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/is_IS.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/it_CH.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/it_CH.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/it_CH.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/it_CH.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/it_CH.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/it_CH.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/it_CH.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/it_IT.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/it_IT.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/it_IT.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/it_IT.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/it_IT.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/it_IT.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/it_IT.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ja_JP.SJIS/LC_COLLATE
+OLD_FILES+=usr/share/locale/ja_JP.SJIS/LC_CTYPE
+OLD_FILES+=usr/share/locale/ja_JP.SJIS/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ja_JP.SJIS/LC_MONETARY
+OLD_FILES+=usr/share/locale/ja_JP.SJIS/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ja_JP.SJIS/LC_TIME
+OLD_FILES+=usr/share/locale/ja_JP.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ja_JP.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ja_JP.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ja_JP.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ja_JP.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ja_JP.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ja_JP.eucJP/LC_COLLATE
+OLD_FILES+=usr/share/locale/ja_JP.eucJP/LC_CTYPE
+OLD_FILES+=usr/share/locale/ja_JP.eucJP/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ja_JP.eucJP/LC_MONETARY
+OLD_FILES+=usr/share/locale/ja_JP.eucJP/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ja_JP.eucJP/LC_TIME
+OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_COLLATE
+OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_CTYPE
+OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MESSAGES
+OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_MONETARY
+OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_NUMERIC
+OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_TIME
+OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ko_KR.CP949/LC_COLLATE
+OLD_FILES+=usr/share/locale/ko_KR.CP949/LC_CTYPE
+OLD_FILES+=usr/share/locale/ko_KR.CP949/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ko_KR.CP949/LC_MONETARY
+OLD_FILES+=usr/share/locale/ko_KR.CP949/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ko_KR.CP949/LC_TIME
+OLD_FILES+=usr/share/locale/ko_KR.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ko_KR.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ko_KR.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ko_KR.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ko_KR.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ko_KR.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ko_KR.eucKR/LC_COLLATE
+OLD_FILES+=usr/share/locale/ko_KR.eucKR/LC_CTYPE
+OLD_FILES+=usr/share/locale/ko_KR.eucKR/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ko_KR.eucKR/LC_MONETARY
+OLD_FILES+=usr/share/locale/ko_KR.eucKR/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ko_KR.eucKR/LC_TIME
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_COLLATE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-13/LC_CTYPE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_COLLATE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_CTYPE
+OLD_FILES+=usr/share/locale/la_LN.ISO8859-4/LC_TIME
+OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_COLLATE
+OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_CTYPE
+OLD_FILES+=usr/share/locale/la_LN.US-ASCII/LC_TIME
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-13/LC_COLLATE
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-13/LC_CTYPE
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-13/LC_MESSAGES
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-13/LC_MONETARY
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-13/LC_NUMERIC
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-13/LC_TIME
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_COLLATE
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_CTYPE
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_MESSAGES
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_MONETARY
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_NUMERIC
+OLD_FILES+=usr/share/locale/lt_LT.ISO8859-4/LC_TIME
+OLD_FILES+=usr/share/locale/lt_LT.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/lt_LT.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/lt_LT.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/lt_LT.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/lt_LT.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/lt_LT.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/lv_LV.ISO8859-13/LC_COLLATE
+OLD_FILES+=usr/share/locale/lv_LV.ISO8859-13/LC_CTYPE
+OLD_FILES+=usr/share/locale/lv_LV.ISO8859-13/LC_MESSAGES
+OLD_FILES+=usr/share/locale/lv_LV.ISO8859-13/LC_MONETARY
+OLD_FILES+=usr/share/locale/lv_LV.ISO8859-13/LC_NUMERIC
+OLD_FILES+=usr/share/locale/lv_LV.ISO8859-13/LC_TIME
+OLD_FILES+=usr/share/locale/lv_LV.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/lv_LV.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/lv_LV.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/lv_LV.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/lv_LV.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/lv_LV.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/mn_MN.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nb_NO.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/nb_NO.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/nb_NO.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/nb_NO.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nb_NO.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/nb_NO.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nb_NO.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nl_BE.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/nl_BE.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/nl_BE.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/nl_BE.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nl_BE.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/nl_BE.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nl_BE.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nl_NL.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/nl_NL.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/nl_NL.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/nl_NL.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nl_NL.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/nl_NL.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nl_NL.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nn_NO.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/nn_NO.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/nn_NO.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/nn_NO.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/nn_NO.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/nn_NO.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/nn_NO.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/no_NO.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/no_NO.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/pl_PL.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/pl_PL.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/pl_PL.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/pl_PL.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/pl_PL.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/pl_PL.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/pl_PL.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/pl_PL.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/pl_PL.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/pl_PL.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/pl_PL.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/pl_PL.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/pt_BR.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/pt_BR.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/pt_BR.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/pt_BR.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/pt_BR.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/pt_BR.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/pt_BR.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/pt_BR.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/pt_BR.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/pt_BR.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/pt_BR.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/pt_BR.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/pt_PT.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/pt_PT.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/pt_PT.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/pt_PT.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/pt_PT.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/pt_PT.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/pt_PT.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ro_RO.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/ro_RO.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/ro_RO.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ro_RO.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/ro_RO.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ro_RO.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/ro_RO.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ro_RO.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ro_RO.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ro_RO.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ro_RO.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ro_RO.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/ru_RU.CP1251/LC_COLLATE
+OLD_FILES+=usr/share/locale/ru_RU.CP1251/LC_CTYPE
+OLD_FILES+=usr/share/locale/ru_RU.CP1251/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ru_RU.CP1251/LC_MONETARY
+OLD_FILES+=usr/share/locale/ru_RU.CP1251/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ru_RU.CP1251/LC_TIME
+OLD_FILES+=usr/share/locale/ru_RU.CP866/LC_COLLATE
+OLD_FILES+=usr/share/locale/ru_RU.CP866/LC_CTYPE
+OLD_FILES+=usr/share/locale/ru_RU.CP866/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ru_RU.CP866/LC_MONETARY
+OLD_FILES+=usr/share/locale/ru_RU.CP866/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ru_RU.CP866/LC_TIME
+OLD_FILES+=usr/share/locale/ru_RU.ISO8859-5/LC_COLLATE
+OLD_FILES+=usr/share/locale/ru_RU.ISO8859-5/LC_CTYPE
+OLD_FILES+=usr/share/locale/ru_RU.ISO8859-5/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ru_RU.ISO8859-5/LC_MONETARY
+OLD_FILES+=usr/share/locale/ru_RU.ISO8859-5/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ru_RU.ISO8859-5/LC_TIME
+OLD_FILES+=usr/share/locale/ru_RU.KOI8-R/LC_COLLATE
+OLD_FILES+=usr/share/locale/ru_RU.KOI8-R/LC_CTYPE
+OLD_FILES+=usr/share/locale/ru_RU.KOI8-R/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ru_RU.KOI8-R/LC_MONETARY
+OLD_FILES+=usr/share/locale/ru_RU.KOI8-R/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ru_RU.KOI8-R/LC_TIME
+OLD_FILES+=usr/share/locale/ru_RU.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/ru_RU.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/ru_RU.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/ru_RU.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/ru_RU.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/ru_RU.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/sk_SK.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/sk_SK.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/sk_SK.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sk_SK.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/sk_SK.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sk_SK.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/sk_SK.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/sk_SK.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/sk_SK.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sk_SK.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/sk_SK.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sk_SK.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/sl_SI.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/sl_SI.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/sl_SI.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sl_SI.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/sl_SI.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sl_SI.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/sl_SI.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/sl_SI.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/sl_SI.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sl_SI.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/sl_SI.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sl_SI.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_COLLATE
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_CTYPE
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_MONETARY
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-2/LC_TIME
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_COLLATE
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_CTYPE
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_MONETARY
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sr_YU.ISO8859-5/LC_TIME
+OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-1/LC_COLLATE
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-1/LC_CTYPE
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-1/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-1/LC_MONETARY
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-1/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-1/LC_TIME
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-15/LC_COLLATE
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-15/LC_CTYPE
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-15/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-15/LC_MONETARY
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-15/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sv_SE.ISO8859-15/LC_TIME
+OLD_FILES+=usr/share/locale/sv_SE.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/sv_SE.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/sv_SE.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/sv_SE.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/sv_SE.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/sv_SE.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/tr_TR.ISO8859-9/LC_COLLATE
+OLD_FILES+=usr/share/locale/tr_TR.ISO8859-9/LC_CTYPE
+OLD_FILES+=usr/share/locale/tr_TR.ISO8859-9/LC_MESSAGES
+OLD_FILES+=usr/share/locale/tr_TR.ISO8859-9/LC_MONETARY
+OLD_FILES+=usr/share/locale/tr_TR.ISO8859-9/LC_NUMERIC
+OLD_FILES+=usr/share/locale/tr_TR.ISO8859-9/LC_TIME
+OLD_FILES+=usr/share/locale/tr_TR.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/tr_TR.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/tr_TR.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/tr_TR.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/tr_TR.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/tr_TR.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/uk_UA.CP1251/LC_COLLATE
+OLD_FILES+=usr/share/locale/uk_UA.CP1251/LC_CTYPE
+OLD_FILES+=usr/share/locale/uk_UA.CP1251/LC_MESSAGES
+OLD_FILES+=usr/share/locale/uk_UA.CP1251/LC_MONETARY
+OLD_FILES+=usr/share/locale/uk_UA.CP1251/LC_NUMERIC
+OLD_FILES+=usr/share/locale/uk_UA.CP1251/LC_TIME
+OLD_FILES+=usr/share/locale/uk_UA.ISO8859-5/LC_COLLATE
+OLD_FILES+=usr/share/locale/uk_UA.ISO8859-5/LC_CTYPE
+OLD_FILES+=usr/share/locale/uk_UA.ISO8859-5/LC_MESSAGES
+OLD_FILES+=usr/share/locale/uk_UA.ISO8859-5/LC_MONETARY
+OLD_FILES+=usr/share/locale/uk_UA.ISO8859-5/LC_NUMERIC
+OLD_FILES+=usr/share/locale/uk_UA.ISO8859-5/LC_TIME
+OLD_FILES+=usr/share/locale/uk_UA.KOI8-U/LC_COLLATE
+OLD_FILES+=usr/share/locale/uk_UA.KOI8-U/LC_CTYPE
+OLD_FILES+=usr/share/locale/uk_UA.KOI8-U/LC_MESSAGES
+OLD_FILES+=usr/share/locale/uk_UA.KOI8-U/LC_MONETARY
+OLD_FILES+=usr/share/locale/uk_UA.KOI8-U/LC_NUMERIC
+OLD_FILES+=usr/share/locale/uk_UA.KOI8-U/LC_TIME
+OLD_FILES+=usr/share/locale/uk_UA.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/uk_UA.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/uk_UA.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/uk_UA.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/uk_UA.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/uk_UA.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/zh_CN.GB18030/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_CN.GB18030/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_CN.GB18030/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_CN.GB18030/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_CN.GB18030/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_CN.GB18030/LC_TIME
+OLD_FILES+=usr/share/locale/zh_CN.GB2312/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_CN.GB2312/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_CN.GB2312/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_CN.GB2312/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_CN.GB2312/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_CN.GB2312/LC_TIME
+OLD_FILES+=usr/share/locale/zh_CN.GBK/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_CN.GBK/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_CN.GBK/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_CN.GBK/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_CN.GBK/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_CN.GBK/LC_TIME
+OLD_FILES+=usr/share/locale/zh_CN.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_CN.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_CN.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_CN.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_CN.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_CN.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/zh_CN.eucCN/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_CN.eucCN/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_CN.eucCN/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_CN.eucCN/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_CN.eucCN/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_CN.eucCN/LC_TIME
+OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_HK.Big5HKSCS/LC_TIME
+OLD_FILES+=usr/share/locale/zh_HK.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_HK.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_HK.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_HK.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_HK.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_HK.UTF-8/LC_TIME
+OLD_FILES+=usr/share/locale/zh_TW.Big5/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_TW.Big5/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_TW.Big5/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_TW.Big5/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_TW.Big5/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_TW.Big5/LC_TIME
+OLD_FILES+=usr/share/locale/zh_TW.UTF-8/LC_COLLATE
+OLD_FILES+=usr/share/locale/zh_TW.UTF-8/LC_CTYPE
+OLD_FILES+=usr/share/locale/zh_TW.UTF-8/LC_MESSAGES
+OLD_FILES+=usr/share/locale/zh_TW.UTF-8/LC_MONETARY
+OLD_FILES+=usr/share/locale/zh_TW.UTF-8/LC_NUMERIC
+OLD_FILES+=usr/share/locale/zh_TW.UTF-8/LC_TIME
+OLD_FILES+=usr/tests/lib/libc/locale/Kyuafile
+OLD_FILES+=usr/tests/lib/libc/locale/io_test
+OLD_FILES+=usr/tests/lib/libc/locale/mbrtowc_test
+OLD_FILES+=usr/tests/lib/libc/locale/mbsnrtowcs_test
+OLD_FILES+=usr/tests/lib/libc/locale/mbstowcs_test
+OLD_FILES+=usr/tests/lib/libc/locale/mbtowc_test
+OLD_FILES+=usr/tests/lib/libc/locale/wcscspn_test
+OLD_FILES+=usr/tests/lib/libc/locale/wcspbrk_test
+OLD_FILES+=usr/tests/lib/libc/locale/wcsspn_test
+OLD_FILES+=usr/tests/lib/libc/locale/wcstod_test
+OLD_FILES+=usr/tests/lib/libc/locale/wctomb_test
+.endif
.if ${MK_LOCATE} == no
OLD_FILES+=etc/locate.rc
@@ -3260,6 +5043,7 @@ OLD_FILES+=usr/share/man/man8/updatedb.8.gz
.if ${MK_LPR} == no
OLD_FILES+=etc/hosts.lpd
OLD_FILES+=etc/printcap
+OLD_FILES+=etc/rc.d/lpd
OLD_FILES+=usr/bin/lp
OLD_FILES+=usr/bin/lpq
OLD_FILES+=usr/bin/lpr
@@ -3292,6 +5076,10 @@ OLD_FILES+=usr/share/man/man8/pac.8.gz
.endif
.if ${MK_MAIL} == no
+OLD_FILES+=etc/aliases
+OLD_FILES+=etc/mail.rc
+OLD_FILES+=etc/mail/aliases
+OLD_FILES+=etc/mail/mailer.conf
OLD_FILES+=etc/periodic/daily/130.clean-msgs
OLD_FILES+=usr/bin/Mail
OLD_FILES+=usr/bin/biff
@@ -3320,10 +5108,401 @@ OLD_FILES+=usr/sbin/mailwrapper
OLD_FILES+=usr/share/man/man8/mailwrapper.8.gz
.endif
-#.if ${MK_MAN} == no
-# This should add a dependency to a special target which removes all man pages.
-# Listing all of them here is overkill.
-#.endif
+.if ${MK_MAKE} == no
+OLD_FILES+=usr/bin/make
+OLD_FILES+=usr/share/man/man1/make.1.gz
+OLD_FILES+=usr/share/mk/atf.test.mk
+OLD_FILES+=usr/share/mk/bsd.README
+OLD_FILES+=usr/share/mk/bsd.arch.inc.mk
+OLD_FILES+=usr/share/mk/bsd.compiler.mk
+OLD_FILES+=usr/share/mk/bsd.cpu.mk
+OLD_FILES+=usr/share/mk/bsd.crunchgen.mk
+OLD_FILES+=usr/share/mk/bsd.dep.mk
+OLD_FILES+=usr/share/mk/bsd.doc.mk
+OLD_FILES+=usr/share/mk/bsd.dtb.mk
+OLD_FILES+=usr/share/mk/bsd.endian.mk
+OLD_FILES+=usr/share/mk/bsd.files.mk
+OLD_FILES+=usr/share/mk/bsd.incs.mk
+OLD_FILES+=usr/share/mk/bsd.info.mk
+OLD_FILES+=usr/share/mk/bsd.init.mk
+OLD_FILES+=usr/share/mk/bsd.kmod.mk
+OLD_FILES+=usr/share/mk/bsd.lib.mk
+OLD_FILES+=usr/share/mk/bsd.libnames.mk
+OLD_FILES+=usr/share/mk/bsd.links.mk
+OLD_FILES+=usr/share/mk/bsd.man.mk
+OLD_FILES+=usr/share/mk/bsd.mkopt.mk
+OLD_FILES+=usr/share/mk/bsd.nls.mk
+OLD_FILES+=usr/share/mk/bsd.obj.mk
+OLD_FILES+=usr/share/mk/bsd.opts.mk
+OLD_FILES+=usr/share/mk/bsd.own.mk
+OLD_FILES+=usr/share/mk/bsd.port.mk
+OLD_FILES+=usr/share/mk/bsd.port.options.mk
+OLD_FILES+=usr/share/mk/bsd.port.post.mk
+OLD_FILES+=usr/share/mk/bsd.port.pre.mk
+OLD_FILES+=usr/share/mk/bsd.port.subdir.mk
+OLD_FILES+=usr/share/mk/bsd.prog.mk
+OLD_FILES+=usr/share/mk/bsd.progs.mk
+OLD_FILES+=usr/share/mk/bsd.snmpmod.mk
+OLD_FILES+=usr/share/mk/bsd.subdir.mk
+OLD_FILES+=usr/share/mk/bsd.symver.mk
+OLD_FILES+=usr/share/mk/bsd.sys.mk
+OLD_FILES+=usr/share/mk/bsd.test.mk
+OLD_FILES+=usr/share/mk/plain.test.mk
+OLD_FILES+=usr/share/mk/suite.test.mk
+OLD_FILES+=usr/share/mk/sys.mk
+OLD_FILES+=usr/share/mk/tap.test.mk
+OLD_FILES+=usr/share/mk/version_gen.awk
+OLD_FILES+=usr/tests/usr.bin/bmake/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.status.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.status.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.status.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.status.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.status.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stderr.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stderr.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stderr.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stderr.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stderr.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stdout.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stdout.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stdout.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stdout.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/expected.stdout.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd/libtest.a
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.status.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.status.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.status.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.status.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.status.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stderr.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stderr.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stderr.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stderr.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stderr.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stdout.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stdout.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stdout.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stdout.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/expected.stdout.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_44bsd_mod/libtest.a
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.status.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.status.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.status.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.status.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.status.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stderr.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stderr.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stderr.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stderr.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stderr.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stdout.3
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stdout.4
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stdout.5
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stdout.6
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/expected.stdout.7
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/archives/fmt_oldbsd/libtest.a
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t0/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t0/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t0/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t0/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t0/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t1/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t1/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t1/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t1/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t1/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t1/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t2/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t2/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t2/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t2/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t2/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t2/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t3/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t3/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t3/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t3/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/basic/t3/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/common.sh
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/ellipsis/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/ellipsis/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/ellipsis/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/ellipsis/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/ellipsis/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/ellipsis/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/empty/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/empty/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/empty/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/empty/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/empty/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/empty/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/joberr/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/joberr/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/joberr/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/joberr/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/joberr/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/joberr/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/plus/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/plus/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/plus/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/plus/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/plus/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/execution/plus/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/builtin/sh
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/meta/sh
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path/sh
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/path_select/shell
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/replace/shell
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/shell/select/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/basic/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/basic/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/basic/TEST1.a
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/basic/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/basic/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/basic/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/basic/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/TEST1.a
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/TEST2.a
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild1/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/TEST1.a
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/TEST2.a
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/suffixes/src_wild2/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/directive-t0/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/directive-t0/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/directive-t0/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/directive-t0/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/directive-t0/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/directive-t0/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.status.3
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.status.4
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.status.5
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stderr.3
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stderr.4
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stderr.5
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stdout.3
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stdout.4
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/expected.stdout.5
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/enl/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/funny-targets/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/syntax/semi/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/2/1/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/2/1/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/2/1/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/2/1/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/2/1/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/2/1/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/2/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/mk/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t0/mk/sys.mk
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/2/1/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/2/1/cleanup
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/2/1/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/2/1/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/2/1/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/2/1/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/2/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/mk/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t1/mk/sys.mk
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/2/1/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/2/1/cleanup
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/2/1/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/2/1/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/2/1/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/2/1/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/2/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/mk/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/sysmk/t2/mk/sys.mk
+OLD_FILES+=usr/tests/usr.bin/bmake/test-new.mk
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_M/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_M/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_M/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_M/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_M/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_M/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.status.3
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.stderr.3
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/expected.stdout.3
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/modifier_t/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/expected.status.2
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/expected.stderr.2
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/expected.stdout.2
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/opt_V/legacy_test
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/t0/Kyuafile
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/t0/Makefile.test
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/t0/expected.status.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/t0/expected.stderr.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/t0/expected.stdout.1
+OLD_FILES+=usr/tests/usr.bin/bmake/variables/t0/legacy_test
+.endif
+
+.if ${MK_MAN} == no
+MAN_FILES!=find ${DESTDIR}/usr/share/man ${DESTDIR}/usr/share/openssl/man -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${MAN_FILES}
+.endif
+
+.if ${MK_MAN_UTILS} == no
+OLD_FILES+=etc/periodic/weekly/320.whatis
+OLD_FILES+=etc/periodic/weekly/330.catman
+OLD_FILES+=usr/bin/apropos
+OLD_FILES+=usr/bin/catman
+OLD_FILES+=usr/bin/makewhatis
+OLD_FILES+=usr/bin/man
+OLD_FILES+=usr/bin/manpath
+OLD_FILES+=usr/bin/whatis
+OLD_FILES+=usr/libexec/catman.local
+OLD_FILES+=usr/libexec/makewhatis.local
+OLD_FILES+=usr/sbin/manctl
+OLD_FILES+=usr/share/man/man1/apropos.1.gz
+OLD_FILES+=usr/share/man/man1/catman.1.gz
+OLD_FILES+=usr/share/man/man1/makewhatis.1.gz
+OLD_FILES+=usr/share/man/man1/man.1.gz
+OLD_FILES+=usr/share/man/man1/manpath.1.gz
+OLD_FILES+=usr/share/man/man1/whatis.1.gz
+OLD_FILES+=usr/share/man/man5/man.conf.5.gz
+OLD_FILES+=usr/share/man/man8/catman.local.8.gz
+OLD_FILES+=usr/share/man/man8/makewhatis.local.8.gz
+OLD_FILES+=usr/share/man/man8/manctl.8.gz
+OLD_FILES+=usr/share/man/whatis
+OLD_FILES+=usr/share/openssl/man/whatis
+.endif
.if ${MK_NDIS} == no
OLD_FILES+=usr/sbin/ndiscvt
@@ -3338,6 +5517,52 @@ OLD_FILES+=usr/bin/nc
OLD_FILES+=usr/share/man/man1/nc.1.gz
.endif
+.if ${MK_NETGRAPH} == no
+OLD_FILES+=usr/include/netgraph.h
+OLD_FILES+=usr/lib/libnetgraph.a
+OLD_FILES+=usr/lib/libnetgraph.so
+OLD_LIBS+=usr/lib/libnetgraph.so.4
+OLD_FILES+=usr/lib/libnetgraph_p.a
+OLD_FILES+=usr/lib32/libnetgraph.a
+OLD_FILES+=usr/lib32/libnetgraph.so
+OLD_LIBS+=usr/lib32/libnetgraph.so.4
+OLD_FILES+=usr/lib32/libnetgraph_p.a
+OLD_FILES+=usr/libexec/pppoed
+OLD_FILES+=usr/sbin/flowctl
+OLD_FILES+=usr/sbin/lmcconfig
+OLD_FILES+=usr/sbin/ngctl
+OLD_FILES+=usr/sbin/nghook
+OLD_FILES+=usr/share/man/man3/NgAllocRecvAsciiMsg.3.gz
+OLD_FILES+=usr/share/man/man3/NgAllocRecvData.3.gz
+OLD_FILES+=usr/share/man/man3/NgAllocRecvMsg.3.gz
+OLD_FILES+=usr/share/man/man3/NgMkSockNode.3.gz
+OLD_FILES+=usr/share/man/man3/NgNameNode.3.gz
+OLD_FILES+=usr/share/man/man3/NgRecvAsciiMsg.3.gz
+OLD_FILES+=usr/share/man/man3/NgRecvData.3.gz
+OLD_FILES+=usr/share/man/man3/NgRecvMsg.3.gz
+OLD_FILES+=usr/share/man/man3/NgSendAsciiMsg.3.gz
+OLD_FILES+=usr/share/man/man3/NgSendData.3.gz
+OLD_FILES+=usr/share/man/man3/NgSendMsg.3.gz
+OLD_FILES+=usr/share/man/man3/NgSendMsgReply.3.gz
+OLD_FILES+=usr/share/man/man3/NgSetDebug.3.gz
+OLD_FILES+=usr/share/man/man3/NgSetErrLog.3.gz
+OLD_FILES+=usr/share/man/man3/netgraph.3.gz
+OLD_FILES+=usr/share/man/man8/flowctl.8.gz
+OLD_FILES+=usr/share/man/man8/lmcconfig.8.gz
+OLD_FILES+=usr/share/man/man8/ngctl.8.gz
+OLD_FILES+=usr/share/man/man8/nghook.8.gz
+OLD_FILES+=usr/share/man/man8/pppoed.8.gz
+.endif
+
+.if ${MK_NETGRAPH_SUPPORT} == no
+OLD_FILES+=usr/include/bsnmp/snmp_netgraph.h
+OLD_FILES+=usr/lib/snmp_netgraph.so
+OLD_LIBS+=usr/lib/snmp_netgraph.so.6
+OLD_FILES+=usr/share/man/man3/snmp_netgraph.3.gz
+OLD_FILES+=usr/share/snmp/defs/netgraph_tree.def
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-NETGRAPH.txt
+.endif
+
.if ${MK_NIS} == no
OLD_FILES+=usr/bin/ypcat
OLD_FILES+=usr/bin/ypchfn
@@ -3394,8 +5619,148 @@ OLD_FILES+=var/yp/Makefile.dist
.endif
.if ${MK_NLS} == no
+OLD_FILES+=usr/share/nls/C/ee.cat
+OLD_FILES+=usr/share/nls/be_BY.UTF-8/libc.cat
+OLD_FILES+=usr/share/nls/ca_ES.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/de_AT.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/de_AT.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/de_AT.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/de_AT.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/de_AT.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/de_CH.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/de_CH.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/de_CH.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/de_CH.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/de_CH.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/de_DE.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/de_DE.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/de_DE.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/el_GR.ISO8859-7/libc.cat
+OLD_FILES+=usr/share/nls/el_GR.ISO8859-7/tcsh.cat
+OLD_FILES+=usr/share/nls/el_GR.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/en_US.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/en_US.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/es_ES.ISO8859-1/grep.cat
+OLD_FILES+=usr/share/nls/es_ES.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/es_ES.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/es_ES.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/es_ES.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/et_EE.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/et_EE.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fi_FI.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/fi_FI.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/fi_FI.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/fi_FI.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_BE.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/fr_BE.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_BE.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/fr_BE.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_BE.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CA.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/fr_CA.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CA.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/fr_CA.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CA.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CH.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/fr_CH.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CH.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/fr_CH.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CH.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_FR.ISO8859-15/ee.cat
+OLD_FILES+=usr/share/nls/fr_FR.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_FR.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/gl_ES.ISO8859-1/grep.cat
+OLD_FILES+=usr/share/nls/gl_ES.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/ee.cat
+OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/grep.cat
+OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/libc.cat
+OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/sort.cat
+OLD_FILES+=usr/share/nls/it_CH.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/it_CH.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/it_CH.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/it_IT.ISO8859-1/tcsh.cat
+OLD_FILES+=usr/share/nls/it_IT.ISO8859-15/libc.cat
+OLD_FILES+=usr/share/nls/it_IT.ISO8859-15/tcsh.cat
+OLD_FILES+=usr/share/nls/it_IT.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/ja_JP.SJIS/grep.cat
+OLD_FILES+=usr/share/nls/ja_JP.SJIS/tcsh.cat
+OLD_FILES+=usr/share/nls/ja_JP.UTF-8/grep.cat
+OLD_FILES+=usr/share/nls/ja_JP.UTF-8/libc.cat
+OLD_FILES+=usr/share/nls/ja_JP.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/ja_JP.eucJP/grep.cat
+OLD_FILES+=usr/share/nls/ja_JP.eucJP/libc.cat
+OLD_FILES+=usr/share/nls/ja_JP.eucJP/tcsh.cat
+OLD_FILES+=usr/share/nls/ko_KR.UTF-8/libc.cat
+OLD_FILES+=usr/share/nls/ko_KR.eucKR/libc.cat
+OLD_FILES+=usr/share/nls/mn_MN.UTF-8/libc.cat
+OLD_FILES+=usr/share/nls/nl_NL.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/no_NO.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/ee.cat
+OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/libc.cat
+OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/grep.cat
+OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/pt_PT.ISO8859-1/ee.cat
+OLD_FILES+=usr/share/nls/ru_RU.CP1251/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.CP866/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.ISO8859-5/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat
+OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/grep.cat
+OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/libc.cat
+OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/sk_SK.ISO8859-2/libc.cat
+OLD_FILES+=usr/share/nls/sv_SE.ISO8859-1/libc.cat
+OLD_FILES+=usr/share/nls/uk_UA.ISO8859-5/tcsh.cat
+OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat
+OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/tcsh.cat
+OLD_FILES+=usr/share/nls/uk_UA.UTF-8/grep.cat
+OLD_FILES+=usr/share/nls/uk_UA.UTF-8/libc.cat
+OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/zh_CN.GB18030/libc.cat
+OLD_FILES+=usr/share/nls/zh_CN.GB2312/libc.cat
+OLD_FILES+=usr/share/nls/zh_CN.UTF-8/grep.cat
+OLD_FILES+=usr/share/nls/zh_CN.UTF-8/libc.cat
OLD_FILES+=usr/tests/bin/sh/builtins/locale1.0
-# to be filled in
+.endif
+
+.if ${MK_NLS_CATALOGS} == no
+OLD_FILES+=usr/share/nls/de_AT.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/de_CH.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/de_DE.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/el_GR.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/es_ES.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/et_EE.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fi_FI.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_BE.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CA.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_CH.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/fr_FR.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/it_CH.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/it_IT.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/ja_JP.SJIS/tcsh.cat
+OLD_FILES+=usr/share/nls/ja_JP.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.CP1251/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.CP866/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.ISO8859-5/tcsh.cat
+OLD_FILES+=usr/share/nls/ru_RU.UTF-8/tcsh.cat
+OLD_FILES+=usr/share/nls/uk_UA.ISO8859-5/tcsh.cat
+OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcsh.cat
+.endif
+
+.if ${MK_NS_CACHING} == no
+OLD_FILES+=etc/nscd.conf
+OLD_FILES+=etc/rc.d/nscd
+OLD_FILES+=usr/sbin/nscd
+OLD_FILES+=usr/share/examples/etc/nscd.conf
+OLD_FILES+=usr/share/man/man5/nscd.conf.5.gz
+OLD_FILES+=usr/share/man/man8/nscd.8.gz
.endif
.if ${MK_NTP} == no
@@ -3476,6 +5841,7 @@ OLD_FILES+=usr/share/doc/ntp/release.html
OLD_FILES+=usr/share/doc/ntp/tickadj.html
OLD_DIRS+=usr/share/doc/ntp
OLD_FILES+=usr/share/examples/etc/ntp.conf
+OLD_FILES+=usr/share/man/man1/sntp.1.gz
OLD_FILES+=usr/share/man/man5/ntp.conf.5.gz
OLD_FILES+=usr/share/man/man5/ntp.keys.5.gz
OLD_FILES+=usr/share/man/man8/ntp-keygen.8.gz
@@ -3491,18 +5857,28 @@ OLD_FILES+=usr/share/man/man8/ntptime.8.gz
#.endif
.if ${MK_OPENSSH} == no
+OLD_FILES+=etc/rc.d/sshd
+OLD_FILES+=etc/ssh/moduli
+OLD_FILES+=etc/ssh/ssh_config
+OLD_FILES+=etc/ssh/sshd_config
+OLD_FILES+=usr/bin/scp
OLD_FILES+=usr/bin/sftp
+OLD_FILES+=usr/bin/slogin
OLD_FILES+=usr/bin/ssh
OLD_FILES+=usr/bin/ssh-add
OLD_FILES+=usr/bin/ssh-agent
OLD_FILES+=usr/bin/ssh-copy-id
OLD_FILES+=usr/bin/ssh-keygen
OLD_FILES+=usr/bin/ssh-keyscan
+OLD_FILES+=usr/lib/pam_ssh.so
+OLD_LIBS+=usr/lib/pam_ssh.so.5
OLD_FILES+=usr/lib/private/libssh.a
OLD_FILES+=usr/lib/private/libssh.so
OLD_LIBS+=usr/lib/private/libssh.so.5
OLD_FILES+=usr/lib/private/libssh_p.a
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
+OLD_FILES+=usr/lib32/pam_ssh.so
+OLD_LIBS+=usr/lib32/pam_ssh.so.5
OLD_FILES+=usr/lib32/private/libssh.a
OLD_FILES+=usr/lib32/private/libssh.so
OLD_LIBS+=usr/lib32/private/libssh.so.5
@@ -3512,6 +5888,22 @@ OLD_FILES+=usr/libexec/sftp-server
OLD_FILES+=usr/libexec/ssh-keysign
OLD_FILES+=usr/libexec/ssh-pkcs11-helper
OLD_FILES+=usr/sbin/sshd
+OLD_FILES+=usr/share/man/man1/scp.1.gz
+OLD_FILES+=usr/share/man/man1/sftp.1.gz
+OLD_FILES+=usr/share/man/man1/slogin.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-add.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-agent.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-copy-id.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-keygen.1.gz
+OLD_FILES+=usr/share/man/man1/ssh-keyscan.1.gz
+OLD_FILES+=usr/share/man/man1/ssh.1.gz
+OLD_FILES+=usr/share/man/man5/ssh_config.5.gz
+OLD_FILES+=usr/share/man/man5/sshd_config.5.gz
+OLD_FILES+=usr/share/man/man8/pam_ssh.8.gz
+OLD_FILES+=usr/share/man/man8/sftp-server.8.gz
+OLD_FILES+=usr/share/man/man8/ssh-keysign.8.gz
+OLD_FILES+=usr/share/man/man8/ssh-pkcs11-helper.8.gz
+OLD_FILES+=usr/share/man/man8/sshd.8.gz
.endif
.if ${MK_OPENSSL} == no
@@ -3613,6 +6005,11 @@ OLD_FILES+=etc/pf.os
OLD_FILES+=etc/rc.d/ftp-proxy
OLD_FILES+=sbin/pfctl
OLD_FILES+=sbin/pflogd
+OLD_FILES+=usr/include/netpfil/pf/pf.h
+OLD_FILES+=usr/include/netpfil/pf/pf_altq.h
+OLD_FILES+=usr/include/netpfil/pf/pf_mtag.h
+OLD_FILES+=usr/lib/snmp_pf.so
+OLD_LIBS+=usr/lib/snmp_pf.so.6
OLD_FILES+=usr/libexec/tftp-proxy
OLD_FILES+=usr/sbin/ftp-proxy
OLD_FILES+=usr/share/examples/etc/pf.os
@@ -3636,6 +6033,8 @@ OLD_FILES+=usr/share/man/man8/ftp-proxy.8.gz
OLD_FILES+=usr/share/man/man8/pfctl.8.gz
OLD_FILES+=usr/share/man/man8/pflogd.8.gz
OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz
+OLD_FILES+=usr/share/snmp/defs/pf_tree.def
+OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt
.endif
.if ${MK_PKGBOOTSTRAP} == no
@@ -3643,12 +6042,99 @@ OLD_FILES+=usr/sbin/pkg
OLD_FILES+=usr/share/man/man7/pkg.7.gz
.endif
+.if ${MK_PMC} == no
+OLD_FILES+=usr/bin/pmcstudy
+OLD_FILES+=usr/include/pmc.h
+OLD_FILES+=usr/include/pmclog.h
+OLD_FILES+=usr/lib/libpmc.a
+OLD_FILES+=usr/lib/libpmc.so
+OLD_LIBS+=usr/lib/libpmc.so.5
+OLD_FILES+=usr/lib/libpmc_p.a
+OLD_FILES+=usr/lib32/libpmc.a
+OLD_FILES+=usr/lib32/libpmc.so
+OLD_LIBS+=usr/lib32/libpmc.so.5
+OLD_FILES+=usr/lib32/libpmc_p.a
+OLD_FILES+=usr/sbin/pmcannotate
+OLD_FILES+=usr/sbin/pmccontrol
+OLD_FILES+=usr/sbin/pmcstat
+OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz
+OLD_FILES+=usr/share/man/man3/pmc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.atom.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.atomsilvermont.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.core.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.core2.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.corei7.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.corei7uc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.haswell.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.haswelluc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.iaf.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.ivybridge.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.ivybridgexeon.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.k7.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.k8.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.mips24k.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.octeon.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.p4.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.p5.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.p6.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.sandybridge.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.sandybridgeuc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.sandybridgexeon.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.soft.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.tsc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.ucf.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.westmere.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.westmereuc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc.xscale.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_allocate.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_attach.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_capabilities.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_configure_logfile.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_cpuinfo.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_detach.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_disable.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_enable.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_event_names_of_class.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_flush_logfile.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_get_driver_stats.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_get_msr.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_init.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_name_of_capability.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_name_of_class.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_name_of_cputype.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_name_of_disposition.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_name_of_event.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_name_of_mode.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_name_of_state.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_ncpu.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_npmc.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_pmcinfo.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_read.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_release.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_rw.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_set.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_start.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_stop.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_width.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_write.3.gz
+OLD_FILES+=usr/share/man/man3/pmc_writelog.3.gz
+OLD_FILES+=usr/share/man/man3/pmclog.3.gz
+OLD_FILES+=usr/share/man/man3/pmclog_close.3.gz
+OLD_FILES+=usr/share/man/man3/pmclog_feed.3.gz
+OLD_FILES+=usr/share/man/man3/pmclog_open.3.gz
+OLD_FILES+=usr/share/man/man3/pmclog_read.3.gz
+OLD_FILES+=usr/share/man/man8/pmcannotate.8.gz
+OLD_FILES+=usr/share/man/man8/pmccontrol.8.gz
+OLD_FILES+=usr/share/man/man8/pmcstat.8.gz
+.endif
+
.if ${MK_PORTSNAP} == no
OLD_FILES+=etc/portsnap.conf
OLD_FILES+=usr/libexec/make_index
OLD_FILES+=usr/libexec/phttpget
OLD_FILES+=usr/sbin/portsnap
OLD_FILES+=usr/share/examples/etc/portsnap.conf
+OLD_FILES+=usr/share/man/man8/phttpget.8.gz
OLD_FILES+=usr/share/man/man8/portsnap.8.gz
.endif
@@ -3700,7 +6186,6 @@ OLD_FILES+=usr/lib/libformw_p.a
OLD_FILES+=usr/lib/libgcc_p.a
OLD_FILES+=usr/lib/libgeom_p.a
OLD_FILES+=usr/lib/libgnuregex_p.a
-OLD_FILES+=usr/lib/libgpib_p.a
OLD_FILES+=usr/lib/libgssapi_krb5_p.a
OLD_FILES+=usr/lib/libgssapi_p.a
OLD_FILES+=usr/lib/libhdb_p.a
@@ -3769,6 +6254,21 @@ OLD_FILES+=usr/lib/private/libldns_p.a
OLD_FILES+=usr/lib/private/libssh_p.a
.endif
+.if ${MK_QUOTAS} == no
+OLD_FILES+=sbin/quotacheck
+OLD_FILES+=usr/bin/quota
+OLD_FILES+=usr/sbin/edquota
+OLD_FILES+=usr/sbin/quotaoff
+OLD_FILES+=usr/sbin/quotaon
+OLD_FILES+=usr/sbin/repquota
+OLD_FILES+=usr/share/man/man1/quota.1.gz
+OLD_FILES+=usr/share/man/man8/edquota.8.gz
+OLD_FILES+=usr/share/man/man8/quotacheck.8.gz
+OLD_FILES+=usr/share/man/man8/quotaoff.8.gz
+OLD_FILES+=usr/share/man/man8/quotaon.8.gz
+OLD_FILES+=usr/share/man/man8/repquota.8.gz
+.endif
+
.if ${MK_RCMDS} == no
OLD_FILES+=bin/rcp
OLD_FILES+=etc/rc.d/rwho
@@ -4072,15 +6572,247 @@ OLD_FILES+=usr/share/doc/pjdfstest/README
OLD_DIRS+=usr/share/doc/pjdfstest
.endif
-#.if ${MK_SYSCONS} == no
-# to be filled in
-#.endif
+.if ${MK_SSP} == no
+OLD_LIBS+=lib/libssp.so.0
+OLD_FILES+=usr/include/ssp/ssp.h
+OLD_FILES+=usr/include/ssp/stdio.h
+OLD_FILES+=usr/include/ssp/string.h
+OLD_FILES+=usr/include/ssp/unistd.h
+OLD_FILES+=usr/lib/libssp.a
+OLD_FILES+=usr/lib/libssp.so
+OLD_FILES+=usr/lib/libssp_nonshared.a
+OLD_FILES+=usr/lib32/libssp.a
+OLD_FILES+=usr/lib32/libssp.so
+OLD_LIBS+=usr/lib32/libssp.so.0
+OLD_FILES+=usr/lib32/libssp_nonshared.a
+OLD_FILES+=usr/tests/lib/libc/ssp/Kyuafile
+OLD_FILES+=usr/tests/lib/libc/ssp/h_fgets
+OLD_FILES+=usr/tests/lib/libc/ssp/h_getcwd
+OLD_FILES+=usr/tests/lib/libc/ssp/h_gets
+OLD_FILES+=usr/tests/lib/libc/ssp/h_memcpy
+OLD_FILES+=usr/tests/lib/libc/ssp/h_memmove
+OLD_FILES+=usr/tests/lib/libc/ssp/h_memset
+OLD_FILES+=usr/tests/lib/libc/ssp/h_read
+OLD_FILES+=usr/tests/lib/libc/ssp/h_readlink
+OLD_FILES+=usr/tests/lib/libc/ssp/h_snprintf
+OLD_FILES+=usr/tests/lib/libc/ssp/h_sprintf
+OLD_FILES+=usr/tests/lib/libc/ssp/h_stpcpy
+OLD_FILES+=usr/tests/lib/libc/ssp/h_stpncpy
+OLD_FILES+=usr/tests/lib/libc/ssp/h_strcat
+OLD_FILES+=usr/tests/lib/libc/ssp/h_strcpy
+OLD_FILES+=usr/tests/lib/libc/ssp/h_strncat
+OLD_FILES+=usr/tests/lib/libc/ssp/h_strncpy
+OLD_FILES+=usr/tests/lib/libc/ssp/h_vsnprintf
+OLD_FILES+=usr/tests/lib/libc/ssp/h_vsprintf
+OLD_FILES+=usr/tests/lib/libc/ssp/ssp_test
+.endif
+
+.if ${MK_SYSCONS} == no
+OLD_FILES+=usr/share/syscons/fonts/INDEX.fonts
+OLD_FILES+=usr/share/syscons/fonts/armscii8-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/armscii8-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/armscii8-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp1251-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp1251-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp1251-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp437-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp437-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp437-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp437-thin-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp437-thin-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp850-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp850-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp850-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp850-thin-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp850-thin-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp865-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp865-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp865-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp865-thin-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp865-thin-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866b-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866c-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866u-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866u-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/cp866u-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/haik8-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/haik8-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/haik8-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso-thin-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso02-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso02-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso02-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-wide-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso04-wide-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso05-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso05-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso05-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso07-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso07-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso07-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso08-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso08-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso08-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso09-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso15-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso15-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso15-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/iso15-thin-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-r-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-r-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-r-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-rb-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-rc-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-u-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-u-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/koi8-u-8x8.fnt
+OLD_FILES+=usr/share/syscons/fonts/swiss-1131-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/swiss-1251-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/swiss-8x14.fnt
+OLD_FILES+=usr/share/syscons/fonts/swiss-8x16.fnt
+OLD_FILES+=usr/share/syscons/fonts/swiss-8x8.fnt
+OLD_FILES+=usr/share/syscons/keymaps/INDEX.keymaps
+OLD_FILES+=usr/share/syscons/keymaps/be.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/be.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/bg.bds.ctrlcaps.kbd
+OLD_FILES+=usr/share/syscons/keymaps/bg.phonetic.ctrlcaps.kbd
+OLD_FILES+=usr/share/syscons/keymaps/br275.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/br275.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/br275.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/by.cp1131.kbd
+OLD_FILES+=usr/share/syscons/keymaps/by.cp1251.kbd
+OLD_FILES+=usr/share/syscons/keymaps/by.iso5.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ce.iso2.kbd
+OLD_FILES+=usr/share/syscons/keymaps/colemak.iso15.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/cs.latin2.qwertz.kbd
+OLD_FILES+=usr/share/syscons/keymaps/cz.iso2.kbd
+OLD_FILES+=usr/share/syscons/keymaps/danish.cp865.kbd
+OLD_FILES+=usr/share/syscons/keymaps/danish.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/danish.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/danish.iso.macbook.kbd
+OLD_FILES+=usr/share/syscons/keymaps/dutch.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/eee_nordic.kbd
+OLD_FILES+=usr/share/syscons/keymaps/el.iso07.kbd
+OLD_FILES+=usr/share/syscons/keymaps/estonian.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/estonian.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/estonian.iso15.kbd
+OLD_FILES+=usr/share/syscons/keymaps/finnish.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/finnish.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/fr.dvorak.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/fr.dvorak.kbd
+OLD_FILES+=usr/share/syscons/keymaps/fr.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/fr.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/fr.macbook.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/fr_CA.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/german.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/german.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/german.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/gr.elot.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/gr.us101.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/hr.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/hu.iso2.101keys.kbd
+OLD_FILES+=usr/share/syscons/keymaps/hu.iso2.102keys.kbd
+OLD_FILES+=usr/share/syscons/keymaps/hy.armscii-8.kbd
+OLD_FILES+=usr/share/syscons/keymaps/icelandic.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/icelandic.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/it.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/iw.iso8.kbd
+OLD_FILES+=usr/share/syscons/keymaps/jp.106.kbd
+OLD_FILES+=usr/share/syscons/keymaps/jp.106x.kbd
+OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.kbd
+OLD_FILES+=usr/share/syscons/keymaps/kk.pt154.io.kbd
+OLD_FILES+=usr/share/syscons/keymaps/kk.pt154.kst.kbd
+OLD_FILES+=usr/share/syscons/keymaps/latinamerican.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/latinamerican.kbd
+OLD_FILES+=usr/share/syscons/keymaps/lt.iso4.kbd
+OLD_FILES+=usr/share/syscons/keymaps/norwegian.dvorak.kbd
+OLD_FILES+=usr/share/syscons/keymaps/norwegian.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/pl_PL.ISO8859-2.kbd
+OLD_FILES+=usr/share/syscons/keymaps/pl_PL.dvorak.kbd
+OLD_FILES+=usr/share/syscons/keymaps/pt.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/pt.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ru.cp866.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ru.iso5.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ru.koi8-r.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ru.koi8-r.shift.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ru.koi8-r.win.kbd
+OLD_FILES+=usr/share/syscons/keymaps/si.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/sk.iso2.kbd
+OLD_FILES+=usr/share/syscons/keymaps/spanish.dvorak.kbd
+OLD_FILES+=usr/share/syscons/keymaps/spanish.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/spanish.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/spanish.iso15.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swedish.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swedish.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swissfrench.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swissfrench.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swissfrench.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swissgerman.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swissgerman.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swissgerman.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/swissgerman.macbook.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/tr.iso9.q.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ua.iso5.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ua.koi8-u.kbd
+OLD_FILES+=usr/share/syscons/keymaps/ua.koi8-u.shift.alt.kbd
+OLD_FILES+=usr/share/syscons/keymaps/uk.cp850-ctrl.kbd
+OLD_FILES+=usr/share/syscons/keymaps/uk.cp850.kbd
+OLD_FILES+=usr/share/syscons/keymaps/uk.dvorak.kbd
+OLD_FILES+=usr/share/syscons/keymaps/uk.iso-ctrl.kbd
+OLD_FILES+=usr/share/syscons/keymaps/uk.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.dvorak.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.dvorakl.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.dvorakp.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.dvorakr.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.dvorakx.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.emacs.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.iso.acc.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.iso.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.pc-ctrl.kbd
+OLD_FILES+=usr/share/syscons/keymaps/us.unix.kbd
+OLD_FILES+=usr/share/syscons/scrnmaps/armscii8-2haik8.scm
+OLD_FILES+=usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm
+OLD_FILES+=usr/share/syscons/scrnmaps/iso-8859-4_for_vga9.scm
+OLD_FILES+=usr/share/syscons/scrnmaps/iso-8859-7_to_cp437.scm
+OLD_FILES+=usr/share/syscons/scrnmaps/koi8-r2cp866.scm
+OLD_FILES+=usr/share/syscons/scrnmaps/koi8-u2cp866u.scm
+OLD_FILES+=usr/share/syscons/scrnmaps/us-ascii_to_cp437.scm
+.endif
+
+.if ${MK_TALK} == no
+OLD_FILES+=usr/bin/talk
+OLD_FILES+=usr/libexec/ntalkd
+OLD_FILES+=usr/share/man/man1/talk.1.gz
+OLD_FILES+=usr/share/man/man8/talkd.8.gz
+.endif
.if ${MK_TCSH} == no
+OLD_FILES+=.cshrc
+OLD_FILES+=etc/csh.cshrc
+OLD_FILES+=etc/csh.login
+OLD_FILES+=etc/csh.logout
OLD_FILES+=bin/csh
OLD_FILES+=bin/tcsh
OLD_FILES+=rescue/csh
OLD_FILES+=rescue/tcsh
+OLD_FILES+=root/.cshrc
+OLD_FILES+=root/.login
+OLD_FILES+=usr/share/examples/etc/csh.cshrc
+OLD_FILES+=usr/share/examples/etc/csh.login
+OLD_FILES+=usr/share/examples/etc/csh.logout
OLD_FILES+=usr/share/examples/tcsh/complete.tcsh
OLD_FILES+=usr/share/examples/tcsh/csh-mode.el
OLD_DIRS+=usr/share/examples/tcsh
@@ -4613,6 +7345,7 @@ OLD_FILES+=usr/tests/usr.bin/yacc/undefined.y
.endif
.else
# ATF libraries.
+OLD_FILES+=etc/mtree/BSD.tests.dist
OLD_FILES+=usr/bin/atf-sh
OLD_DIRS+=usr/include/atf-c
OLD_FILES+=usr/include/atf-c/build.h
@@ -4643,6 +7376,7 @@ OLD_FILES+=usr/lib/libatf-c++.so.1
OLD_FILES+=usr/lib/libatf-c++.so
OLD_FILES+=usr/lib/libatf-c.a
OLD_FILES+=usr/libexec/atf-check
+OLD_FILES+=usr/libexec/atf-sh
OLD_DIRS+=usr/share/atf
OLD_FILES+=usr/share/atf/libatf-sh.subr
OLD_DIRS+=usr/share/doc/atf
@@ -4650,30 +7384,121 @@ OLD_FILES+=usr/share/doc/atf/AUTHORS
OLD_FILES+=usr/share/doc/atf/COPYING
OLD_FILES+=usr/share/doc/atf/NEWS
OLD_FILES+=usr/share/doc/atf/README
+OLD_FILES+=usr/share/doc/pjdfstest/README
OLD_FILES+=usr/share/man/man1/atf-check.1.gz
OLD_FILES+=usr/share/man/man1/atf-sh.1.gz
OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz
OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz
OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz
OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz
+OLD_FILES+=usr/share/man/man3/atf-sh.3.gz
OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz
+OLD_FILES+=usr/share/man/man7/atf.7.gz
OLD_FILES+=usr/share/mk/atf.test.mk
+OLD_FILES+=usr/share/mk/plain.test.mk
+OLD_FILES+=usr/share/mk/suite.test.mk
+OLD_FILES+=usr/share/mk/tap.test.mk
# Test suite.
-. if(exists(${DESTDIR}/usr/tests/))
-TESTS_DIRS!=find ${DESTDIR}/usr/tests -type d | sed -e 's,^${DESTDIR}/,,'; echo
+. if exists(${DESTDIR}${TESTSBASE})
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE} -type d | sed -e 's,^${DESTDIR}/,,'; echo
OLD_DIRS+=${TESTS_DIRS}
-TESTS_FILES!=find ${DESTDIR}/usr/tests \! -type d | sed -e 's,^${DESTDIR}/,,'; echo
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE} \! -type d | sed -e 's,^${DESTDIR}/,,'; echo
OLD_FILES+=${TESTS_FILES}
. endif
.endif # Test suite.
+.if ${MK_TESTS_SUPPORT} == no
+OLD_FILES+=usr/include/atf-c++.hpp
+OLD_FILES+=usr/include/atf-c++/build.hpp
+OLD_FILES+=usr/include/atf-c++/check.hpp
+OLD_FILES+=usr/include/atf-c++/macros.hpp
+OLD_FILES+=usr/include/atf-c++/tests.hpp
+OLD_FILES+=usr/include/atf-c++/utils.hpp
+OLD_FILES+=usr/include/atf-c.h
+OLD_FILES+=usr/include/atf-c/build.h
+OLD_FILES+=usr/include/atf-c/check.h
+OLD_FILES+=usr/include/atf-c/defs.h
+OLD_FILES+=usr/include/atf-c/error.h
+OLD_FILES+=usr/include/atf-c/error_fwd.h
+OLD_FILES+=usr/include/atf-c/macros.h
+OLD_FILES+=usr/include/atf-c/tc.h
+OLD_FILES+=usr/include/atf-c/tp.h
+OLD_FILES+=usr/include/atf-c/utils.h
+OLD_LIBS+=usr/lib/private/libatf-c++.so.2
+OLD_LIBS+=usr/lib/private/libatf-c.so.1
+OLD_FILES+=usr/share/man/man3/atf-c++.3.gz
+OLD_FILES+=usr/share/man/man3/atf-c-api++.3.gz
+OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz
+OLD_FILES+=usr/share/man/man3/atf-c.3.gz
+OLD_FILES+=usr/tests/lib/atf/Kyuafile
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/Kyuafile
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/atf_c++_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/build_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/check_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/Kyuafile
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/application_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/env_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/exceptions_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/fs_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/process_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/text_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/detail/version_helper
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/macros_hpp_test.cpp
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/macros_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/tests_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/unused_test.cpp
+OLD_FILES+=usr/tests/lib/atf/libatf-c++/utils_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/Kyuafile
+OLD_FILES+=usr/tests/lib/atf/libatf-c/atf_c_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/build_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/check_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/Kyuafile
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/dynstr_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/env_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/fs_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/list_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/map_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/process_helpers
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/process_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/sanity_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/text_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/user_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/detail/version_helper
+OLD_FILES+=usr/tests/lib/atf/libatf-c/error_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/macros_h_test.c
+OLD_FILES+=usr/tests/lib/atf/libatf-c/macros_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/tc_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/tp_test
+OLD_FILES+=usr/tests/lib/atf/libatf-c/unused_test.c
+OLD_FILES+=usr/tests/lib/atf/libatf-c/utils_test
+OLD_FILES+=usr/tests/lib/atf/test-programs/Kyuafile
+OLD_FILES+=usr/tests/lib/atf/test-programs/c_helpers
+OLD_FILES+=usr/tests/lib/atf/test-programs/config_test
+OLD_FILES+=usr/tests/lib/atf/test-programs/cpp_helpers
+OLD_FILES+=usr/tests/lib/atf/test-programs/expect_test
+OLD_FILES+=usr/tests/lib/atf/test-programs/meta_data_test
+OLD_FILES+=usr/tests/lib/atf/test-programs/result_test
+OLD_FILES+=usr/tests/lib/atf/test-programs/sh_helpers
+OLD_FILES+=usr/tests/lib/atf/test-programs/srcdir_test
+.endif
+
+.if ${MK_TEXTPROC} == no
+OLD_FILES+=usr/bin/checknr
+OLD_FILES+=usr/bin/colcrt
+OLD_FILES+=usr/bin/ul
+OLD_FILES+=usr/share/man/man1/checknr.1.gz
+OLD_FILES+=usr/share/man/man1/colcrt.1.gz
+OLD_FILES+=usr/share/man/man1/ul.1.gz
+.endif
+
#.if ${MK_TOOLCHAIN} == no
# to be filled in
#.endif
.if ${MK_UNBOUND} == no
OLD_FILES+=etc/rc.d/local_unbound
+OLD_FILES+=etc/unbound
OLD_FILES+=usr/lib/private/libunbound.a
OLD_FILES+=usr/lib/private/libunbound.so
OLD_LIBS+=usr/lib/private/libunbound.so.5
@@ -4690,11 +7515,365 @@ OLD_FILES+=usr/sbin/unbound-anchor
OLD_FILES+=usr/sbin/unbound-checkconf
OLD_FILES+=usr/sbin/unbound-control
OLD_FILES+=usr/sbin/unbound-control-setup
+OLD_FILES+=usr/share/man/man5/unbound.conf.5.gz
+OLD_FILES+=usr/share/man/man8/unbound-anchor.8.gz
+OLD_FILES+=usr/share/man/man8/unbound-checkconf.8.gz
+OLD_FILES+=usr/share/man/man8/unbound-control.8.gz
+OLD_FILES+=usr/share/man/man8/unbound.8.gz
.endif
.if ${MK_USB} == no
+OLD_FILES+=etc/devd/uath.conf
OLD_FILES+=etc/devd/uauth.conf
+OLD_FILES+=etc/devd/ulpt.conf
OLD_FILES+=etc/devd/usb.conf
+OLD_FILES+=usr/bin/usbhidaction
+OLD_FILES+=usr/bin/usbhidctl
+OLD_FILES+=usr/include/libusb.h
+OLD_FILES+=usr/include/libusb20.h
+OLD_FILES+=usr/include/libusb20_desc.h
+OLD_FILES+=usr/include/usb.h
+OLD_FILES+=usr/include/usbhid.h
+OLD_FILES+=usr/lib/libusb.a
+OLD_FILES+=usr/lib/libusb.so
+OLD_LIBS+=usr/lib/libusb.so.3
+OLD_FILES+=usr/lib/libusb_p.a
+OLD_FILES+=usr/lib/libusbhid.a
+OLD_FILES+=usr/lib/libusbhid.so
+OLD_LIBS+=usr/lib/libusbhid.so.4
+OLD_FILES+=usr/lib/libusbhid_p.a
+OLD_FILES+=usr/lib32/libusb.a
+OLD_FILES+=usr/lib32/libusb.so
+OLD_LIBS+=usr/lib32/libusb.so.3
+OLD_FILES+=usr/lib32/libusb_p.a
+OLD_FILES+=usr/lib32/libusbhid.a
+OLD_FILES+=usr/lib32/libusbhid.so
+OLD_LIBS+=usr/lib32/libusbhid.so.4
+OLD_FILES+=usr/lib32/libusbhid_p.a
+OLD_FILES+=usr/libdata/pkgconfig/libusb-0.1.pc
+OLD_FILES+=usr/libdata/pkgconfig/libusb-1.0.pc
+OLD_FILES+=usr/libdata/pkgconfig/libusb-2.0.pc
+OLD_FILES+=usr/sbin/uathload
+OLD_FILES+=usr/sbin/uhsoctl
+OLD_FILES+=usr/sbin/usbconfig
+OLD_FILES+=usr/sbin/usbdump
+OLD_FILES+=usr/share/examples/libusb20/Makefile
+OLD_FILES+=usr/share/examples/libusb20/README
+OLD_FILES+=usr/share/examples/libusb20/bulk.c
+OLD_FILES+=usr/share/examples/libusb20/control.c
+OLD_FILES+=usr/share/examples/libusb20/util.c
+OLD_FILES+=usr/share/examples/libusb20/util.h
+OLD_DIRS+=usr/share/examples/libusb20
+OLD_FILES+=usr/share/man/man1/uhsoctl.1.gz
+OLD_FILES+=usr/share/man/man1/usbhidaction.1.gz
+OLD_FILES+=usr/share/man/man1/usbhidctl.1.gz
+OLD_FILES+=usr/share/man/man3/hid_dispose_report_desc.3.gz
+OLD_FILES+=usr/share/man/man3/hid_end_parse.3.gz
+OLD_FILES+=usr/share/man/man3/hid_get_data.3.gz
+OLD_FILES+=usr/share/man/man3/hid_get_item.3.gz
+OLD_FILES+=usr/share/man/man3/hid_get_report_desc.3.gz
+OLD_FILES+=usr/share/man/man3/hid_init.3.gz
+OLD_FILES+=usr/share/man/man3/hid_locate.3.gz
+OLD_FILES+=usr/share/man/man3/hid_report_size.3.gz
+OLD_FILES+=usr/share/man/man3/hid_set_data.3.gz
+OLD_FILES+=usr/share/man/man3/hid_start_parse.3.gz
+OLD_FILES+=usr/share/man/man3/hid_usage_in_page.3.gz
+OLD_FILES+=usr/share/man/man3/hid_usage_page.3.gz
+OLD_FILES+=usr/share/man/man3/libusb.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_add_dev_quirk.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_alloc_default.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_dequeue_device.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_device_foreach.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_enqueue_device.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_free.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_get_dev_quirk.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_get_quirk_name.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_get_template.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_remove_dev_quirk.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_be_set_template.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_desc_foreach.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc_config.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_check_connected.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_close.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_detach_kernel_driver.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_free.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_address.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_backend_name.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_bus_number.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_config_index.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_debug.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_desc.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_device_desc.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_fd.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_iface_desc.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_info.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_mode.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_address.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_port.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_port_path.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_mode.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_usage.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_get_speed.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_kernel_driver_active.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_open.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_process.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_simple_sync.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_sync.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_request_sync.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_reset.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_set_alt_index.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_set_config_index.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_set_debug.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_set_power_mode.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_dev_wait_process.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_error_name.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_me_decode.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_me_encode.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_me_get_1.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_me_get_2.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_strerror.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_bulk_intr_sync.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_callback_wrapper.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_clear_stall_sync.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_close.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_drain.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_frames.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_length.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_length.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_frames.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_packet_length.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_total_length.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_pointer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc0.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc1.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_status.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_get_time_complete.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_open.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_pending.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_buffer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_callback.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_flags.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_length.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc0.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc1.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_timeout.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_set_total_frames.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_bulk.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_control.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_intr.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_isoc.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_start.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_stop.3.gz
+OLD_FILES+=usr/share/man/man3/libusb20_tr_submit.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_alloc_transfer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_attach_kernel_driver.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_bulk_transfer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_cancel_transfer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_check_connected.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_claim_interface.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_clear_halt.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_close.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_control_transfer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver_np.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_error_name.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_event_handler_active.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_event_handling_ok.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_exit.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_free_bos_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_free_config_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_free_device_list.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_free_ss_endpoint_comp.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_free_transfer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_active_config_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_bus_number.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor_by_value.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_configuration.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_device.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_device_address.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_device_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_device_list.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_device_speed.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_driver.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_driver_np.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_max_iso_packet_size.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_max_packet_size.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_next_timeout.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_pollfds.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor_ascii.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_handle_events.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_handle_events_completed.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_handle_events_locked.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout_completed.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_init.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_interrupt_transfer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_kernel_driver_active.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_lock_event_waiters.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_lock_events.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_open.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_open_device_with_vid_pid.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_parse_bos_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_parse_ss_endpoint_comp.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_ref_device.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_release_interface.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_reset_device.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_set_configuration.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_set_debug.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_set_interface_alt_setting.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_set_pollfd_notifiers.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_strerror.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_submit_transfer.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_try_lock_events.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_unlock_event_waiters.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_unlock_events.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_unref_device.3.gz
+OLD_FILES+=usr/share/man/man3/libusb_wait_for_event.3.gz
+OLD_FILES+=usr/share/man/man3/libusbhid.3.gz
+OLD_FILES+=usr/share/man/man3/usb.3.gz
+OLD_FILES+=usr/share/man/man3/usb_bulk_read.3.gz
+OLD_FILES+=usr/share/man/man3/usb_bulk_write.3.gz
+OLD_FILES+=usr/share/man/man3/usb_check_connected.3.gz
+OLD_FILES+=usr/share/man/man3/usb_claim_interface.3.gz
+OLD_FILES+=usr/share/man/man3/usb_clear_halt.3.gz
+OLD_FILES+=usr/share/man/man3/usb_close.3.gz
+OLD_FILES+=usr/share/man/man3/usb_control_msg.3.gz
+OLD_FILES+=usr/share/man/man3/usb_destroy_configuration.3.gz
+OLD_FILES+=usr/share/man/man3/usb_device.3.gz
+OLD_FILES+=usr/share/man/man3/usb_fetch_and_parse_descriptors.3.gz
+OLD_FILES+=usr/share/man/man3/usb_find_busses.3.gz
+OLD_FILES+=usr/share/man/man3/usb_find_devices.3.gz
+OLD_FILES+=usr/share/man/man3/usb_get_busses.3.gz
+OLD_FILES+=usr/share/man/man3/usb_get_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/usb_get_descriptor_by_endpoint.3.gz
+OLD_FILES+=usr/share/man/man3/usb_get_string.3.gz
+OLD_FILES+=usr/share/man/man3/usb_get_string_simple.3.gz
+OLD_FILES+=usr/share/man/man3/usb_init.3.gz
+OLD_FILES+=usr/share/man/man3/usb_interrupt_read.3.gz
+OLD_FILES+=usr/share/man/man3/usb_interrupt_write.3.gz
+OLD_FILES+=usr/share/man/man3/usb_open.3.gz
+OLD_FILES+=usr/share/man/man3/usb_parse_configuration.3.gz
+OLD_FILES+=usr/share/man/man3/usb_parse_descriptor.3.gz
+OLD_FILES+=usr/share/man/man3/usb_release_interface.3.gz
+OLD_FILES+=usr/share/man/man3/usb_reset.3.gz
+OLD_FILES+=usr/share/man/man3/usb_resetep.3.gz
+OLD_FILES+=usr/share/man/man3/usb_set_altinterface.3.gz
+OLD_FILES+=usr/share/man/man3/usb_set_configuration.3.gz
+OLD_FILES+=usr/share/man/man3/usb_set_debug.3.gz
+OLD_FILES+=usr/share/man/man3/usb_strerror.3.gz
+OLD_FILES+=usr/share/man/man3/usbhid.3.gz
+OLD_FILES+=usr/share/man/man4/u3g.4.gz
+OLD_FILES+=usr/share/man/man4/u3gstub.4.gz
+OLD_FILES+=usr/share/man/man4/uark.4.gz
+OLD_FILES+=usr/share/man/man4/uart.4.gz
+OLD_FILES+=usr/share/man/man4/uath.4.gz
+OLD_FILES+=usr/share/man/man4/ubsa.4.gz
+OLD_FILES+=usr/share/man/man4/ubsec.4.gz
+OLD_FILES+=usr/share/man/man4/ubser.4.gz
+OLD_FILES+=usr/share/man/man4/ubtbcmfw.4.gz
+OLD_FILES+=usr/share/man/man4/uchcom.4.gz
+OLD_FILES+=usr/share/man/man4/ucom.4.gz
+OLD_FILES+=usr/share/man/man4/ucycom.4.gz
+OLD_FILES+=usr/share/man/man4/udav.4.gz
+OLD_FILES+=usr/share/man/man4/udbp.4.gz
+OLD_FILES+=usr/share/man/man4/udp.4.gz
+OLD_FILES+=usr/share/man/man4/udplite.4.gz
+OLD_FILES+=usr/share/man/man4/uep.4.gz
+OLD_FILES+=usr/share/man/man4/ufm.4.gz
+OLD_FILES+=usr/share/man/man4/ufoma.4.gz
+OLD_FILES+=usr/share/man/man4/uftdi.4.gz
+OLD_FILES+=usr/share/man/man4/ugen.4.gz
+OLD_FILES+=usr/share/man/man4/uhci.4.gz
+OLD_FILES+=usr/share/man/man4/uhid.4.gz
+OLD_FILES+=usr/share/man/man4/uhso.4.gz
+OLD_FILES+=usr/share/man/man4/uipaq.4.gz
+OLD_FILES+=usr/share/man/man4/ukbd.4.gz
+OLD_FILES+=usr/share/man/man4/uled.4.gz
+OLD_FILES+=usr/share/man/man4/ulpt.4.gz
+OLD_FILES+=usr/share/man/man4/umass.4.gz
+OLD_FILES+=usr/share/man/man4/umcs.4.gz
+OLD_FILES+=usr/share/man/man4/umct.4.gz
+OLD_FILES+=usr/share/man/man4/umodem.4.gz
+OLD_FILES+=usr/share/man/man4/umoscom.4.gz
+OLD_FILES+=usr/share/man/man4/ums.4.gz
+OLD_FILES+=usr/share/man/man4/unix.4.gz
+OLD_FILES+=usr/share/man/man4/upgt.4.gz
+OLD_FILES+=usr/share/man/man4/uplcom.4.gz
+OLD_FILES+=usr/share/man/man4/ural.4.gz
+OLD_FILES+=usr/share/man/man4/urio.4.gz
+OLD_FILES+=usr/share/man/man4/urndis.4.gz
+OLD_FILES+=usr/share/man/man4/urtw.4.gz
+OLD_FILES+=usr/share/man/man4/urtwn.4.gz
+OLD_FILES+=usr/share/man/man4/urtwnfw.4.gz
+OLD_FILES+=usr/share/man/man4/usb.4.gz
+OLD_FILES+=usr/share/man/man4/usb_quirk.4.gz
+OLD_FILES+=usr/share/man/man4/usb_template.4.gz
+OLD_FILES+=usr/share/man/man4/usfs.4.gz
+OLD_FILES+=usr/share/man/man4/uslcom.4.gz
+OLD_FILES+=usr/share/man/man4/utopia.4.gz
+OLD_FILES+=usr/share/man/man4/uvisor.4.gz
+OLD_FILES+=usr/share/man/man4/uvscom.4.gz
+OLD_FILES+=usr/share/man/man8/uathload.8.gz
+OLD_FILES+=usr/share/man/man8/usbconfig.8.gz
+OLD_FILES+=usr/share/man/man8/usbdump.8.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_alloc_buffer.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_attach.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_detach.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_free_buffer.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_get_data.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_buffer.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_error.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_linear.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_put_bytes_max.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_put_data.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_buffer.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_error.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_linear.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_reset.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_softc.9.gz
+OLD_FILES+=usr/share/man/man9/usb_fifo_wakeup.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_do_request.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_do_request_flags.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_errstr.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_info.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_uaa.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_clear_stall.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_drain.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_pending.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_poll.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_setup.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_start.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_stop.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_submit.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_transfer_unsetup.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_clr_flag.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_data.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_len.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_get_frame.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_get_priv.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_is_stalled.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_max_framelen.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_max_frames.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_max_len.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_flag.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_data.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_len.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_offset.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frames.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_interval.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_priv.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_stall.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_set_timeout.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_softc.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_state.9.gz
+OLD_FILES+=usr/share/man/man9/usbd_xfer_status.9.gz
+OLD_FILES+=usr/share/man/man9/usbdi.9.gz
+OLD_FILES+=usr/share/misc/usb_hid_usages
+OLD_FILES+=usr/share/misc/usbdevs
.endif
.if ${MK_UTMPX} == no
@@ -4715,6 +7894,8 @@ OLD_FILES+=usr/share/man/man8/utx.8.gz
.if ${MK_WIRELESS} == no
OLD_FILES+=etc/regdomain.xml
+OLD_FILES+=etc/rc.d/hostapd
+OLD_FILES+=etc/rc.d/wpa_supplicant
OLD_FILES+=usr/sbin/ancontrol
OLD_FILES+=usr/sbin/hostapd
OLD_FILES+=usr/sbin/hostapd_cli
@@ -4772,13 +7953,6 @@ OLD_FILES+=usr/bin/svnsync
OLD_FILES+=usr/bin/svnversion
.endif
-.if ${MK_DMAGENT} == no
-OLD_FILES+=usr/libexec/dma
-OLD_FILES+=usr/libexec/dma-mbox-create
-OLD_FILES+=usr/share/man/man8/dma.8.gz
-OLD_FILES+=usr/share/examples/dma/mailer.conf
-.endif
-
.if ${MK_HYPERV} == no
OLD_FILES+=etc/devd/hyperv.conf
OLD_FILES+=usr/libexec/hyperv/hv_set_ifconfig
@@ -4787,3 +7961,475 @@ OLD_FILES+=usr/libexec/hyperv/hv_get_dhcp_info
OLD_FILES+=usr/sbin/hv_kvp_daemon
OLD_FILES+=usr/share/man/man8/hv_kvp_daemon.8.gz
.endif
+
+.if ${MK_ZONEINFO} == no
+OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan
+OLD_FILES+=usr/share/zoneinfo/Africa/Accra
+OLD_FILES+=usr/share/zoneinfo/Africa/Addis_Ababa
+OLD_FILES+=usr/share/zoneinfo/Africa/Algiers
+OLD_FILES+=usr/share/zoneinfo/Africa/Asmara
+OLD_FILES+=usr/share/zoneinfo/Africa/Bamako
+OLD_FILES+=usr/share/zoneinfo/Africa/Bangui
+OLD_FILES+=usr/share/zoneinfo/Africa/Banjul
+OLD_FILES+=usr/share/zoneinfo/Africa/Bissau
+OLD_FILES+=usr/share/zoneinfo/Africa/Blantyre
+OLD_FILES+=usr/share/zoneinfo/Africa/Brazzaville
+OLD_FILES+=usr/share/zoneinfo/Africa/Bujumbura
+OLD_FILES+=usr/share/zoneinfo/Africa/Cairo
+OLD_FILES+=usr/share/zoneinfo/Africa/Casablanca
+OLD_FILES+=usr/share/zoneinfo/Africa/Ceuta
+OLD_FILES+=usr/share/zoneinfo/Africa/Conakry
+OLD_FILES+=usr/share/zoneinfo/Africa/Dakar
+OLD_FILES+=usr/share/zoneinfo/Africa/Dar_es_Salaam
+OLD_FILES+=usr/share/zoneinfo/Africa/Djibouti
+OLD_FILES+=usr/share/zoneinfo/Africa/Douala
+OLD_FILES+=usr/share/zoneinfo/Africa/El_Aaiun
+OLD_FILES+=usr/share/zoneinfo/Africa/Freetown
+OLD_FILES+=usr/share/zoneinfo/Africa/Gaborone
+OLD_FILES+=usr/share/zoneinfo/Africa/Harare
+OLD_FILES+=usr/share/zoneinfo/Africa/Johannesburg
+OLD_FILES+=usr/share/zoneinfo/Africa/Juba
+OLD_FILES+=usr/share/zoneinfo/Africa/Kampala
+OLD_FILES+=usr/share/zoneinfo/Africa/Khartoum
+OLD_FILES+=usr/share/zoneinfo/Africa/Kigali
+OLD_FILES+=usr/share/zoneinfo/Africa/Kinshasa
+OLD_FILES+=usr/share/zoneinfo/Africa/Lagos
+OLD_FILES+=usr/share/zoneinfo/Africa/Libreville
+OLD_FILES+=usr/share/zoneinfo/Africa/Lome
+OLD_FILES+=usr/share/zoneinfo/Africa/Luanda
+OLD_FILES+=usr/share/zoneinfo/Africa/Lubumbashi
+OLD_FILES+=usr/share/zoneinfo/Africa/Lusaka
+OLD_FILES+=usr/share/zoneinfo/Africa/Malabo
+OLD_FILES+=usr/share/zoneinfo/Africa/Maputo
+OLD_FILES+=usr/share/zoneinfo/Africa/Maseru
+OLD_FILES+=usr/share/zoneinfo/Africa/Mbabane
+OLD_FILES+=usr/share/zoneinfo/Africa/Mogadishu
+OLD_FILES+=usr/share/zoneinfo/Africa/Monrovia
+OLD_FILES+=usr/share/zoneinfo/Africa/Nairobi
+OLD_FILES+=usr/share/zoneinfo/Africa/Ndjamena
+OLD_FILES+=usr/share/zoneinfo/Africa/Niamey
+OLD_FILES+=usr/share/zoneinfo/Africa/Nouakchott
+OLD_FILES+=usr/share/zoneinfo/Africa/Ouagadougou
+OLD_FILES+=usr/share/zoneinfo/Africa/Porto-Novo
+OLD_FILES+=usr/share/zoneinfo/Africa/Sao_Tome
+OLD_FILES+=usr/share/zoneinfo/Africa/Tripoli
+OLD_FILES+=usr/share/zoneinfo/Africa/Tunis
+OLD_FILES+=usr/share/zoneinfo/Africa/Windhoek
+OLD_FILES+=usr/share/zoneinfo/America/Adak
+OLD_FILES+=usr/share/zoneinfo/America/Anchorage
+OLD_FILES+=usr/share/zoneinfo/America/Anguilla
+OLD_FILES+=usr/share/zoneinfo/America/Antigua
+OLD_FILES+=usr/share/zoneinfo/America/Araguaina
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Buenos_Aires
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Catamarca
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Cordoba
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Jujuy
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/La_Rioja
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Mendoza
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Rio_Gallegos
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Salta
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/San_Juan
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/San_Luis
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Tucuman
+OLD_FILES+=usr/share/zoneinfo/America/Argentina/Ushuaia
+OLD_FILES+=usr/share/zoneinfo/America/Aruba
+OLD_FILES+=usr/share/zoneinfo/America/Asuncion
+OLD_FILES+=usr/share/zoneinfo/America/Atikokan
+OLD_FILES+=usr/share/zoneinfo/America/Bahia
+OLD_FILES+=usr/share/zoneinfo/America/Bahia_Banderas
+OLD_FILES+=usr/share/zoneinfo/America/Barbados
+OLD_FILES+=usr/share/zoneinfo/America/Belem
+OLD_FILES+=usr/share/zoneinfo/America/Belize
+OLD_FILES+=usr/share/zoneinfo/America/Blanc-Sablon
+OLD_FILES+=usr/share/zoneinfo/America/Boa_Vista
+OLD_FILES+=usr/share/zoneinfo/America/Bogota
+OLD_FILES+=usr/share/zoneinfo/America/Boise
+OLD_FILES+=usr/share/zoneinfo/America/Cambridge_Bay
+OLD_FILES+=usr/share/zoneinfo/America/Campo_Grande
+OLD_FILES+=usr/share/zoneinfo/America/Cancun
+OLD_FILES+=usr/share/zoneinfo/America/Caracas
+OLD_FILES+=usr/share/zoneinfo/America/Cayenne
+OLD_FILES+=usr/share/zoneinfo/America/Cayman
+OLD_FILES+=usr/share/zoneinfo/America/Chicago
+OLD_FILES+=usr/share/zoneinfo/America/Chihuahua
+OLD_FILES+=usr/share/zoneinfo/America/Costa_Rica
+OLD_FILES+=usr/share/zoneinfo/America/Creston
+OLD_FILES+=usr/share/zoneinfo/America/Cuiaba
+OLD_FILES+=usr/share/zoneinfo/America/Curacao
+OLD_FILES+=usr/share/zoneinfo/America/Danmarkshavn
+OLD_FILES+=usr/share/zoneinfo/America/Dawson
+OLD_FILES+=usr/share/zoneinfo/America/Dawson_Creek
+OLD_FILES+=usr/share/zoneinfo/America/Denver
+OLD_FILES+=usr/share/zoneinfo/America/Detroit
+OLD_FILES+=usr/share/zoneinfo/America/Dominica
+OLD_FILES+=usr/share/zoneinfo/America/Edmonton
+OLD_FILES+=usr/share/zoneinfo/America/Eirunepe
+OLD_FILES+=usr/share/zoneinfo/America/El_Salvador
+OLD_FILES+=usr/share/zoneinfo/America/Fortaleza
+OLD_FILES+=usr/share/zoneinfo/America/Glace_Bay
+OLD_FILES+=usr/share/zoneinfo/America/Godthab
+OLD_FILES+=usr/share/zoneinfo/America/Goose_Bay
+OLD_FILES+=usr/share/zoneinfo/America/Grand_Turk
+OLD_FILES+=usr/share/zoneinfo/America/Grenada
+OLD_FILES+=usr/share/zoneinfo/America/Guadeloupe
+OLD_FILES+=usr/share/zoneinfo/America/Guatemala
+OLD_FILES+=usr/share/zoneinfo/America/Guayaquil
+OLD_FILES+=usr/share/zoneinfo/America/Guyana
+OLD_FILES+=usr/share/zoneinfo/America/Halifax
+OLD_FILES+=usr/share/zoneinfo/America/Havana
+OLD_FILES+=usr/share/zoneinfo/America/Hermosillo
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Indianapolis
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Knox
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Marengo
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Petersburg
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Tell_City
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Vevay
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Vincennes
+OLD_FILES+=usr/share/zoneinfo/America/Indiana/Winamac
+OLD_FILES+=usr/share/zoneinfo/America/Inuvik
+OLD_FILES+=usr/share/zoneinfo/America/Iqaluit
+OLD_FILES+=usr/share/zoneinfo/America/Jamaica
+OLD_FILES+=usr/share/zoneinfo/America/Juneau
+OLD_FILES+=usr/share/zoneinfo/America/Kentucky/Louisville
+OLD_FILES+=usr/share/zoneinfo/America/Kentucky/Monticello
+OLD_FILES+=usr/share/zoneinfo/America/Kralendijk
+OLD_FILES+=usr/share/zoneinfo/America/La_Paz
+OLD_FILES+=usr/share/zoneinfo/America/Lima
+OLD_FILES+=usr/share/zoneinfo/America/Los_Angeles
+OLD_FILES+=usr/share/zoneinfo/America/Lower_Princes
+OLD_FILES+=usr/share/zoneinfo/America/Maceio
+OLD_FILES+=usr/share/zoneinfo/America/Managua
+OLD_FILES+=usr/share/zoneinfo/America/Manaus
+OLD_FILES+=usr/share/zoneinfo/America/Marigot
+OLD_FILES+=usr/share/zoneinfo/America/Martinique
+OLD_FILES+=usr/share/zoneinfo/America/Matamoros
+OLD_FILES+=usr/share/zoneinfo/America/Mazatlan
+OLD_FILES+=usr/share/zoneinfo/America/Menominee
+OLD_FILES+=usr/share/zoneinfo/America/Merida
+OLD_FILES+=usr/share/zoneinfo/America/Metlakatla
+OLD_FILES+=usr/share/zoneinfo/America/Mexico_City
+OLD_FILES+=usr/share/zoneinfo/America/Miquelon
+OLD_FILES+=usr/share/zoneinfo/America/Moncton
+OLD_FILES+=usr/share/zoneinfo/America/Monterrey
+OLD_FILES+=usr/share/zoneinfo/America/Montevideo
+OLD_FILES+=usr/share/zoneinfo/America/Montreal
+OLD_FILES+=usr/share/zoneinfo/America/Montserrat
+OLD_FILES+=usr/share/zoneinfo/America/Nassau
+OLD_FILES+=usr/share/zoneinfo/America/New_York
+OLD_FILES+=usr/share/zoneinfo/America/Nipigon
+OLD_FILES+=usr/share/zoneinfo/America/Nome
+OLD_FILES+=usr/share/zoneinfo/America/Noronha
+OLD_FILES+=usr/share/zoneinfo/America/North_Dakota/Beulah
+OLD_FILES+=usr/share/zoneinfo/America/North_Dakota/Center
+OLD_FILES+=usr/share/zoneinfo/America/North_Dakota/New_Salem
+OLD_FILES+=usr/share/zoneinfo/America/Ojinaga
+OLD_FILES+=usr/share/zoneinfo/America/Panama
+OLD_FILES+=usr/share/zoneinfo/America/Pangnirtung
+OLD_FILES+=usr/share/zoneinfo/America/Paramaribo
+OLD_FILES+=usr/share/zoneinfo/America/Phoenix
+OLD_FILES+=usr/share/zoneinfo/America/Port-au-Prince
+OLD_FILES+=usr/share/zoneinfo/America/Port_of_Spain
+OLD_FILES+=usr/share/zoneinfo/America/Porto_Velho
+OLD_FILES+=usr/share/zoneinfo/America/Puerto_Rico
+OLD_FILES+=usr/share/zoneinfo/America/Rainy_River
+OLD_FILES+=usr/share/zoneinfo/America/Rankin_Inlet
+OLD_FILES+=usr/share/zoneinfo/America/Recife
+OLD_FILES+=usr/share/zoneinfo/America/Regina
+OLD_FILES+=usr/share/zoneinfo/America/Resolute
+OLD_FILES+=usr/share/zoneinfo/America/Rio_Branco
+OLD_FILES+=usr/share/zoneinfo/America/Santa_Isabel
+OLD_FILES+=usr/share/zoneinfo/America/Santarem
+OLD_FILES+=usr/share/zoneinfo/America/Santiago
+OLD_FILES+=usr/share/zoneinfo/America/Santo_Domingo
+OLD_FILES+=usr/share/zoneinfo/America/Sao_Paulo
+OLD_FILES+=usr/share/zoneinfo/America/Scoresbysund
+OLD_FILES+=usr/share/zoneinfo/America/Sitka
+OLD_FILES+=usr/share/zoneinfo/America/St_Barthelemy
+OLD_FILES+=usr/share/zoneinfo/America/St_Johns
+OLD_FILES+=usr/share/zoneinfo/America/St_Kitts
+OLD_FILES+=usr/share/zoneinfo/America/St_Lucia
+OLD_FILES+=usr/share/zoneinfo/America/St_Thomas
+OLD_FILES+=usr/share/zoneinfo/America/St_Vincent
+OLD_FILES+=usr/share/zoneinfo/America/Swift_Current
+OLD_FILES+=usr/share/zoneinfo/America/Tegucigalpa
+OLD_FILES+=usr/share/zoneinfo/America/Thule
+OLD_FILES+=usr/share/zoneinfo/America/Thunder_Bay
+OLD_FILES+=usr/share/zoneinfo/America/Tijuana
+OLD_FILES+=usr/share/zoneinfo/America/Toronto
+OLD_FILES+=usr/share/zoneinfo/America/Tortola
+OLD_FILES+=usr/share/zoneinfo/America/Vancouver
+OLD_FILES+=usr/share/zoneinfo/America/Whitehorse
+OLD_FILES+=usr/share/zoneinfo/America/Winnipeg
+OLD_FILES+=usr/share/zoneinfo/America/Yakutat
+OLD_FILES+=usr/share/zoneinfo/America/Yellowknife
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Casey
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Davis
+OLD_FILES+=usr/share/zoneinfo/Antarctica/DumontDUrville
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Macquarie
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Mawson
+OLD_FILES+=usr/share/zoneinfo/Antarctica/McMurdo
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Palmer
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Rothera
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Syowa
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Troll
+OLD_FILES+=usr/share/zoneinfo/Antarctica/Vostok
+OLD_FILES+=usr/share/zoneinfo/Arctic/Longyearbyen
+OLD_FILES+=usr/share/zoneinfo/Asia/Aden
+OLD_FILES+=usr/share/zoneinfo/Asia/Almaty
+OLD_FILES+=usr/share/zoneinfo/Asia/Amman
+OLD_FILES+=usr/share/zoneinfo/Asia/Anadyr
+OLD_FILES+=usr/share/zoneinfo/Asia/Aqtau
+OLD_FILES+=usr/share/zoneinfo/Asia/Aqtobe
+OLD_FILES+=usr/share/zoneinfo/Asia/Ashgabat
+OLD_FILES+=usr/share/zoneinfo/Asia/Baghdad
+OLD_FILES+=usr/share/zoneinfo/Asia/Bahrain
+OLD_FILES+=usr/share/zoneinfo/Asia/Baku
+OLD_FILES+=usr/share/zoneinfo/Asia/Bangkok
+OLD_FILES+=usr/share/zoneinfo/Asia/Beirut
+OLD_FILES+=usr/share/zoneinfo/Asia/Bishkek
+OLD_FILES+=usr/share/zoneinfo/Asia/Brunei
+OLD_FILES+=usr/share/zoneinfo/Asia/Chita
+OLD_FILES+=usr/share/zoneinfo/Asia/Choibalsan
+OLD_FILES+=usr/share/zoneinfo/Asia/Colombo
+OLD_FILES+=usr/share/zoneinfo/Asia/Damascus
+OLD_FILES+=usr/share/zoneinfo/Asia/Dhaka
+OLD_FILES+=usr/share/zoneinfo/Asia/Dili
+OLD_FILES+=usr/share/zoneinfo/Asia/Dubai
+OLD_FILES+=usr/share/zoneinfo/Asia/Dushanbe
+OLD_FILES+=usr/share/zoneinfo/Asia/Gaza
+OLD_FILES+=usr/share/zoneinfo/Asia/Hebron
+OLD_FILES+=usr/share/zoneinfo/Asia/Ho_Chi_Minh
+OLD_FILES+=usr/share/zoneinfo/Asia/Hong_Kong
+OLD_FILES+=usr/share/zoneinfo/Asia/Hovd
+OLD_FILES+=usr/share/zoneinfo/Asia/Irkutsk
+OLD_FILES+=usr/share/zoneinfo/Asia/Istanbul
+OLD_FILES+=usr/share/zoneinfo/Asia/Jakarta
+OLD_FILES+=usr/share/zoneinfo/Asia/Jayapura
+OLD_FILES+=usr/share/zoneinfo/Asia/Jerusalem
+OLD_FILES+=usr/share/zoneinfo/Asia/Kabul
+OLD_FILES+=usr/share/zoneinfo/Asia/Kamchatka
+OLD_FILES+=usr/share/zoneinfo/Asia/Karachi
+OLD_FILES+=usr/share/zoneinfo/Asia/Kathmandu
+OLD_FILES+=usr/share/zoneinfo/Asia/Khandyga
+OLD_FILES+=usr/share/zoneinfo/Asia/Kolkata
+OLD_FILES+=usr/share/zoneinfo/Asia/Krasnoyarsk
+OLD_FILES+=usr/share/zoneinfo/Asia/Kuala_Lumpur
+OLD_FILES+=usr/share/zoneinfo/Asia/Kuching
+OLD_FILES+=usr/share/zoneinfo/Asia/Kuwait
+OLD_FILES+=usr/share/zoneinfo/Asia/Macau
+OLD_FILES+=usr/share/zoneinfo/Asia/Magadan
+OLD_FILES+=usr/share/zoneinfo/Asia/Makassar
+OLD_FILES+=usr/share/zoneinfo/Asia/Manila
+OLD_FILES+=usr/share/zoneinfo/Asia/Muscat
+OLD_FILES+=usr/share/zoneinfo/Asia/Nicosia
+OLD_FILES+=usr/share/zoneinfo/Asia/Novokuznetsk
+OLD_FILES+=usr/share/zoneinfo/Asia/Novosibirsk
+OLD_FILES+=usr/share/zoneinfo/Asia/Omsk
+OLD_FILES+=usr/share/zoneinfo/Asia/Oral
+OLD_FILES+=usr/share/zoneinfo/Asia/Phnom_Penh
+OLD_FILES+=usr/share/zoneinfo/Asia/Pontianak
+OLD_FILES+=usr/share/zoneinfo/Asia/Pyongyang
+OLD_FILES+=usr/share/zoneinfo/Asia/Qatar
+OLD_FILES+=usr/share/zoneinfo/Asia/Qyzylorda
+OLD_FILES+=usr/share/zoneinfo/Asia/Rangoon
+OLD_FILES+=usr/share/zoneinfo/Asia/Riyadh
+OLD_FILES+=usr/share/zoneinfo/Asia/Sakhalin
+OLD_FILES+=usr/share/zoneinfo/Asia/Samarkand
+OLD_FILES+=usr/share/zoneinfo/Asia/Seoul
+OLD_FILES+=usr/share/zoneinfo/Asia/Shanghai
+OLD_FILES+=usr/share/zoneinfo/Asia/Singapore
+OLD_FILES+=usr/share/zoneinfo/Asia/Srednekolymsk
+OLD_FILES+=usr/share/zoneinfo/Asia/Taipei
+OLD_FILES+=usr/share/zoneinfo/Asia/Tashkent
+OLD_FILES+=usr/share/zoneinfo/Asia/Tbilisi
+OLD_FILES+=usr/share/zoneinfo/Asia/Tehran
+OLD_FILES+=usr/share/zoneinfo/Asia/Thimphu
+OLD_FILES+=usr/share/zoneinfo/Asia/Tokyo
+OLD_FILES+=usr/share/zoneinfo/Asia/Ulaanbaatar
+OLD_FILES+=usr/share/zoneinfo/Asia/Urumqi
+OLD_FILES+=usr/share/zoneinfo/Asia/Ust-Nera
+OLD_FILES+=usr/share/zoneinfo/Asia/Vientiane
+OLD_FILES+=usr/share/zoneinfo/Asia/Vladivostok
+OLD_FILES+=usr/share/zoneinfo/Asia/Yakutsk
+OLD_FILES+=usr/share/zoneinfo/Asia/Yekaterinburg
+OLD_FILES+=usr/share/zoneinfo/Asia/Yerevan
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Azores
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Bermuda
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Canary
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Cape_Verde
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Faroe
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Madeira
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Reykjavik
+OLD_FILES+=usr/share/zoneinfo/Atlantic/South_Georgia
+OLD_FILES+=usr/share/zoneinfo/Atlantic/St_Helena
+OLD_FILES+=usr/share/zoneinfo/Atlantic/Stanley
+OLD_FILES+=usr/share/zoneinfo/Australia/Adelaide
+OLD_FILES+=usr/share/zoneinfo/Australia/Brisbane
+OLD_FILES+=usr/share/zoneinfo/Australia/Broken_Hill
+OLD_FILES+=usr/share/zoneinfo/Australia/Currie
+OLD_FILES+=usr/share/zoneinfo/Australia/Darwin
+OLD_FILES+=usr/share/zoneinfo/Australia/Eucla
+OLD_FILES+=usr/share/zoneinfo/Australia/Hobart
+OLD_FILES+=usr/share/zoneinfo/Australia/Lindeman
+OLD_FILES+=usr/share/zoneinfo/Australia/Lord_Howe
+OLD_FILES+=usr/share/zoneinfo/Australia/Melbourne
+OLD_FILES+=usr/share/zoneinfo/Australia/Perth
+OLD_FILES+=usr/share/zoneinfo/Australia/Sydney
+OLD_FILES+=usr/share/zoneinfo/CET
+OLD_FILES+=usr/share/zoneinfo/CST6CDT
+OLD_FILES+=usr/share/zoneinfo/EET
+OLD_FILES+=usr/share/zoneinfo/EST
+OLD_FILES+=usr/share/zoneinfo/EST5EDT
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+0
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+1
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+10
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+11
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+12
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+2
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+3
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+4
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+5
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+6
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+7
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+8
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT+9
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-0
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-1
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-10
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-11
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-12
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-13
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-14
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-2
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-3
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-4
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-5
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-6
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-7
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-8
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT-9
+OLD_FILES+=usr/share/zoneinfo/Etc/GMT0
+OLD_FILES+=usr/share/zoneinfo/Etc/Greenwich
+OLD_FILES+=usr/share/zoneinfo/Etc/UCT
+OLD_FILES+=usr/share/zoneinfo/Etc/UTC
+OLD_FILES+=usr/share/zoneinfo/Etc/Universal
+OLD_FILES+=usr/share/zoneinfo/Etc/Zulu
+OLD_FILES+=usr/share/zoneinfo/Europe/Amsterdam
+OLD_FILES+=usr/share/zoneinfo/Europe/Andorra
+OLD_FILES+=usr/share/zoneinfo/Europe/Athens
+OLD_FILES+=usr/share/zoneinfo/Europe/Belgrade
+OLD_FILES+=usr/share/zoneinfo/Europe/Berlin
+OLD_FILES+=usr/share/zoneinfo/Europe/Bratislava
+OLD_FILES+=usr/share/zoneinfo/Europe/Brussels
+OLD_FILES+=usr/share/zoneinfo/Europe/Bucharest
+OLD_FILES+=usr/share/zoneinfo/Europe/Budapest
+OLD_FILES+=usr/share/zoneinfo/Europe/Busingen
+OLD_FILES+=usr/share/zoneinfo/Europe/Chisinau
+OLD_FILES+=usr/share/zoneinfo/Europe/Copenhagen
+OLD_FILES+=usr/share/zoneinfo/Europe/Dublin
+OLD_FILES+=usr/share/zoneinfo/Europe/Gibraltar
+OLD_FILES+=usr/share/zoneinfo/Europe/Guernsey
+OLD_FILES+=usr/share/zoneinfo/Europe/Helsinki
+OLD_FILES+=usr/share/zoneinfo/Europe/Isle_of_Man
+OLD_FILES+=usr/share/zoneinfo/Europe/Istanbul
+OLD_FILES+=usr/share/zoneinfo/Europe/Jersey
+OLD_FILES+=usr/share/zoneinfo/Europe/Kaliningrad
+OLD_FILES+=usr/share/zoneinfo/Europe/Kiev
+OLD_FILES+=usr/share/zoneinfo/Europe/Lisbon
+OLD_FILES+=usr/share/zoneinfo/Europe/Ljubljana
+OLD_FILES+=usr/share/zoneinfo/Europe/London
+OLD_FILES+=usr/share/zoneinfo/Europe/Luxembourg
+OLD_FILES+=usr/share/zoneinfo/Europe/Madrid
+OLD_FILES+=usr/share/zoneinfo/Europe/Malta
+OLD_FILES+=usr/share/zoneinfo/Europe/Mariehamn
+OLD_FILES+=usr/share/zoneinfo/Europe/Minsk
+OLD_FILES+=usr/share/zoneinfo/Europe/Monaco
+OLD_FILES+=usr/share/zoneinfo/Europe/Moscow
+OLD_FILES+=usr/share/zoneinfo/Europe/Nicosia
+OLD_FILES+=usr/share/zoneinfo/Europe/Oslo
+OLD_FILES+=usr/share/zoneinfo/Europe/Paris
+OLD_FILES+=usr/share/zoneinfo/Europe/Podgorica
+OLD_FILES+=usr/share/zoneinfo/Europe/Prague
+OLD_FILES+=usr/share/zoneinfo/Europe/Riga
+OLD_FILES+=usr/share/zoneinfo/Europe/Rome
+OLD_FILES+=usr/share/zoneinfo/Europe/Samara
+OLD_FILES+=usr/share/zoneinfo/Europe/San_Marino
+OLD_FILES+=usr/share/zoneinfo/Europe/Sarajevo
+OLD_FILES+=usr/share/zoneinfo/Europe/Simferopol
+OLD_FILES+=usr/share/zoneinfo/Europe/Skopje
+OLD_FILES+=usr/share/zoneinfo/Europe/Sofia
+OLD_FILES+=usr/share/zoneinfo/Europe/Stockholm
+OLD_FILES+=usr/share/zoneinfo/Europe/Tallinn
+OLD_FILES+=usr/share/zoneinfo/Europe/Tirane
+OLD_FILES+=usr/share/zoneinfo/Europe/Uzhgorod
+OLD_FILES+=usr/share/zoneinfo/Europe/Vaduz
+OLD_FILES+=usr/share/zoneinfo/Europe/Vatican
+OLD_FILES+=usr/share/zoneinfo/Europe/Vienna
+OLD_FILES+=usr/share/zoneinfo/Europe/Vilnius
+OLD_FILES+=usr/share/zoneinfo/Europe/Volgograd
+OLD_FILES+=usr/share/zoneinfo/Europe/Warsaw
+OLD_FILES+=usr/share/zoneinfo/Europe/Zagreb
+OLD_FILES+=usr/share/zoneinfo/Europe/Zaporozhye
+OLD_FILES+=usr/share/zoneinfo/Europe/Zurich
+OLD_FILES+=usr/share/zoneinfo/Factory
+OLD_FILES+=usr/share/zoneinfo/HST
+OLD_FILES+=usr/share/zoneinfo/Indian/Antananarivo
+OLD_FILES+=usr/share/zoneinfo/Indian/Chagos
+OLD_FILES+=usr/share/zoneinfo/Indian/Christmas
+OLD_FILES+=usr/share/zoneinfo/Indian/Cocos
+OLD_FILES+=usr/share/zoneinfo/Indian/Comoro
+OLD_FILES+=usr/share/zoneinfo/Indian/Kerguelen
+OLD_FILES+=usr/share/zoneinfo/Indian/Mahe
+OLD_FILES+=usr/share/zoneinfo/Indian/Maldives
+OLD_FILES+=usr/share/zoneinfo/Indian/Mauritius
+OLD_FILES+=usr/share/zoneinfo/Indian/Mayotte
+OLD_FILES+=usr/share/zoneinfo/Indian/Reunion
+OLD_FILES+=usr/share/zoneinfo/MET
+OLD_FILES+=usr/share/zoneinfo/MST
+OLD_FILES+=usr/share/zoneinfo/MST7MDT
+OLD_FILES+=usr/share/zoneinfo/PST8PDT
+OLD_FILES+=usr/share/zoneinfo/Pacific/Apia
+OLD_FILES+=usr/share/zoneinfo/Pacific/Auckland
+OLD_FILES+=usr/share/zoneinfo/Pacific/Bougainville
+OLD_FILES+=usr/share/zoneinfo/Pacific/Chatham
+OLD_FILES+=usr/share/zoneinfo/Pacific/Chuuk
+OLD_FILES+=usr/share/zoneinfo/Pacific/Easter
+OLD_FILES+=usr/share/zoneinfo/Pacific/Efate
+OLD_FILES+=usr/share/zoneinfo/Pacific/Enderbury
+OLD_FILES+=usr/share/zoneinfo/Pacific/Fakaofo
+OLD_FILES+=usr/share/zoneinfo/Pacific/Fiji
+OLD_FILES+=usr/share/zoneinfo/Pacific/Funafuti
+OLD_FILES+=usr/share/zoneinfo/Pacific/Galapagos
+OLD_FILES+=usr/share/zoneinfo/Pacific/Gambier
+OLD_FILES+=usr/share/zoneinfo/Pacific/Guadalcanal
+OLD_FILES+=usr/share/zoneinfo/Pacific/Guam
+OLD_FILES+=usr/share/zoneinfo/Pacific/Honolulu
+OLD_FILES+=usr/share/zoneinfo/Pacific/Johnston
+OLD_FILES+=usr/share/zoneinfo/Pacific/Kiritimati
+OLD_FILES+=usr/share/zoneinfo/Pacific/Kosrae
+OLD_FILES+=usr/share/zoneinfo/Pacific/Kwajalein
+OLD_FILES+=usr/share/zoneinfo/Pacific/Majuro
+OLD_FILES+=usr/share/zoneinfo/Pacific/Marquesas
+OLD_FILES+=usr/share/zoneinfo/Pacific/Midway
+OLD_FILES+=usr/share/zoneinfo/Pacific/Nauru
+OLD_FILES+=usr/share/zoneinfo/Pacific/Niue
+OLD_FILES+=usr/share/zoneinfo/Pacific/Norfolk
+OLD_FILES+=usr/share/zoneinfo/Pacific/Noumea
+OLD_FILES+=usr/share/zoneinfo/Pacific/Pago_Pago
+OLD_FILES+=usr/share/zoneinfo/Pacific/Palau
+OLD_FILES+=usr/share/zoneinfo/Pacific/Pitcairn
+OLD_FILES+=usr/share/zoneinfo/Pacific/Pohnpei
+OLD_FILES+=usr/share/zoneinfo/Pacific/Port_Moresby
+OLD_FILES+=usr/share/zoneinfo/Pacific/Rarotonga
+OLD_FILES+=usr/share/zoneinfo/Pacific/Saipan
+OLD_FILES+=usr/share/zoneinfo/Pacific/Tahiti
+OLD_FILES+=usr/share/zoneinfo/Pacific/Tarawa
+OLD_FILES+=usr/share/zoneinfo/Pacific/Tongatapu
+OLD_FILES+=usr/share/zoneinfo/Pacific/Wake
+OLD_FILES+=usr/share/zoneinfo/Pacific/Wallis
+OLD_FILES+=usr/share/zoneinfo/UTC
+OLD_FILES+=usr/share/zoneinfo/WET
+OLD_FILES+=usr/share/zoneinfo/posixrules
+OLD_FILES+=usr/share/zoneinfo/zone.tab
+.endif
diff --git a/tools/build/options/WITHOUT_AUTOFS b/tools/build/options/WITHOUT_AUTOFS
new file mode 100644
index 0000000..f9c5c2c
--- /dev/null
+++ b/tools/build/options/WITHOUT_AUTOFS
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build
+.Xr autofs 4
+related programs, libraries, and kernel modules.
diff --git a/tools/build/options/WITHOUT_BHYVE b/tools/build/options/WITHOUT_BHYVE
new file mode 100644
index 0000000..b80a726
--- /dev/null
+++ b/tools/build/options/WITHOUT_BHYVE
@@ -0,0 +1,6 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr bhyve 8 ,
+associated utilities, and examples.
+.Pp
+This option only affects amd64/amd64.
diff --git a/tools/build/options/WITHOUT_BOOTPARAMD b/tools/build/options/WITHOUT_BOOTPARAMD
new file mode 100644
index 0000000..f996083
--- /dev/null
+++ b/tools/build/options/WITHOUT_BOOTPARAMD
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr bootparamd 8 .
diff --git a/tools/build/options/WITHOUT_BOOTPD b/tools/build/options/WITHOUT_BOOTPD
new file mode 100644
index 0000000..6733d5a
--- /dev/null
+++ b/tools/build/options/WITHOUT_BOOTPD
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr bootpd 8 .
diff --git a/tools/build/options/WITHOUT_BSDINSTALL b/tools/build/options/WITHOUT_BSDINSTALL
new file mode 100644
index 0000000..8aaf2a6
--- /dev/null
+++ b/tools/build/options/WITHOUT_BSDINSTALL
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build
+.Xr bsdinstall 8 ,
+.Xr sade 8 ,
+and related programs.
diff --git a/tools/build/options/WITHOUT_CCD b/tools/build/options/WITHOUT_CCD
new file mode 100644
index 0000000..b4d044e
--- /dev/null
+++ b/tools/build/options/WITHOUT_CCD
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build
+.Xr geom_ccd 4
+and related utilities.
diff --git a/tools/build/options/WITHOUT_CROSS_COMPILER b/tools/build/options/WITHOUT_CROSS_COMPILER
index ab1bd23..80420c5 100644
--- a/tools/build/options/WITHOUT_CROSS_COMPILER
+++ b/tools/build/options/WITHOUT_CROSS_COMPILER
@@ -1,13 +1,13 @@
.\" $FreeBSD$
Set to not build any cross compiler in the cross-tools stage of buildworld.
If you are compiling a different version of
-.Fx
+.Fx
than what is installed on the system, you will need to provide an alternate
compiler with XCC to ensure success.
If you are compiling with an identical version of
-.Fx
+.Fx
to the host, this option may be safely used.
This option may also be safe when the host version of
-.Fx
+.Fx
is close to the sources being built, but all bets are off if there have
been any changes to the toolchain between the versions.
diff --git a/tools/build/options/WITHOUT_CXX b/tools/build/options/WITHOUT_CXX
index 541cc3c..ab9346a 100644
--- a/tools/build/options/WITHOUT_CXX
+++ b/tools/build/options/WITHOUT_CXX
@@ -1,6 +1,6 @@
.\" $FreeBSD$
Set to not build
-.Xr g++ 1
+.Xr c++ 1
and related libraries.
It will also prevent building of
.Xr gperf 1
diff --git a/tools/build/options/WITHOUT_EE b/tools/build/options/WITHOUT_EE
new file mode 100644
index 0000000..721ddaa
--- /dev/null
+++ b/tools/build/options/WITHOUT_EE
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build and install
+.Xr edit 1 ,
+.Xr ee 1 ,
+and related programs.
diff --git a/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS b/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS
new file mode 100644
index 0000000..e478058
--- /dev/null
+++ b/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS
@@ -0,0 +1,9 @@
+.\" $FreeBSD$
+Set to use
+.Xr addr2line 1 ,
+.Xr nm 1 ,
+.Xr size 1 ,
+.Xr strings 1 ,
+and
+.Xr strip 1
+from GNU binutils instead of the ELF Tool Chain project.
diff --git a/tools/build/options/WITHOUT_FILE b/tools/build/options/WITHOUT_FILE
new file mode 100644
index 0000000..636d00a
--- /dev/null
+++ b/tools/build/options/WITHOUT_FILE
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build
+.Xr file 1
+and related programs.
diff --git a/tools/build/options/WITHOUT_FINGER b/tools/build/options/WITHOUT_FINGER
new file mode 100644
index 0000000..7f65408
--- /dev/null
+++ b/tools/build/options/WITHOUT_FINGER
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr finger 1
+and
+.Xr fingerd 8 .
diff --git a/tools/build/options/WITHOUT_FTP b/tools/build/options/WITHOUT_FTP
new file mode 100644
index 0000000..5e0fc8e
--- /dev/null
+++ b/tools/build/options/WITHOUT_FTP
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr ftp 1
+and
+.Xr ftpd 8 .
diff --git a/tools/build/options/WITHOUT_GPIB b/tools/build/options/WITHOUT_GPIB
deleted file mode 100644
index 82cec15..0000000
--- a/tools/build/options/WITHOUT_GPIB
+++ /dev/null
@@ -1,2 +0,0 @@
-.\" $FreeBSD$
-Set to not build GPIB bus support.
diff --git a/tools/build/options/WITHOUT_HAST b/tools/build/options/WITHOUT_HAST
new file mode 100644
index 0000000..0c31b8c
--- /dev/null
+++ b/tools/build/options/WITHOUT_HAST
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build
+.Xr hastd 8
+and related utilities.
diff --git a/tools/build/options/WITHOUT_INCLUDES b/tools/build/options/WITHOUT_INCLUDES
index 8ccb207..40f8ff5 100644
--- a/tools/build/options/WITHOUT_INCLUDES
+++ b/tools/build/options/WITHOUT_INCLUDES
@@ -1,8 +1,7 @@
.\" $FreeBSD$
Set to not install header files.
-This option used to be spelled
+This option used to be spelled
.Va NO_INCS .
.Bf -symbolic
The option does not work for build targets.
.Ef
-
diff --git a/tools/build/options/WITHOUT_INETD b/tools/build/options/WITHOUT_INETD
new file mode 100644
index 0000000..b4fe5dc
--- /dev/null
+++ b/tools/build/options/WITHOUT_INETD
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build
+.Xr inetd 8 .
diff --git a/tools/build/options/WITHOUT_ISCSI b/tools/build/options/WITHOUT_ISCSI
new file mode 100644
index 0000000..83f3d74
--- /dev/null
+++ b/tools/build/options/WITHOUT_ISCSI
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build
+.Xr iscid 8
+and related utilities.
diff --git a/tools/build/options/WITHOUT_RADIUS_SUPPORT b/tools/build/options/WITHOUT_RADIUS_SUPPORT
new file mode 100644
index 0000000..31f5aab
--- /dev/null
+++ b/tools/build/options/WITHOUT_RADIUS_SUPPORT
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build radius support into various applications, like
+.Xr pam_radius 8
+and
+.Xr ppp 8 .
diff --git a/tools/build/options/WITHOUT_RBOOTD b/tools/build/options/WITHOUT_RBOOTD
new file mode 100644
index 0000000..f7c33e1
--- /dev/null
+++ b/tools/build/options/WITHOUT_RBOOTD
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr rbootd 8 .
diff --git a/tools/build/options/WITHOUT_RCS b/tools/build/options/WITHOUT_RCS
index e21e027..b4f89e1 100644
--- a/tools/build/options/WITHOUT_RCS
+++ b/tools/build/options/WITHOUT_RCS
@@ -1,6 +1,5 @@
.\" $FreeBSD$
Set to not build
-.Xr rcs 1
-,
-.Xr etcupdate 8
-, and related utilities.
+.Xr rcs 1 ,
+.Xr etcupdate 8 ,
+and related utilities.
diff --git a/tools/build/options/WITHOUT_SYSCALL_COMPAT b/tools/build/options/WITHOUT_SYSCALL_COMPAT
deleted file mode 100644
index a20adcb..0000000
--- a/tools/build/options/WITHOUT_SYSCALL_COMPAT
+++ /dev/null
@@ -1,2 +0,0 @@
-.\" $FreeBSD$
-Do not include some compatible syscall wrappers in libc.
diff --git a/tools/build/options/WITHOUT_TALK b/tools/build/options/WITHOUT_TALK
new file mode 100644
index 0000000..33d4167
--- /dev/null
+++ b/tools/build/options/WITHOUT_TALK
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr talk 1
+and
+.Xr talkd 8 .
diff --git a/tools/build/options/WITHOUT_TCP_WRAPPERS b/tools/build/options/WITHOUT_TCP_WRAPPERS
new file mode 100644
index 0000000..7c41198
--- /dev/null
+++ b/tools/build/options/WITHOUT_TCP_WRAPPERS
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr tcpd 8 ,
+and related utilities.
diff --git a/tools/build/options/WITHOUT_TFTP b/tools/build/options/WITHOUT_TFTP
new file mode 100644
index 0000000..bdb51ac
--- /dev/null
+++ b/tools/build/options/WITHOUT_TFTP
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr tftp 1
+and
+.Xr tftpd 8 .
diff --git a/tools/build/options/WITHOUT_TIMED b/tools/build/options/WITHOUT_TIMED
new file mode 100644
index 0000000..a1f4c68
--- /dev/null
+++ b/tools/build/options/WITHOUT_TIMED
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build or install
+.Xr timed 8 .
diff --git a/tools/build/options/WITHOUT_WARNS b/tools/build/options/WITHOUT_WARNS
index 185a279..a0c1339 100644
--- a/tools/build/options/WITHOUT_WARNS
+++ b/tools/build/options/WITHOUT_WARNS
@@ -2,4 +2,4 @@
Set this to not add warning flags to the compiler invocations.
Useful as a temporary workaround when code enters the tree
which triggers warnings in environments that differ from the
-original develoepr.
+original developer.
diff --git a/tools/build/options/WITH_FMAKE b/tools/build/options/WITH_FMAKE
index 72ae456..9a98c8c 100644
--- a/tools/build/options/WITH_FMAKE
+++ b/tools/build/options/WITH_FMAKE
@@ -1,4 +1,4 @@
.\" $FreeBSD$
-Causes the old FreeBSD
+Causes the old FreeBSD
.Xr make 1
program to be built and installed as fmake.
diff --git a/tools/build/options/WITH_INFO b/tools/build/options/WITH_INFO
deleted file mode 100644
index 01c8291..0000000
--- a/tools/build/options/WITH_INFO
+++ /dev/null
@@ -1,4 +0,0 @@
-.\" $FreeBSD$
-Set to make or install
-.Xr info 5
-files.
diff --git a/tools/build/stdlib.h b/tools/build/stdlib.h
new file mode 100644
index 0000000..5f9b90b
--- /dev/null
+++ b/tools/build/stdlib.h
@@ -0,0 +1,42 @@
+/*-
+ * Copyright (c) 2015 Dimitry Andric <dim@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LEGACY_STDLIB_H_
+#define _LEGACY_STDLIB_H_
+
+#include_next <stdlib.h>
+
+__BEGIN_DECLS
+
+#if __BSD_VISIBLE
+void *reallocarray(void *, size_t, size_t);
+#endif /* __BSD_VISIBLE */
+
+__END_DECLS
+
+#endif /* !_LEGACY_STDLIB_H_ */
diff --git a/tools/debugscripts/netstat-anr.gdb b/tools/debugscripts/netstat-anr.gdb
new file mode 100644
index 0000000..d27ae65
--- /dev/null
+++ b/tools/debugscripts/netstat-anr.gdb
@@ -0,0 +1,163 @@
+#
+# $FreeBSD$
+#
+
+document netstat-anr
+Print routing tables as 'netstat -anr' does.
+end
+
+set $debug = 0
+
+set $AF_INET = 2
+set $AF_LINK = 18
+
+set $RNF_ROOT = 2
+set $RNF_ACTIVE = 4
+
+set $RTF_UP = 0x1
+set $RTF_GATEWAY = 0x2
+set $RTF_HOST = 0x4
+set $RTF_STATIC = 0x800
+
+#
+# XXX: alas, we can't script "show endian"
+#
+if (machine[0] == 'a' && machine[1] == 'm' && machine[2] == 'd') || \
+ (machine[0] == 'i' && machine[1] == '3' && machine[2] == '8')
+ set $byteswap = 1
+else
+ set $byteswap = 0
+end
+
+define routename
+ if ($byteswap)
+ printf "%u.%u.%u.%u", \
+ $arg0 & 0xff, ($arg0 >> 8) & 0xff, \
+ ($arg0 >> 16) & 0xff, ($arg0 >> 24) & 0xff
+ else
+ printf "%u.%u.%u.%u", \
+ ($arg0 >> 24) & 0xff, ($arg0 >> 16) & 0xff, \
+ ($arg0 >> 8) & 0xff, $arg0 & 0xff
+ end
+end
+
+define domask
+ set $i = 0
+ set $b = 0
+ while $b < 32
+ if ($arg0 & (1 << $b))
+ set $i = $i + 1
+ end
+ set $b = $b + 1
+ end
+ printf "/%d", $i
+end
+
+define p_flags
+ if ($arg0 & $RTF_UP)
+ printf "U"
+ end
+ if ($arg0 & $RTF_GATEWAY)
+ printf "G"
+ end
+ if ($arg0 & $RTF_HOST)
+ printf "H"
+ end
+ if ($arg0 & $RTF_STATIC)
+ printf "S"
+ end
+end
+
+define p_sockaddr
+ set $sa = (struct sockaddr *)$arg0
+ set $flags = $arg2
+ if ($sa->sa_family == $AF_INET)
+ set $sin = (struct sockaddr_in *)$arg0
+ set $mask = (struct sockaddr_in *)$arg1
+ if ($flags & $RTF_HOST)
+ routename $sin->sin_addr.s_addr
+ else
+ routename $sin->sin_addr.s_addr
+ if ($mask != 0)
+ domask $mask->sin_addr.s_addr
+ else
+ domask 0
+ end
+ end
+ end
+ if ($sa->sa_family == $AF_LINK)
+ set $sdl = (struct sockaddr_dl *)$arg0
+ if ($sdl->sdl_nlen == 0 && $sdl->sdl_alen == 0 && \
+ $sdl->sdl_slen == 0)
+ printf "link#%d", $sdl->sdl_index
+ end
+ end
+end
+
+define p_rtentry
+ set $rte = (struct rtentry *)$arg0
+ set $rn = (struct radix_node *)$arg0
+ set $sa = ((struct sockaddr **)($rn->rn_u.rn_leaf.rn_Key))
+ set $sam = ((struct sockaddr **)($rn->rn_u.rn_leaf.rn_Mask))
+ set $gw = $rte->rt_gateway
+
+ p_sockaddr $sa $sam $rte->rt_flags
+ printf "\t"
+ p_sockaddr $gw 0 $RTF_HOST
+ printf "\t"
+ p_flags $rte->rt_flags
+ printf "\t"
+ if ($rte->rt_ifp != 0)
+ printf "%s", $rte->rt_ifp->if_xname
+ end
+ printf "\n"
+end
+
+define p_rtree
+ set $rn_$arg0 = (struct radix_node *)$arg1
+ set $left_$arg0 = $arg0 + 1
+ set $right_$arg0 = $arg0 + 2
+ set $duped_$arg0 = $arg0 + 3
+
+ if ($rn_$arg0->rn_bit < 0 || ($rn_$arg0->rn_flags & $RNF_ACTIVE) == 0)
+ if ($debug == 1)
+ printf "print "
+ p $rn_$arg0
+ end
+ if (($rn_$arg0->rn_flags & ($RNF_ACTIVE | $RNF_ROOT)) == \
+ $RNF_ACTIVE)
+ p_rtentry $rn_$arg0
+ end
+ if (($rn_$arg0->rn_flags & $RNF_ACTIVE) != 0 && \
+ $rn_$arg0->rn_u.rn_leaf.rn_Dupedkey != 0)
+ if ($debug == 1)
+ printf "duped "
+ p $rn_$arg0
+ end
+ p_rtree $duped_$arg0 $rn_$arg0->rn_u.rn_leaf.rn_Dupedkey
+ end
+ else
+ if ($rn_$arg0->rn_u.rn_node.rn_R != 0)
+ if ($debug == 1)
+ printf "right "
+ p $rn_$arg0
+ end
+ p_rtree $right_$arg0 $rn_$arg0->rn_u.rn_node.rn_R
+ end
+ if ($rn_$arg0->rn_u.rn_node.rn_L != 0)
+ if ($debug == 1)
+ printf "left "
+ p $rn_$arg0
+ end
+ p_rtree $left_$arg0 $rn_$arg0->rn_u.rn_node.rn_L
+ end
+ end
+end
+
+define netstat-anr
+ printf "Routing tables\n\nInternet:\n"
+ set $af = $AF_INET
+ set $rt = (struct radix_node_head **)rt_tables + $af
+ printf "Destination\tGateway\tFlags\tNetif\n"
+ p_rtree 0 $rt->rnh_treetop
+end
diff --git a/tools/regression/aio/aiop/Makefile b/tools/regression/aio/aiop/Makefile
index aac9a3b..38d9db6 100644
--- a/tools/regression/aio/aiop/Makefile
+++ b/tools/regression/aio/aiop/Makefile
@@ -3,4 +3,6 @@
PROG= aiop
MAN=
+WARNS= 6
+
.include <bsd.prog.mk>
diff --git a/tools/regression/aio/aiop/aiop.c b/tools/regression/aio/aiop/aiop.c
index 3e64dbe..98a176e 100644
--- a/tools/regression/aio/aiop/aiop.c
+++ b/tools/regression/aio/aiop/aiop.c
@@ -39,21 +39,22 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/time.h>
#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <sys/ioctl.h>
#include <sys/disk.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
#include <aio.h>
+#include <assert.h>
+#include <ctype.h>
+#include <err.h>
#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
-#include <assert.h>
+#include <time.h>
+#include <unistd.h>
/*
* This is a bit of a quick hack to do parallel IO testing through POSIX AIO.
@@ -84,14 +85,12 @@ disk_getsize(int fd)
{
off_t mediasize;
- if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) {
- perror("ioctl(DIOCGMEDIASIZE)");
- exit(1);
- }
- return mediasize;
+ if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0)
+ err(1, "ioctl(DIOCGMEDIASIZE)");
+ return (mediasize);
}
-iot_t
+static iot_t
choose_aio(iot_t iomask)
{
/* choose a random read or write event, limited by the mask */
@@ -102,7 +101,7 @@ choose_aio(iot_t iomask)
return (random() & 0x01 ? IOT_READ : IOT_WRITE);
}
-void
+static void
set_aio(struct aiocb *a, iot_t iot, int fd, off_t offset, int size, char *buf)
{
int r;
@@ -115,10 +114,8 @@ set_aio(struct aiocb *a, iot_t iot, int fd, off_t offset, int size, char *buf)
r = aio_read(a);
else
r = aio_write(a);
- if (r != 0) {
- perror("set_aio");
- exit(1);
- }
+ if (r != 0)
+ err(1, "set_aio call failed");
}
int
@@ -134,30 +131,35 @@ main(int argc, char *argv[])
off_t file_size, offset;
struct aiocb *a;
int i, n;
- struct timeval st, et, rt;
- float f_rt;
+ struct timeval st, et, rt;
+ float f_rt;
iot_t iowhat;
if (argc < 6) {
- printf("Usage: %s <file> <io size> <number of runs> <concurrency> <ro|wo|rw>\n", argv[0]);
+ printf("Usage: %s <file> <io size> <number of runs> <concurrency> <ro|wo|rw>\n",
+ argv[0]);
exit(1);
}
fn = argv[1];
io_size = atoi(argv[2]);
+ if (io_size <= 0)
+ errx(1, "the I/O size must be >0");
nrun = atoi(argv[3]);
+ if (nrun <= 0)
+ errx(1, "the number of runs must be >0");
aio_len = atoi(argv[4]);
- if (strcmp(argv[5], "ro") == 0) {
+ if (aio_len <= 0)
+ errx(1, "AIO concurrency must be >0");
+ if (strcmp(argv[5], "ro") == 0)
iowhat = IOT_READ;
- } else if (strcmp(argv[5], "rw") == 0) {
+ else if (strcmp(argv[5], "rw") == 0)
iowhat = IOT_READ | IOT_WRITE;
- } else if (strcmp(argv[5], "wo") == 0) {
+ else if (strcmp(argv[5], "wo") == 0)
iowhat = IOT_WRITE;
- } else {
- fprintf(stderr, "needs to be ro, rw, wo!\n");
- exit(1);
- }
+ else
+ errx(1, "the I/O type needs to be \"ro\", \"rw\", or \"wo\"!\n");
/*
* Random returns values between 0 and (2^32)-1; only good for 4 gig.
@@ -171,35 +173,31 @@ main(int argc, char *argv[])
else
fd = open(fn, O_RDWR | O_DIRECT);
- if (fd < 0) {
- perror("open");
- exit(1);
- }
- if (fstat(fd, &sb) < 0) {
- perror("fstat");
- exit(1);
- }
+ if (fd < 0)
+ err(1, "open failed");
+ if (fstat(fd, &sb) < 0)
+ err(1, "fstat failed");
if (S_ISREG(sb.st_mode)) {
file_size = sb.st_size;
} else if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) {
file_size = disk_getsize(fd);
- } else {
- perror("unknown file type\n");
- exit(1);
- }
+ } else
+ errx(1, "unknown file type");
+ if (file_size <= 0)
+ errx(1, "path provided too small");
+
printf("File: %s; File size %jd bytes\n", fn, (intmax_t)file_size);
aio = calloc(aio_len, sizeof(struct aiocb));
abuf = calloc(aio_len, sizeof(char *));
- for (i = 0; i < aio_len; i++) {
+ for (i = 0; i < aio_len; i++)
abuf[i] = calloc(1, io_size * sizeof(char));
- }
/* Fill with the initial contents */
- gettimeofday(&st, NULL);
+ gettimeofday(&st, NULL);
for (i = 0; i < aio_len; i++) {
- offset = random() % (file_size / io_size);
- offset *= io_size;
+ offset = random() % (file_size / io_size);
+ offset *= io_size;
set_aio(aio + i, choose_aio(iowhat), fd, offset, io_size, abuf[i]);
}
@@ -208,18 +206,18 @@ main(int argc, char *argv[])
n = a - aio;
assert(n < aio_len);
assert(n >= 0);
- offset = random() % (file_size / io_size);
- offset *= io_size;
+ offset = random() % (file_size / io_size);
+ offset *= io_size;
set_aio(aio + n, choose_aio(iowhat), fd, offset, io_size, abuf[n]);
}
- gettimeofday(&et, NULL);
- timersub(&et, &st, &rt);
- f_rt = ((float) (rt.tv_usec)) / 1000000.0;
- f_rt += (float) (rt.tv_sec);
- printf("Runtime: %.2f seconds, ", f_rt);
- printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt);
- printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt);
+ gettimeofday(&et, NULL);
+ timersub(&et, &st, &rt);
+ f_rt = ((float) (rt.tv_usec)) / 1000000.0;
+ f_rt += (float) (rt.tv_sec);
+ printf("Runtime: %.2f seconds, ", f_rt);
+ printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt);
+ printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt);
diff --git a/tools/regression/aio/aiotest/Makefile b/tools/regression/aio/aiotest/Makefile
deleted file mode 100644
index 6e59f42..0000000
--- a/tools/regression/aio/aiotest/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= aiotest
-MAN=
-
-DPADD= ${LIBUTIL}
-LDADD= -lutil
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/aio/aiotest/aiotest.c b/tools/regression/aio/aiotest/aiotest.c
deleted file mode 100644
index 48c7aba..0000000
--- a/tools/regression/aio/aiotest/aiotest.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/*-
- * Copyright (c) 2004 Robert N. M. Watson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Regression test to do some very basic AIO exercising on several types of
- * file descriptors. Currently, the tests consist of initializing a fixed
- * size buffer with pseudo-random data, writing it to one fd using AIO, then
- * reading it from a second descriptor using AIO. For some targets, the same
- * fd is used for write and read (i.e., file, md device), but for others the
- * operation is performed on a peer (pty, socket, fifo, etc). A timeout is
- * initiated to detect undo blocking. This test does not attempt to exercise
- * error cases or more subtle asynchronous behavior, just make sure that the
- * basic operations work on some basic object types.
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/mdioctl.h>
-
-#include <aio.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <libutil.h>
-#include <limits.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
-
-#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX"
-
-/*
- * GLOBAL_MAX sets the largest usable buffer size to be read and written, as
- * it sizes ac_buffer in the aio_context structure. It is also the default
- * size for file I/O. For other types, we use smaller blocks or we risk
- * blocking (and we run in a single process/thread so that would be bad).
- */
-#define GLOBAL_MAX 16384
-
-#define BUFFER_MAX GLOBAL_MAX
-struct aio_context {
- const char *ac_test;
- int ac_read_fd, ac_write_fd;
- long ac_seed;
- char ac_buffer[GLOBAL_MAX];
- int ac_buflen;
- int ac_seconds;
- void (*ac_cleanup)(void *arg);
- void *ac_cleanup_arg;
-};
-
-static int aio_timedout;
-static int aio_notpresent;
-
-/*
- * Attempt to provide a cleaner failure mode in the event AIO support is not
- * present by catching and reporting SIGSYS.
- */
-static void
-aio_sigsys(int sig)
-{
-
- aio_notpresent = 1;
-}
-
-static void
-aio_sigsys_setup(void)
-{
-
- if (signal(SIGSYS, aio_sigsys) == SIG_ERR)
- errx(-1, "FAIL: signal(SIGSYS): %s", strerror(errno));
-}
-
-/*
- * Each test run specifies a timeout in seconds. Use the somewhat obsoleted
- * signal(3) and alarm(3) APIs to set this up.
- */
-static void
-aio_timeout_signal(int sig)
-{
-
- aio_timedout = 1;
-}
-
-static void
-aio_timeout_start(const char *string1, const char *string2, int seconds)
-{
-
- aio_timedout = 0;
- if (signal(SIGALRM, aio_timeout_signal) == SIG_ERR)
- errx(-1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s",
- string1, string2, strerror(errno));
- alarm(seconds);
-}
-
-static void
-aio_timeout_stop(const char *string1, const char *string2)
-{
-
- if (signal(SIGALRM, NULL) == SIG_ERR)
- errx(-1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s",
- string1, string2, strerror(errno));
- alarm(0);
-}
-
-/*
- * Fill a buffer given a seed that can be fed into srandom() to initialize
- * the PRNG in a repeatable manner.
- */
-static void
-aio_fill_buffer(char *buffer, int len, long seed)
-{
- char ch;
- int i;
-
- srandom(seed);
- for (i = 0; i < len; i++) {
- ch = random() & 0xff;
- buffer[i] = ch;
- }
-}
-
-/*
- * Test that a buffer matches a given seed. See aio_fill_buffer(). Return
- * (1) on a match, (0) on a mismatch.
- */
-static int
-aio_test_buffer(char *buffer, int len, long seed)
-{
- char ch;
- int i;
-
- srandom(seed);
- for (i = 0; i < len; i++) {
- ch = random() & 0xff;
- if (buffer[i] != ch)
- return (0);
- }
- return (1);
-}
-
-/*
- * Initialize a testing context given the file descriptors provided by the
- * test setup.
- */
-static void
-aio_context_init(struct aio_context *ac, const char *test, int read_fd,
- int write_fd, int buflen, int seconds, void (*cleanup)(void *),
- void *cleanup_arg)
-{
-
- if (buflen > BUFFER_MAX)
- errx(-1, "FAIL: %s: aio_context_init: buffer too large",
- test);
- bzero(ac, sizeof(*ac));
- ac->ac_test = test;
- ac->ac_read_fd = read_fd;
- ac->ac_write_fd = write_fd;
- ac->ac_buflen = buflen;
- srandomdev();
- ac->ac_seed = random();
- aio_fill_buffer(ac->ac_buffer, buflen, ac->ac_seed);
- if (aio_test_buffer(ac->ac_buffer, buflen, ac->ac_seed) == 0)
- errx(-1, "%s: aio_context_init: aio_test_buffer: internal "
- "error", test);
- ac->ac_seconds = seconds;
- ac->ac_cleanup = cleanup;
- ac->ac_cleanup_arg = cleanup_arg;
-}
-
-/*
- * Each tester can register a callback to clean up in the event the test
- * fails. Preserve the value of errno so that subsequent calls to errx()
- * work properly.
- */
-static void
-aio_cleanup(struct aio_context *ac)
-{
- int error;
-
- if (ac->ac_cleanup == NULL)
- return;
- error = errno;
- (ac->ac_cleanup)(ac->ac_cleanup_arg);
- errno = error;
-}
-
-/*
- * Perform a simple write test of our initialized data buffer to the provided
- * file descriptor.
- */
-static void
-aio_write_test(struct aio_context *ac)
-{
- struct aiocb aio, *aiop;
- ssize_t len;
- int error;
-
- bzero(&aio, sizeof(aio));
- aio.aio_buf = ac->ac_buffer;
- aio.aio_nbytes = ac->ac_buflen;
- aio.aio_fildes = ac->ac_write_fd;
- aio.aio_offset = 0;
-
- aio_timeout_start(ac->ac_test, "aio_write_test", ac->ac_seconds);
-
- if (aio_write(&aio) < 0) {
- if (errno == EINTR) {
- if (aio_notpresent)
- errno = EOPNOTSUPP;
- if (aio_timedout) {
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_write_test: "
- "aio_write: timed out", ac->ac_test);
- }
- }
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_write_test: aio_write: %s",
- ac->ac_test, strerror(errno));
- }
-
- len = aio_waitcomplete(&aiop, NULL);
- if (len < 0) {
- if (errno == EINTR) {
- if (aio_notpresent)
- errno = EOPNOTSUPP;
- if (aio_timedout) {
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_write_test: "
- "aio_waitcomplete: timed out",
- ac->ac_test);
- }
- }
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s",
- ac->ac_test, strerror(errno));
- }
-
- aio_timeout_stop(ac->ac_test, "aio_write_test");
-
- if (len != ac->ac_buflen) {
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: short "
- "write (%jd)", ac->ac_test, (intmax_t)len);
- }
-}
-
-/*
- * Perform a simple read test of our initialized data buffer from the
- * provided file descriptor.
- */
-static void
-aio_read_test(struct aio_context *ac)
-{
- struct aiocb aio, *aiop;
- ssize_t len;
-
- bzero(ac->ac_buffer, ac->ac_buflen);
- bzero(&aio, sizeof(aio));
- aio.aio_buf = ac->ac_buffer;
- aio.aio_nbytes = ac->ac_buflen;
- aio.aio_fildes = ac->ac_read_fd;
- aio.aio_offset = 0;
-
- aio_timeout_start(ac->ac_test, "aio_read_test", ac->ac_seconds);
-
- if (aio_read(&aio) < 0) {
- if (errno == EINTR) {
- if (aio_notpresent)
- errno = EOPNOTSUPP;
- if (aio_timedout) {
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_read_test: "
- "aio_read: timed out", ac->ac_test);
- }
- }
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test,
- strerror(errno));
- }
-
- len = aio_waitcomplete(&aiop, NULL);
- if (len < 0) {
- if (errno == EINTR) {
- if (aio_notpresent)
- errno = EOPNOTSUPP;
- if (aio_timedout) {
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_read_test: "
- "aio_waitcomplete: timed out",
- ac->ac_test);
- }
- }
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s",
- ac->ac_test, strerror(errno));
- }
-
- aio_timeout_stop(ac->ac_test, "aio_read_test");
-
- if (len != ac->ac_buflen) {
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: short "
- "read (%jd)", ac->ac_test, (intmax_t)len);
- }
-
- if (aio_test_buffer(ac->ac_buffer, ac->ac_buflen, ac->ac_seed) == 0) {
- aio_cleanup(ac);
- errx(-1, "FAIL: %s: aio_read_test: buffer mismatch",
- ac->ac_test);
- }
-}
-
-/*
- * Series of type-specific tests for AIO. For now, we just make sure we can
- * issue a write and then a read to each type. We assume that once a write
- * is issued, a read can follow.
- */
-
-/*
- * Test with a classic file. Assumes we can create a moderate size temporary
- * file.
- */
-struct aio_file_arg {
- int afa_fd;
- char *afa_pathname;
-};
-
-static void
-aio_file_cleanup(void *arg)
-{
- struct aio_file_arg *afa;
-
- afa = arg;
- close(afa->afa_fd);
- unlink(afa->afa_pathname);
-}
-
-#define FILE_LEN GLOBAL_MAX
-#define FILE_TIMEOUT 30
-static void
-aio_file_test(void)
-{
- char pathname[PATH_MAX];
- struct aio_file_arg arg;
- struct aio_context ac;
- int fd;
-
- strcpy(pathname, PATH_TEMPLATE);
- fd = mkstemp(pathname);
- if (fd == -1)
- errx(-1, "FAIL: aio_file_test: mkstemp: %s",
- strerror(errno));
-
- arg.afa_fd = fd;
- arg.afa_pathname = pathname;
-
- aio_context_init(&ac, "aio_file_test", fd, fd, FILE_LEN,
- FILE_TIMEOUT, aio_file_cleanup, &arg);
- aio_write_test(&ac);
- aio_read_test(&ac);
-
- aio_file_cleanup(&arg);
-
- fprintf(stderr, "PASS: aio_file_test\n");
-}
-
-struct aio_fifo_arg {
- int afa_read_fd;
- int afa_write_fd;
- char *afa_pathname;
-};
-
-static void
-aio_fifo_cleanup(void *arg)
-{
- struct aio_fifo_arg *afa;
-
- afa = arg;
- if (afa->afa_read_fd != -1)
- close(afa->afa_read_fd);
- if (afa->afa_write_fd != -1)
- close(afa->afa_write_fd);
- unlink(afa->afa_pathname);
-}
-
-#define FIFO_LEN 256
-#define FIFO_TIMEOUT 30
-static void
-aio_fifo_test(void)
-{
- int error, read_fd = -1, write_fd = -1;
- struct aio_fifo_arg arg;
- char pathname[PATH_MAX];
- struct aio_context ac;
-
- /*
- * In theory, mktemp() can return a name that is then collided with.
- * Because this is a regression test, we treat that as a test failure
- * rather than retrying.
- */
- strcpy(pathname, PATH_TEMPLATE);
- mktemp(pathname);
- if (mkfifo(pathname, 0600) == -1)
- errx(-1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno));
- arg.afa_pathname = pathname;
- arg.afa_read_fd = -1;
- arg.afa_write_fd = -1;
-
- read_fd = open(pathname, O_RDONLY | O_NONBLOCK);
- if (read_fd == -1) {
- error = errno;
- aio_fifo_cleanup(&arg);
- errno = error;
- errx(-1, "FAIL: aio_fifo_test: read_fd open: %s",
- strerror(errno));
- }
- arg.afa_read_fd = read_fd;
-
- write_fd = open(pathname, O_WRONLY);
- if (write_fd == -1) {
- error = errno;
- aio_fifo_cleanup(&arg);
- errno = error;
- errx(-1, "FAIL: aio_fifo_test: write_fd open: %s",
- strerror(errno));
- }
- arg.afa_write_fd = write_fd;
-
- aio_context_init(&ac, "aio_fifo_test", read_fd, write_fd, FIFO_LEN,
- FIFO_TIMEOUT, aio_fifo_cleanup, &arg);
- aio_write_test(&ac);
- aio_read_test(&ac);
-
- aio_fifo_cleanup(&arg);
-
- fprintf(stderr, "PASS: aio_fifo_test\n");
-}
-
-struct aio_unix_socketpair_arg {
- int asa_sockets[2];
-};
-
-static void
-aio_unix_socketpair_cleanup(void *arg)
-{
- struct aio_unix_socketpair_arg *asa;
-
- asa = arg;
- close(asa->asa_sockets[0]);
- close(asa->asa_sockets[1]);
-}
-
-#define UNIX_SOCKETPAIR_LEN 256
-#define UNIX_SOCKETPAIR_TIMEOUT 30
-static void
-aio_unix_socketpair_test(void)
-{
- struct aio_unix_socketpair_arg arg;
- struct aio_context ac;
- int sockets[2];
-
- if (socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) < 0)
- errx(-1, "FAIL: aio_socketpair_test: socketpair: %s",
- strerror(errno));
-
- arg.asa_sockets[0] = sockets[0];
- arg.asa_sockets[1] = sockets[1];
- aio_context_init(&ac, "aio_unix_socketpair_test", sockets[0],
- sockets[1], UNIX_SOCKETPAIR_LEN, UNIX_SOCKETPAIR_TIMEOUT,
- aio_unix_socketpair_cleanup, &arg);
- aio_write_test(&ac);
- aio_read_test(&ac);
-
- aio_unix_socketpair_cleanup(&arg);
-
- fprintf(stderr, "PASS: aio_unix_socketpair_test\n");
-}
-
-struct aio_pty_arg {
- int apa_read_fd;
- int apa_write_fd;
-};
-
-static void
-aio_pty_cleanup(void *arg)
-{
- struct aio_pty_arg *apa;
-
- apa = arg;
- close(apa->apa_read_fd);
- close(apa->apa_write_fd);
-};
-
-#define PTY_LEN 256
-#define PTY_TIMEOUT 30
-static void
-aio_pty_test(void)
-{
- struct aio_pty_arg arg;
- struct aio_context ac;
- int read_fd, write_fd;
- struct termios ts;
- int error;
-
- if (openpty(&read_fd, &write_fd, NULL, NULL, NULL) < 0)
- errx(-1, "FAIL: aio_pty_test: openpty: %s", strerror(errno));
-
- arg.apa_read_fd = read_fd;
- arg.apa_write_fd = write_fd;
-
- if (tcgetattr(write_fd, &ts) < 0) {
- error = errno;
- aio_pty_cleanup(&arg);
- errno = error;
- errx(-1, "FAIL: aio_pty_test: tcgetattr: %s",
- strerror(errno));
- }
- cfmakeraw(&ts);
- if (tcsetattr(write_fd, TCSANOW, &ts) < 0) {
- error = errno;
- aio_pty_cleanup(&arg);
- errno = error;
- errx(-1, "FAIL: aio_pty_test: tcsetattr: %s",
- strerror(errno));
- }
-
- aio_context_init(&ac, "aio_pty_test", read_fd, write_fd, PTY_LEN,
- PTY_TIMEOUT, aio_pty_cleanup, &arg);
- aio_write_test(&ac);
- aio_read_test(&ac);
-
- aio_pty_cleanup(&arg);
-
- fprintf(stderr, "PASS: aio_pty_test\n");
-}
-
-static void
-aio_pipe_cleanup(void *arg)
-{
- int *pipes = arg;
-
- close(pipes[0]);
- close(pipes[1]);
-}
-
-#define PIPE_LEN 256
-#define PIPE_TIMEOUT 30
-static void
-aio_pipe_test(void)
-{
- struct aio_context ac;
- int pipes[2];
-
- if (pipe(pipes) < 0)
- errx(-1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno));
-
- aio_context_init(&ac, "aio_file_test", pipes[0], pipes[1], PIPE_LEN,
- PIPE_TIMEOUT, aio_pipe_cleanup, pipes);
- aio_write_test(&ac);
- aio_read_test(&ac);
-
- aio_pipe_cleanup(pipes);
-
- fprintf(stderr, "PASS: aio_pipe_test\n");
-}
-
-struct aio_md_arg {
- int ama_mdctl_fd;
- int ama_unit;
- int ama_fd;
-};
-
-static void
-aio_md_cleanup(void *arg)
-{
- struct aio_md_arg *ama;
- struct md_ioctl mdio;
- int error;
-
- ama = arg;
-
- if (ama->ama_fd != -1)
- close(ama->ama_fd);
-
- if (ama->ama_unit != -1) {
- bzero(&mdio, sizeof(mdio));
- mdio.md_version = MDIOVERSION;
- mdio.md_unit = ama->ama_unit;
- if (ioctl(ama->ama_mdctl_fd, MDIOCDETACH, &mdio) < 0) {
- error = errno;
- close(ama->ama_mdctl_fd);
- errno = error;
- warnx("FAIL: aio_md_test: MDIOCDETACH: %s",
- strerror(errno));
- }
- }
-
- close(ama->ama_mdctl_fd);
-}
-
-#define MD_LEN GLOBAL_MAX
-#define MD_TIMEOUT 30
-static void
-aio_md_test(void)
-{
- int error, fd, i, mdctl_fd, unit;
- char pathname[PATH_MAX];
- struct aio_md_arg arg;
- struct aio_context ac;
- struct md_ioctl mdio;
-
- mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0);
- if (mdctl_fd < 0)
- errx(-1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME,
- strerror(errno));
-
- bzero(&mdio, sizeof(mdio));
- mdio.md_version = MDIOVERSION;
- mdio.md_type = MD_MALLOC;
- mdio.md_options = MD_AUTOUNIT | MD_COMPRESS;
- mdio.md_mediasize = GLOBAL_MAX;
- mdio.md_sectorsize = 512;
-
- arg.ama_mdctl_fd = mdctl_fd;
- arg.ama_unit = -1;
- arg.ama_fd = -1;
- if (ioctl(mdctl_fd, MDIOCATTACH, &mdio) < 0) {
- error = errno;
- aio_md_cleanup(&arg);
- errno = error;
- errx(-1, "FAIL: aio_md_test: MDIOCATTACH: %s",
- strerror(errno));
- }
-
- arg.ama_unit = unit = mdio.md_unit;
- snprintf(pathname, PATH_MAX, "/dev/md%d", unit);
- fd = open(pathname, O_RDWR);
- if (fd < 0) {
- error = errno;
- aio_md_cleanup(&arg);
- errno = error;
- errx(-1, "FAIL: aio_md_test: open(%s): %s", pathname,
- strerror(errno));
- }
- arg.ama_fd = fd;
-
- aio_context_init(&ac, "aio_md_test", fd, fd, MD_LEN, MD_TIMEOUT,
- aio_md_cleanup, &arg);
- aio_write_test(&ac);
- aio_read_test(&ac);
-
- aio_md_cleanup(&arg);
-
- fprintf(stderr, "PASS: aio_md_test\n");
-}
-
-int
-main(int argc, char *argv[])
-{
-
- aio_sigsys_setup();
- aio_file_test();
- aio_fifo_test();
- aio_unix_socketpair_test();
- aio_pty_test();
- aio_pipe_test();
- if (geteuid() == 0)
- aio_md_test();
- else
- fprintf(stderr, "WARNING: aio_md_test: skipped as euid "
- "!= 0\n");
-}
diff --git a/tools/regression/aio/kqueue/aio_kqueue.c b/tools/regression/aio/kqueue/aio_kqueue.c
deleted file mode 100644
index d24e97b..0000000
--- a/tools/regression/aio/kqueue/aio_kqueue.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*-
- * Copyright (C) 2005 IronPort Systems, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Prerequisities:
- * - AIO support must be compiled into the kernel (see sys/<arch>/NOTES for
- * more details).
- *
- * Note: it is a good idea to run this against a physical drive to
- * exercise the physio fast path (ie. aio_kqueue /dev/<something safe>)
- */
-
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/time.h>
-#include <aio.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX"
-
-#define MAX 128
-#define MAX_RUNS 300
-/* #define DEBUG */
-
-int
-main (int argc, char *argv[])
-{
- int fd;
- struct aiocb *iocb[MAX], *kq_iocb;
- int i, result, run, error, j;
- char buffer[32768];
- int kq = kqueue();
- struct kevent ke, kq_returned;
- struct timespec ts;
- int cancel, pending, tmp_file = 0, failed = 0;
- char *file, pathname[sizeof(PATH_TEMPLATE)+1];
-
- if (kq < 0) {
- perror("No kqeueue\n");
- exit(1);
- }
-
- if (argc == 1) {
- strcpy(pathname, PATH_TEMPLATE);
- fd = mkstemp(pathname);
- file = pathname;
- tmp_file = 1;
- } else {
- file = argv[1];
- fd = open(file, O_RDWR|O_CREAT, 0666);
- }
- if (fd == -1)
- err(1, "Can't open %s\n", file);
-
- for (run = 0; run < MAX_RUNS; run++){
-#ifdef DEBUG
- printf("Run %d\n", run);
-#endif
- for (i = 0; i < MAX; i++) {
- iocb[i] = (struct aiocb *)calloc(1,
- sizeof(struct aiocb));
- if (iocb[i] == NULL)
- err(1, "calloc");
- }
-
- pending = 0;
- for (i = 0; i < MAX; i++) {
- pending++;
- iocb[i]->aio_nbytes = sizeof(buffer);
- iocb[i]->aio_buf = buffer;
- iocb[i]->aio_fildes = fd;
- iocb[i]->aio_offset = iocb[i]->aio_nbytes * i * run;
-
- iocb[i]->aio_sigevent.sigev_notify_kqueue = kq;
- iocb[i]->aio_sigevent.sigev_value.sival_ptr = iocb[i];
- iocb[i]->aio_sigevent.sigev_notify = SIGEV_KEVENT;
-
- result = aio_write(iocb[i]);
- if (result != 0) {
- perror("aio_write");
- printf("Result %d iteration %d\n", result, i);
- exit(1);
- }
-#ifdef DEBUG
- printf("WRITE %d is at %p\n", i, iocb[i]);
-#endif
- result = rand();
- if (result < RAND_MAX/32) {
- if (result > RAND_MAX/64) {
- result = aio_cancel(fd, iocb[i]);
-#ifdef DEBUG
- printf("Cancel %d %p result %d\n", i, iocb[i], result);
-#endif
- if (result == AIO_CANCELED) {
- aio_return(iocb[i]);
- iocb[i] = NULL;
- pending--;
- }
- }
- }
- }
- cancel = MAX - pending;
-
- i = 0;
- while (pending) {
-
- for (;;) {
-
- bzero(&ke, sizeof(ke));
- bzero(&kq_returned, sizeof(ke));
- ts.tv_sec = 0;
- ts.tv_nsec = 1;
- result = kevent(kq, NULL, 0,
- &kq_returned, 1, &ts);
- error = errno;
- if (result < 0)
- perror("kevent error: ");
- kq_iocb = kq_returned.udata;
-#ifdef DEBUG
- printf("kevent %d %d errno %d return.ident %p "
- "return.data %p return.udata %p %p\n",
- i, result, error,
- kq_returned.ident, kq_returned.data,
- kq_returned.udata,
- kq_iocb);
-#endif
-
- if (kq_iocb)
- break;
-#ifdef DEBUG
- printf("Try again left %d out of %d %d\n",
- pending, MAX, cancel);
-#endif
- }
-
- for (j = 0; j < MAX && iocb[j] != kq_iocb;
- j++) ;
-#ifdef DEBUG
- printf("kq_iocb %p\n", kq_iocb);
-
- printf("Error Result for %d is %d pending %d\n",
- j, result, pending);
-#endif
- result = aio_return(kq_iocb);
-#ifdef DEBUG
- printf("Return Result for %d is %d\n\n", j, result);
-#endif
- if (result != sizeof(buffer)) {
- printf("FAIL: run %d, operation %d, result %d "
- " (errno=%d) should be %d\n", run, pending,
- result, errno, sizeof(buffer));
- failed++;
- } else
- printf("PASS: run %d, left %d\n", run,
- pending - 1);
-
- free(kq_iocb);
- iocb[j] = NULL;
- pending--;
- i++;
- }
-
- for (i = 0; i < MAX; i++)
- free(iocb[i]);
-
- }
-
- if (tmp_file)
- unlink(pathname);
-
- if (failed != 0)
- printf("FAIL: %d tests failed\n", failed);
- else
- printf("PASS: All tests passed\n");
-
- exit (failed == 0 ? 0 : 1);
-}
diff --git a/tools/regression/aio/kqueue/lio/Makefile b/tools/regression/aio/kqueue/lio/Makefile
deleted file mode 100644
index 4d64a0c..0000000
--- a/tools/regression/aio/kqueue/lio/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-PROG= lio_kqueue
-MAN=
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/aio/kqueue/lio/lio_kqueue.c b/tools/regression/aio/kqueue/lio/lio_kqueue.c
deleted file mode 100644
index b486ec3..0000000
--- a/tools/regression/aio/kqueue/lio/lio_kqueue.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*-
- * Copyright (C) 2005 IronPort Systems, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Note: it is a good idea to run this against a physical drive to
- * exercise the physio fast path (ie. lio_kqueue /dev/<something safe>)
- * This will ensure op's counting is correct. It is currently broken.
- *
- * Also note that LIO & kqueue is not implemented in FreeBSD yet, LIO
- * is also broken with respect to op's and some paths.
- *
- * A patch to make this work is at:
- * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch
- */
-
-#include <aio.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX"
-
-#define LIO_MAX 5
-#define MAX LIO_MAX * 16
-#define MAX_RUNS 300
-
-main(int argc, char *argv[]){
- int fd;
- struct aiocb *iocb[MAX], *kq_iocb;
- struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio;
- int i, result, run, error, j, k;
- char buffer[32768];
- int kq = kqueue();
- struct kevent ke, kq_returned;
- struct timespec ts;
- struct sigevent sig;
- time_t time1, time2;
- char *file, pathname[sizeof(PATH_TEMPLATE)-1];
- int tmp_file = 0, failed = 0;
-
- if (kq < 0) {
- perror("No kqeueue\n");
- exit(1);
- }
-
- if (argc == 1) {
- strcpy(pathname, PATH_TEMPLATE);
- fd = mkstemp(pathname);
- file = pathname;
- tmp_file = 1;
- } else {
- file = argv[1];
- fd = open(file, O_RDWR|O_CREAT, 0666);
- }
- if (fd < 0){
- fprintf(stderr, "Can't open %s\n", argv[1]);
- perror("");
- exit(1);
- }
-
-#ifdef DEBUG
- printf("Hello kq %d fd %d\n", kq, fd);
-#endif
-
- for (run = 0; run < MAX_RUNS; run++){
-#ifdef DEBUG
- printf("Run %d\n", run);
-#endif
- for (j = 0; j < LIO_MAX; j++) {
- lio[j] = (struct aiocb **)
- malloc(sizeof(struct aiocb *) * MAX/LIO_MAX);
- for(i = 0; i < MAX / LIO_MAX; i++) {
- k = (MAX / LIO_MAX * j) + i;
- lio_element = lio[j];
- lio[j][i] = iocb[k] = (struct aiocb *)
- malloc(sizeof(struct aiocb));
- bzero(iocb[k], sizeof(struct aiocb));
- iocb[k]->aio_nbytes = sizeof(buffer);
- iocb[k]->aio_buf = buffer;
- iocb[k]->aio_fildes = fd;
- iocb[k]->aio_offset
- = iocb[k]->aio_nbytes * k * (run + 1);
-
-#ifdef DEBUG
- printf("hello iocb[k] %d\n",
- iocb[k]->aio_offset);
-#endif
- iocb[k]->aio_lio_opcode = LIO_WRITE;
- }
- sig.sigev_notify_kqueue = kq;
- sig.sigev_value.sival_ptr = lio[j];
- sig.sigev_notify = SIGEV_KEVENT;
- time(&time1);
- result = lio_listio(LIO_NOWAIT, lio[j],
- MAX / LIO_MAX, &sig);
- error = errno;
- time(&time2);
-#ifdef DEBUG
- printf("Time %d %d %d result -> %d\n",
- time1, time2, time2-time1, result);
-#endif
- if (result != 0) {
- errno = error;
- perror("list_listio");
- printf("FAIL: Result %d iteration %d\n",result, j);
- exit(1);
- }
-#ifdef DEBUG
- printf("write %d is at %p\n", j, lio[j]);
-#endif
- }
-
- for(i = 0; i < LIO_MAX; i++) {
- for(j = LIO_MAX - 1; j >=0; j--) {
- if (lio[j])
- break;
- }
-
- for(;;) {
- bzero(&ke, sizeof(ke));
- bzero(&kq_returned, sizeof(ke));
- ts.tv_sec = 0;
- ts.tv_nsec = 1;
-#ifdef DEBUG
- printf("FOO lio %d -> %p\n", j, lio[j]);
-#endif
- EV_SET(&ke, (uintptr_t)lio[j],
- EVFILT_LIO, EV_ONESHOT, 0, 0, iocb[j]);
- result = kevent(kq, NULL, 0,
- &kq_returned, 1, &ts);
- error = errno;
- if (result < 0) {
- perror("kevent error: ");
- }
- kq_lio = kq_returned.udata;
-#ifdef DEBUG
- printf("kevent %d %d errno %d return.ident %p "
- "return.data %p return.udata %p %p\n",
- i, result, error,
- kq_returned.ident, kq_returned.data,
- kq_returned.udata,
- lio[j]);
-#endif
-
- if(kq_lio)
- break;
-#ifdef DEBUG
- printf("Try again\n");
-#endif
- }
-
-#ifdef DEBUG
- printf("lio %p\n", lio);
-#endif
-
- for (j = 0; j < LIO_MAX; j++) {
- if (lio[j] == kq_lio) {
- break;
- }
- }
- if (j == LIO_MAX) {
- printf("FAIL:\n");
- exit(1);
- }
-
-#ifdef DEBUG
- printf("Error Result for %d is %d\n", j, result);
-#endif
- if (result < 0) {
- printf("FAIL: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result);
- failed = 1;
- } else {
- printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result);
- }
- for(k = 0; k < MAX / LIO_MAX; k++){
- result = aio_return(kq_lio[k]);
-#ifdef DEBUG
- printf("Return Resulto for %d %d is %d\n", j, k, result);
-#endif
- if (result != sizeof(buffer)) {
- printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %d\n",
- run, LIO_MAX - i -1, k, result, errno, sizeof(buffer));
- } else {
- printf("PASS: run %d, operation %d sub-opt %d result %d\n",
- run, LIO_MAX - i -1, k, result);
- }
- }
-#ifdef DEBUG
- printf("\n");
-#endif
-
- for(k = 0; k < MAX / LIO_MAX; k++) {
- free(lio[j][k]);
- }
- free(lio[j]);
- lio[j] = NULL;
- }
- }
-#ifdef DEBUG
- printf("Done\n");
-#endif
-
- if (tmp_file) {
- unlink(pathname);
- }
-
- if (failed) {
- printf("FAIL: Atleast one\n");
- exit(1);
- } else {
- printf("PASS: All\n");
- exit(0);
- }
-}
diff --git a/tools/regression/execve/Makefile b/tools/regression/execve/Makefile
deleted file mode 100644
index edb05ef..0000000
--- a/tools/regression/execve/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# $FreeBSD$
-
-PROG= doexec
-MAN=
-
-RP= ./${PROG}
-TD= ${.CURDIR}/tests
-
-TESTSCRIPTS= nonexistshell devnullscript badinterplen goodscript \
- scriptarg scriptarg-nospace
-CLEANFILES= goodaout truncaout sparseaout empty ${TESTSCRIPTS}
-
-all: ${PROG} goodaout ${TESTSCRIPTS}
-
-.for x in ${TESTSCRIPTS}
-${x}: ${TD}/${x}
- cp ${TD}/${x} .
- chmod +x ${x}
-.endfor
-
-regress: test-empty test-nonexist test-nonexistshell \
- test-devnullscript test-badinterplen test-goodscript \
- test-scriptarg test-scriptarg-nospace test-goodaout \
- test-truncaout test-sparseaout
-
-test-empty: ${PROG}
- rm -f empty
- touch empty
- chmod +x empty
- ${RP} empty | grep 'Exec format error'
-
-test-nonexist: ${PROG}
- ${RP} ${TD}/nonexistent | grep 'No such file or directory'
-
-test-nonexistshell: ${PROG} nonexistshell
- ${RP} nonexistshell | grep 'No such file or directory'
-
-test-devnullscript: ${PROG} devnullscript
- ${RP} devnullscript | grep 'Permission denied'
-
-test-badinterplen: ${PROG} badinterplen
- ${RP} badinterplen | grep 'No such file or directory'
-
-test-goodscript: ${PROG} goodscript
- ${RP} goodscript | grep 'succeeded'
-
-test-scriptarg: ${PROG} scriptarg
- ${RP} scriptarg 2>&1 | grep '+ echo succeeded'
-
-test-scriptarg-nospace: ${PROG} scriptarg-nospace
- ${RP} scriptarg-nospace 2>&1 | grep '+ echo succeeded'
-
-goodaout: ${TD}/goodaout.c
- ${CC} -static -o ${.TARGET} ${TD}/goodaout.c
-
-test-goodaout: ${PROG} goodaout
- ${RP} goodaout | grep 'succeeded'
-
-test-truncaout: ${PROG} goodaout
- truncate -s 16 truncaout
- chmod a+x truncaout
- ${RP} truncaout | grep 'Exec format error'
-
-test-sparseaout: ${PROG}
- /bin/rm -rf sparseaout
- truncate -s 20480 sparseaout
- chmod a+x sparseaout
- ${RP} sparseaout | grep 'Exec format error'
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/execve/doexec.c b/tools/regression/execve/doexec.c
deleted file mode 100644
index 0aa82ec..0000000
--- a/tools/regression/execve/doexec.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $NetBSD: doexec.c,v 1.8 2003/07/26 19:38:48 salo Exp $ */
-
-/*
- * Copyright (c) 1993 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- if (argc != 2) {
- fprintf(stderr, "usage: %s <progname>\n", argv[0]);
- exit(2);
- }
-
- unsetenv("LANG"); /* we compare C error strings */
- if (execve(argv[1], &argv[1], NULL) == -1) {
- printf("%s\n", strerror(errno));
- exit(1);
- }
-}
diff --git a/tools/regression/execve/execve.t b/tools/regression/execve/execve.t
deleted file mode 100644
index dd2be9a..0000000
--- a/tools/regression/execve/execve.t
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-cd `dirname $0`
-cmd="./`basename $0 .t`"
-
-make >/dev/null 2>&1
-
-tests="test-empty test-nonexist test-nonexistshell \
- test-devnullscript test-badinterplen test-goodscript \
- test-scriptarg test-scriptarg-nospace test-goodaout \
- test-truncaout test-sparseaout"
-
-n=0
-
-echo "1..11"
-
-for atest in ${tests}
-do
- n=`expr ${n} + 1`
- if make ${atest}
- then
- echo "ok ${n} - ${atest}"
- else
- echo "not ok ${n} - ${atest}"
- fi
-done
diff --git a/tools/regression/execve/tests/badinterplen b/tools/regression/execve/tests/badinterplen
deleted file mode 100644
index 96c049f..0000000
--- a/tools/regression/execve/tests/badinterplen
+++ /dev/null
@@ -1,4 +0,0 @@
-#! 456789012345678 0123456789012345 789012345678 012345678901234 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/devnullscript b/tools/regression/execve/tests/devnullscript
deleted file mode 100644
index 73b1020..0000000
--- a/tools/regression/execve/tests/devnullscript
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /dev/null
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/goodaout.c b/tools/regression/execve/tests/goodaout.c
deleted file mode 100644
index ebf476b..0000000
--- a/tools/regression/execve/tests/goodaout.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* $NetBSD: goodaout.c,v 1.8 2003/07/26 19:38:49 salo Exp $ */
-
-/*-
- * Copyright (c) 1993 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- printf("succeeded\n");
- exit(0);
-}
diff --git a/tools/regression/execve/tests/goodscript b/tools/regression/execve/tests/goodscript
deleted file mode 100644
index 51270dc..0000000
--- a/tools/regression/execve/tests/goodscript
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/csh
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/nonexistshell b/tools/regression/execve/tests/nonexistshell
deleted file mode 100644
index f9ee705..0000000
--- a/tools/regression/execve/tests/nonexistshell
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /foo/bar/baz
-# $FreeBSD$
-
-echo foo
diff --git a/tools/regression/execve/tests/scriptarg b/tools/regression/execve/tests/scriptarg
deleted file mode 100644
index 2700f1c..0000000
--- a/tools/regression/execve/tests/scriptarg
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh -x
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/execve/tests/scriptarg-nospace b/tools/regression/execve/tests/scriptarg-nospace
deleted file mode 100644
index 6731ad5..0000000
--- a/tools/regression/execve/tests/scriptarg-nospace
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh -x
-# $FreeBSD$
-
-echo succeeded
diff --git a/tools/regression/fifo/fifo_create/Makefile b/tools/regression/fifo/fifo_create/Makefile
deleted file mode 100644
index 10e2b14..0000000
--- a/tools/regression/fifo/fifo_create/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-PROG= fifo_create
-MAN=
-WARNS?= 3
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/fifo/fifo_create/fifo_create.c b/tools/regression/fifo/fifo_create/fifo_create.c
deleted file mode 100644
index 4e8a8a4..0000000
--- a/tools/regression/fifo/fifo_create/fifo_create.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*-
- * Copyright (c) 2005-2008 Robert N. M. Watson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/stat.h>
-
-#include <err.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * Simple regression test for the creation and destruction of POSIX fifos in
- * the file system name space. Using a specially created directory, create
- * a fifo in it and check that the following properties are present, as
- * specified in IEEE Std 1003.1, 2004 Edition:
- *
- * - When mkfifo() or mknod(S_IFIFO) is called, on success, a fifo is
- * created.
- *
- * - On an error, no fifo is created. (XXX: Not tested)
- *
- * - The mode bits on the fifo are a product of combining the umask and
- * requested mode.
- *
- * - The fifo's owner will be the processes effective user ID. (XXX: Not
- * tested)
- *
- * - The fifo's group will be the parent directory's group or the effective
- * group ID of the process. For historical reasons, BSD prefers the group
- * ID of the process, so we will generate an error if it's not that. (XXX:
- * Not tested)
- *
- * - The st_atime, st_ctime, st_mtime of the fifo will be set appropriately,
- * and st_ctime and st_mtime on the directory will be updated. (XXX: We
- * test they are updated, not correct)
- *
- * - EEXIST is returned if the named file already exists.
- *
- * In addition, we check that we can unlink the fifo, and that if we do, it
- * disappears.
- *
- * This test must run as root in order to usefully frob the process
- * credential to test permission parts.
- */
-
-/*
- * All activity occurs within a temporary directory created early in the
- * test.
- */
-char temp_dir[PATH_MAX];
-
-static void __unused
-atexit_temp_dir(void)
-{
-
- rmdir(temp_dir);
-}
-
-/*
- * Basic creation tests: verify that mkfifo(2) (or mknod(2)) creates a fifo,
- * that the time stamps on the directory are updated, that if we try twice we
- * get EEXIST, and that we can unlink it.
- */
-static void
-fifo_create_test(int use_mkfifo)
-{
- struct stat old_dirsb, dirsb, fifosb;
- const char *testname;
- char path[PATH_MAX];
- int error;
-
- if (use_mkfifo)
- testname = "mkfifo";
- else
- testname = "mknod";
-
- /*
- * Sleep to make sure that the time stamp on the directory will be
- * updated.
- */
- if (stat(temp_dir, &old_dirsb) < 0)
- err(-1, "basic_create_test: %s: stat: %s", testname,
- temp_dir);
-
- sleep(2);
-
- snprintf(path, PATH_MAX, "%s/testfifo", temp_dir);
-
- if (use_mkfifo) {
- if (mkfifo(path, 0600) < 0)
- err(-1, "basic_create_test: %s: %s", testname, path);
- } else {
- if (mknod(path, S_IFIFO | 0600, 0) < 0)
- err(-1, "basic_create_test: %s: %s", testname, path);
- }
-
- if (stat(path, &fifosb) < 0) {
- error = errno;
- (void)unlink(path);
- errno = error;
- err(-1, "basic_create_test: %s: stat: %s", testname, path);
- }
-
- if (!(S_ISFIFO(fifosb.st_mode))) {
- (void)unlink(path);
- errx(-1, "basic_create_test: %s produced non-fifo",
- testname);
- }
-
- if (use_mkfifo) {
- if (mkfifo(path, 0600) == 0)
- errx(-1, "basic_create_test: dup %s succeeded",
- testname);
- } else {
- if (mknod(path, S_IFIFO | 0600, 0) == 0)
- errx(-1, "basic_create_test: dup %s succeeded",
- testname);
- }
-
- if (errno != EEXIST)
- err(-1, "basic_create_test: dup %s unexpected error",
- testname);
-
- if (stat(temp_dir, &dirsb) < 0) {
- error = errno;
- (void)unlink(path);
- errno = error;
- err(-1, "basic_create_test: %s: stat: %s", testname,
- temp_dir);
- }
-
- if (old_dirsb.st_ctime == dirsb.st_ctime) {
- (void)unlink(path);
- errx(-1, "basic_create_test: %s: old_dirsb.st_ctime == "
- "dirsb.st_ctime", testname);
- }
-
- if (old_dirsb.st_mtime == dirsb.st_mtime) {
- (void)unlink(path);
- errx(-1, "basic_create_test: %s: old_dirsb.st_mtime == "
- "dirsb.st_mtime", testname);
- }
-
- if (unlink(path) < 0)
- err(-1, "basic_create_test: %s: unlink: %s", testname, path);
-
- if (stat(path, &fifosb) == 0)
- errx(-1, "basic_create_test: %s: unlink failed to unlink",
- testname);
- if (errno != ENOENT)
- err(-1, "basic_create_test: %s: unlink unexpected error",
- testname);
-}
-
-/*
- * Having determined that basic create/remove/etc functionality is present
- * for fifos, now make sure that the umask, requested permissions, and
- * resulting mode are handled properly.
- */
-static const struct permission_test {
- mode_t pt_umask;
- mode_t pt_reqmode;
- mode_t pt_mode;
-} permission_test[] = {
- {0000, 0, S_IFIFO},
- {0000, S_IRWXU, S_IFIFO | S_IRWXU},
- {0000, S_IRWXU | S_IRWXG | S_IRWXO, S_IFIFO | S_IRWXU | S_IRWXG |
- S_IRWXO },
- {0077, S_IRWXU, S_IFIFO | S_IRWXU},
- {0077, S_IRWXU | S_IRWXG | S_IRWXO, S_IFIFO | S_IRWXU},
-};
-static const int permission_test_count = sizeof(permission_test) /
- sizeof(struct permission_test);
-
-static void
-fifo_permission_test(int use_mkfifo)
-{
- const struct permission_test *ptp;
- mode_t __unused old_umask;
- char path[PATH_MAX];
- const char *testname;
- struct stat sb;
- int error, i;
-
- if (use_mkfifo)
- testname = "mkfifo";
- else
- testname = "mknod";
-
- snprintf(path, PATH_MAX, "%s/testfifo", temp_dir);
- old_umask = umask(0022);
- for (i = 0; i < permission_test_count; i++) {
- ptp = &permission_test[i];
-
- umask(ptp->pt_umask);
- if (use_mkfifo) {
- if (mkfifo(path, ptp->pt_reqmode) < 0)
- err(-1, "fifo_permission_test: %s: %08o "
- "%08o %08o\n", testname, ptp->pt_umask,
- ptp->pt_reqmode, ptp->pt_mode);
- } else {
- if (mknod(path, S_IFIFO | ptp->pt_reqmode, 0) < 0)
- err(-1, "fifo_permission_test: %s: %08o "
- "%08o %08o\n", testname, ptp->pt_umask,
- ptp->pt_reqmode, ptp->pt_mode);
- }
-
- if (stat(path, &sb) < 0) {
- error = errno;
- (void)unlink(path);
- errno = error;
- err(-1, "fifo_permission_test: %s: %s", testname,
- path);
- }
-
- if (sb.st_mode != ptp->pt_mode) {
- (void)unlink(path);
- errx(-1, "fifo_permission_test: %s: %08o %08o %08o "
- "got %08o", testname, ptp->pt_umask,
- ptp->pt_reqmode, ptp->pt_mode, sb.st_mode);
- }
-
- if (unlink(path) < 0)
- err(-1, "fifo_permission_test: %s: unlink: %s",
- testname, path);
- }
- umask(old_umask);
-}
-
-int
-main(int argc, char *argv[])
-{
- int i;
-
- if (geteuid() != 0)
- errx(-1, "must be run as root");
-
- strcpy(temp_dir, "/tmp/fifo_create.XXXXXXXXXXX");
- if (mkdtemp(temp_dir) == NULL)
- err(-1, "mkdtemp");
- atexit(atexit_temp_dir);
-
- if (chdir(temp_dir) < 0)
- err(-1, "chdir");
-
- /*
- * Run each test twice, once with mknod(2) and a second time with
- * mkfifo(2). Historically, BSD has not allowed mknod(2) to be used
- * to create fifos, but the Single UNIX Specification requires it.
- */
- for (i = 0; i < 2; i++) {
- fifo_create_test(i);
- fifo_permission_test(i);
- }
-
- return (0);
-}
diff --git a/tools/regression/fifo/fifo_io/Makefile b/tools/regression/fifo/fifo_io/Makefile
deleted file mode 100644
index 49bf5bd..0000000
--- a/tools/regression/fifo/fifo_io/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-PROG= fifo_io
-MAN=
-WARNS?= 3
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/fifo/fifo_io/fifo_io.c b/tools/regression/fifo/fifo_io/fifo_io.c
deleted file mode 100644
index 4d3c54e..0000000
--- a/tools/regression/fifo/fifo_io/fifo_io.c
+++ /dev/null
@@ -1,1409 +0,0 @@
-/*-
- * Copyright (c) 2005 Robert N. M. Watson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/ioctl.h>
-#include <sys/select.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <poll.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * Regression test to exercise POSIX fifo I/O.
- *
- * We test a number of aspect of behavior, including:
- *
- * - If there's no data to read, then for blocking fifos, we block, and for
- * non-blocking, we return EAGAIN.
- *
- * - If we write ten bytes, ten bytes can be read, and they're the same
- * bytes, in the same order.
- *
- * - If we write two batches of five bytes, we can read the same ten bytes in
- * one read of ten bytes.
- *
- * - If we write ten bytes, we can read the same ten bytes in two reads of
- * five bytes each.
- *
- * - If we over-fill a buffer (by writing 512k, which we take to be a large
- * number above default buffer sizes), we block if there is no reader.
- *
- * - That once 512k (ish) is read from the other end, the blocked writer
- * wakes up.
- *
- * - When a fifo is empty, poll, select, kqueue, and fionread report it is
- * writable but not readable.
- *
- * - When a fifo has data in it, poll, select, and kqueue report that it is
- * writable.
- *
- * - XXX: blocked reader semantics?
- *
- * - XXX: event behavior on remote close?
- *
- * Although behavior of O_RDWR isn't defined for fifos by POSIX, we expect
- * "reasonable" behavior, and run some additional tests relating to event
- * management on O_RDWR fifo descriptors.
- */
-
-#define KQUEUE_MAX_EVENT 8
-
-/*
- * All activity occurs within a temporary directory created early in the
- * test.
- */
-char temp_dir[PATH_MAX];
-
-static void __unused
-atexit_temp_dir(void)
-{
-
- rmdir(temp_dir);
-}
-
-static void
-makefifo(const char *fifoname, const char *testname)
-{
-
- if (mkfifo(fifoname, 0700) < 0)
- err(-1, "%s: makefifo: mkfifo: %s", testname, fifoname);
-}
-
-static void
-cleanfifo2(const char *fifoname, int fd1, int fd2)
-{
-
- if (fd1 != -1)
- close(fd1);
- if (fd2 != -1)
- close(fd2);
- (void)unlink(fifoname);
-}
-
-static void
-cleanfifo3(const char *fifoname, int fd1, int fd2, int fd3)
-{
-
- if (fd3 != -1)
- close(fd3);
- cleanfifo2(fifoname, fd1, fd2);
-}
-
-/*
- * Open two different file descriptors for a fifo: one read, one write. Do
- * so using non-blocking opens in order to avoid deadlocking the process.
- */
-static int
-openfifo(const char *fifoname, const char *testname, int *reader_fdp,
- int *writer_fdp)
-{
- int error, fd1, fd2;
-
- fd1 = open(fifoname, O_RDONLY | O_NONBLOCK);
- if (fd1 < 0)
- return (-1);
- fd2 = open(fifoname, O_WRONLY | O_NONBLOCK);
- if (fd2 < 0) {
- error = errno;
- close(fd1);
- errno = error;
- return (-1);
- }
- *reader_fdp = fd1;
- *writer_fdp = fd2;
-
- return (0);
-}
-
-/*
- * Open one file descriptor for the fifo, supporting both read and write.
- */
-static int
-openfifo_rw(const char *fifoname, const char *testname, int *fdp)
-{
- int fd;
-
- fd = open(fifoname, O_RDWR);
- if (fd < 0)
- return (-1);
- *fdp = fd;
-
- return (0);
-}
-
-static int
-set_nonblocking(int fd, const char *testname)
-{
- int flags;
-
- flags = fcntl(fd, F_GETFL);
- if (flags < 0) {
- warn("%s: fcntl(fd, F_GETFL)", testname);
- return(-1);
- }
-
- flags |= O_NONBLOCK;
-
- if (fcntl(fd, F_SETFL, flags) < 0) {
- warn("%s: fcntl(fd, 0x%x)", testname, flags);
- return (-1);
- }
-
- return (0);
-}
-
-static int
-set_blocking(int fd, const char *testname)
-{
- int flags;
-
- flags = fcntl(fd, F_GETFL);
- if (flags < 0) {
- warn("%s: fcntl(fd, F_GETFL)", testname);
- return(-1);
- }
-
- flags &= ~O_NONBLOCK;
-
- if (fcntl(fd, F_SETFL, flags) < 0) {
- warn("%s: fcntl(fd, 0x%x)", testname, flags);
- return (-1);
- }
-
- return (0);
-}
-
-/*
- * Drain a file descriptor (fifo) of any readable data. Note: resets the
- * blocking state.
- */
-static int
-drain_fd(int fd, const char *testname)
-{
- ssize_t len;
- u_char ch;
-
- if (set_nonblocking(fd, testname) < 0)
- return (-1);
-
- while ((len = read(fd, &ch, sizeof(ch))) > 0);
- if (len < 0) {
- switch (errno) {
- case EAGAIN:
- return (0);
- default:
- warn("%s: drain_fd: read", testname);
- return (-1);
- }
- }
- warn("%s: drain_fd: read: returned 0 bytes", testname);
- return (-1);
-}
-
-/*
- * Simple I/O test: write ten integers, and make sure we get back the same
- * integers in the same order. This assumes a minimum fifo buffer > 10
- * bytes in order to not block and deadlock.
- */
-static void
-test_simpleio(void)
-{
- int i, reader_fd, writer_fd;
- u_char buffer[10];
- ssize_t len;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", "test_simpleio", &reader_fd, &writer_fd)
- < 0) {
- warn("test_simpleio: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- for (i = 0; i < 10; i++)
- buffer[i] = i;
-
- len = write(writer_fd, (char *)buffer, sizeof(buffer));
- if (len < 0) {
- warn("test_simpleio: write");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != sizeof(buffer)) {
- warnx("test_simplio: tried %zu but wrote %zd", sizeof(buffer),
- len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- len = read(reader_fd, (char *)buffer, sizeof(buffer));
- if (len < 0) {
- warn("test_simpleio: read");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != sizeof(buffer)) {
- warnx("test_simpleio: tried %zu but read %zd", sizeof(buffer),
- len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- for (i = 0; i < 10; i++) {
- if (buffer[i] == i)
- continue;
- warnx("test_simpleio: write byte %d as 0x%02x, but read "
- "0x%02x", i, i, buffer[i]);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", reader_fd, writer_fd);
-}
-
-static int alarm_fired;
-/*
- * Non-destructive SIGALRM handler.
- */
-static void
-sigalarm(int signum)
-{
-
- alarm_fired = 1;
-}
-
-/*
- * Wrapper function for write, which uses a timer to interrupt any blocking.
- * Because we can't reliably detect EINTR for blocking I/O, we also track
- * whether or not our timeout fired.
- */
-static int __unused
-timed_write(int fd, void *data, size_t len, ssize_t *written_lenp,
- int timeout, int *timedoutp, const char *testname)
-{
- struct sigaction act, oact;
- ssize_t written_len;
- int error;
-
- alarm_fired = 0;
- bzero(&act, sizeof(oact));
- act.sa_handler = sigalarm;
- if (sigaction(SIGALRM, &act, &oact) < 0) {
- warn("%s: timed_write: sigaction", testname);
- return (-1);
- }
- alarm(timeout);
- written_len = write(fd, data, len);
- error = errno;
- alarm(0);
- if (sigaction(SIGALRM, &oact, NULL) < 0) {
- warn("%s: timed_write: sigaction", testname);
- return (-1);
- }
- if (alarm_fired)
- *timedoutp = 1;
- else
- *timedoutp = 0;
-
- errno = error;
- if (written_len < 0)
- return (-1);
- *written_lenp = written_len;
- return (0);
-}
-
-/*
- * Wrapper function for read, which uses a timer to interrupt any blocking.
- * Because we can't reliably detect EINTR for blocking I/O, we also track
- * whether or not our timeout fired.
- */
-static int
-timed_read(int fd, void *data, size_t len, ssize_t *read_lenp,
- int timeout, int *timedoutp, const char *testname)
-{
- struct sigaction act, oact;
- ssize_t read_len;
- int error;
-
- alarm_fired = 0;
- bzero(&act, sizeof(oact));
- act.sa_handler = sigalarm;
- if (sigaction(SIGALRM, &act, &oact) < 0) {
- warn("%s: timed_write: sigaction", testname);
- return (-1);
- }
- alarm(timeout);
- read_len = read(fd, data, len);
- error = errno;
- alarm(0);
- if (sigaction(SIGALRM, &oact, NULL) < 0) {
- warn("%s: timed_write: sigaction", testname);
- return (-1);
- }
- if (alarm_fired)
- *timedoutp = 1;
- else
- *timedoutp = 0;
-
- errno = error;
- if (read_len < 0)
- return (-1);
- *read_lenp = read_len;
- return (0);
-}
-
-/*
- * This test operates on blocking and non-blocking fifo file descriptors, in
- * order to determine whether they block at good moments or not. By good we
- * mean: don't block for non-blocking sockets, and do block for blocking
- * ones, assuming there isn't I/O buffer to satisfy the request.
- *
- * We use a timeout of 5 seconds, concluding that in 5 seconds either all I/O
- * that can take place will, and that if we reach the end of the timeout,
- * then blocking has occurred.
- *
- * We assume that the buffer size on a fifo is <512K, and as such, that
- * writing that much data without an active reader will result in blocking.
- */
-static void
-test_blocking_read_empty(void)
-{
- int reader_fd, ret, timedout, writer_fd;
- ssize_t len;
- u_char ch;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_blocking_read_empty: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- /*
- * Read one byte from an empty blocking fifo, block as there is no
- * data.
- */
- if (set_blocking(reader_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
- __func__);
- if (ret != -1) {
- warnx("test_blocking_read_empty: timed_read: returned "
- "success");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (errno != EINTR) {
- warn("test_blocking_read_empty: timed_read");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- /*
- * Read one byte from an empty non-blocking fifo, return EAGAIN as
- * there is no data.
- */
- if (set_nonblocking(reader_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
- __func__);
- if (ret != -1) {
- warnx("test_blocking_read_empty: timed_read: returned "
- "success");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (errno != EAGAIN) {
- warn("test_blocking_read_empty: timed_read");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", reader_fd, writer_fd);
-}
-
-/*
- * Write one byte to an empty fifo, then try to read one byte and make sure
- * we don't block in either the write or the read. This tests both for
- * improper blocking in the send and receive code.
- */
-static void
-test_blocking_one_byte(void)
-{
- int reader_fd, ret, timedout, writer_fd;
- ssize_t len;
- u_char ch;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_blocking: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- if (set_blocking(writer_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (set_blocking(reader_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- ch = 0xfe;
- ret = timed_write(writer_fd, &ch, sizeof(ch), &len, 5, &timedout,
- __func__);
- if (ret < 0) {
- warn("test_blocking_one_byte: timed_write");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != sizeof(ch)) {
- warnx("test_blocking_one_byte: timed_write: tried to write "
- "%zu, wrote %zd", sizeof(ch), len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- ch = 0xab;
- ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
- __func__);
- if (ret < 0) {
- warn("test_blocking_one_byte: timed_read");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != sizeof(ch)) {
- warnx("test_blocking_one_byte: timed_read: wanted %zu, "
- "read %zd", sizeof(ch), len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (ch != 0xfe) {
- warnx("test_blocking_one_byte: timed_read: expected to read "
- "0x%02x, read 0x%02x", 0xfe, ch);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", reader_fd, writer_fd);
-}
-
-/*
- * Write one byte to an empty fifo, then try to read one byte and make sure
- * we don't get back EAGAIN.
- */
-static void
-test_nonblocking_one_byte(void)
-{
- int reader_fd, ret, timedout, writer_fd;
- ssize_t len;
- u_char ch;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_nonblocking: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- if (set_nonblocking(reader_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- ch = 0xfe;
- ret = timed_write(writer_fd, &ch, sizeof(ch), &len, 5, &timedout,
- __func__);
- if (ret < 0) {
- warn("test_nonblocking_one_byte: timed_write");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != sizeof(ch)) {
- warnx("test_nonblocking_one_byte: timed_write: tried to write "
- "%zu, wrote %zd", sizeof(ch), len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- ch = 0xab;
- ret = timed_read(reader_fd, &ch, sizeof(ch), &len, 5, &timedout,
- __func__);
- if (ret < 0) {
- warn("test_nonblocking_one_byte: timed_read");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != sizeof(ch)) {
- warnx("test_nonblocking_one_byte: timed_read: wanted %zu, read "
- "%zd", sizeof(ch), len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (ch != 0xfe) {
- warnx("test_nonblocking_one_byte: timed_read: expected to read "
- "0x%02x, read 0x%02x", 0xfe, ch);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", reader_fd, writer_fd);
-}
-
-/*
- * First of two test cases involving a 512K buffer: write the buffer into a
- * blocking file descriptor. We'd like to know it blocks, but the closest we
- * can get is to see if SIGALRM fired during the I/O resulting in a partial
- * write.
- */
-static void
-test_blocking_partial_write(void)
-{
- int reader_fd, ret, timedout, writer_fd;
- u_char *buffer;
- ssize_t len;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_blocking_partial_write: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- if (set_blocking(writer_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- buffer = malloc(512*1024);
- if (buffer == NULL) {
- warn("test_blocking_partial_write: malloc");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- bzero(buffer, 512*1024);
-
- ret = timed_write(writer_fd, buffer, 512*1024, &len, 5, &timedout,
- __func__);
- if (ret < 0) {
- warn("test_blocking_partial_write: timed_write");
- free(buffer);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (!timedout) {
- warnx("test_blocking_partial_write: timed_write: blocking "
- "socket didn't time out");
- free(buffer);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- free(buffer);
-
- if (drain_fd(reader_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", reader_fd, writer_fd);
-}
-
-/*
- * Write a 512K buffer to an empty fifo using a non-blocking file descriptor,
- * and make sure it doesn't block.
- */
-static void
-test_nonblocking_partial_write(void)
-{
- int reader_fd, ret, timedout, writer_fd;
- u_char *buffer;
- ssize_t len;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_blocking_partial_write: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- if (set_nonblocking(writer_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- buffer = malloc(512*1024);
- if (buffer == NULL) {
- warn("test_blocking_partial_write: malloc");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- bzero(buffer, 512*1024);
-
- ret = timed_write(writer_fd, buffer, 512*1024, &len, 5, &timedout,
- __func__);
- if (ret < 0) {
- warn("test_blocking_partial_write: timed_write");
- free(buffer);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (timedout) {
- warnx("test_blocking_partial_write: timed_write: "
- "non-blocking socket timed out");
- free(buffer);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (len == 0 || len >= 512*1024) {
- warnx("test_blocking_partial_write: timed_write: requested "
- "%d, sent %zd", 512*1024, len);
- free(buffer);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- free(buffer);
-
- if (drain_fd(reader_fd, __func__) < 0) {
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", reader_fd, writer_fd);
-}
-
-/*
- * test_coalesce_big_read() verifies that data mingles in the fifo across
- * message boundaries by performing two small writes, then a bigger read
- * that should return data from both writes.
- */
-static void
-test_coalesce_big_read(void)
-{
- int i, reader_fd, writer_fd;
- u_char buffer[10];
- ssize_t len;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_coalesce_big_read: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- /* Write five, write five, read ten. */
- for (i = 0; i < 10; i++)
- buffer[i] = i;
-
- len = write(writer_fd, buffer, 5);
- if (len < 0) {
- warn("test_coalesce_big_read: write 5");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != 5) {
- warnx("test_coalesce_big_read: write 5 wrote %zd", len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- len = write(writer_fd, buffer + 5, 5);
- if (len < 0) {
- warn("test_coalesce_big_read: write 5");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != 5) {
- warnx("test_coalesce_big_read: write 5 wrote %zd", len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- len = read(reader_fd, buffer, 10);
- if (len < 0) {
- warn("test_coalesce_big_read: read 10");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != 10) {
- warnx("test_coalesce_big_read: read 10 read %zd", len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- for (i = 0; i < 10; i++) {
- if (buffer[i] == i)
- continue;
- warnx("test_coalesce_big_read: expected to read 0x%02x, "
- "read 0x%02x", i, buffer[i]);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", -1, -1);
-}
-
-/*
- * test_coalesce_big_write() verifies that data mingles in the fifo across
- * message boundaries by performing one big write, then two smaller reads
- * that should return sequential elements of data from the write.
- */
-static void
-test_coalesce_big_write(void)
-{
- int i, reader_fd, writer_fd;
- u_char buffer[10];
- ssize_t len;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_coalesce_big_write: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- /* Write ten, read five, read five. */
- for (i = 0; i < 10; i++)
- buffer[i] = i;
-
- len = write(writer_fd, buffer, 10);
- if (len < 0) {
- warn("test_coalesce_big_write: write 10");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != 10) {
- warnx("test_coalesce_big_write: write 10 wrote %zd", len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- len = read(reader_fd, buffer, 5);
- if (len < 0) {
- warn("test_coalesce_big_write: read 5");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != 5) {
- warnx("test_coalesce_big_write: read 5 read %zd", len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- len = read(reader_fd, buffer + 5, 5);
- if (len < 0) {
- warn("test_coalesce_big_write: read 5");
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (len != 5) {
- warnx("test_coalesce_big_write: read 5 read %zd", len);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- for (i = 0; i < 10; i++) {
- if (buffer[i] == i)
- continue;
- warnx("test_coalesce_big_write: expected to read 0x%02x, "
- "read 0x%02x", i, buffer[i]);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", -1, -1);
-}
-
-static int
-poll_status(int fd, int *readable, int *writable, int *exception,
- const char *testname)
-{
- struct pollfd fds[1];
-
- fds[0].fd = fd;
- fds[0].events = POLLIN | POLLOUT | POLLERR;
- fds[0].revents = 0;
-
- if (poll(fds, 1, 0) < 0) {
- warn("%s: poll", testname);
- return (-1);
- }
- *readable = (fds[0].revents & POLLIN) ? 1 : 0;
- *writable = (fds[0].revents & POLLOUT) ? 1 : 0;
- *exception = (fds[0].revents & POLLERR) ? 1 : 0;
- return (0);
-}
-
-static int
-select_status(int fd, int *readable, int *writable, int *exception,
- const char *testname)
-{
- struct fd_set readfds, writefds, exceptfds;
- struct timeval timeout;
-
- FD_ZERO(&readfds);
- FD_ZERO(&writefds);
- FD_ZERO(&exceptfds);
- FD_SET(fd, &readfds);
- FD_SET(fd, &writefds);
- FD_SET(fd, &exceptfds);
- timeout.tv_sec = 0;
- timeout.tv_usec = 0;
- if (select(fd+1, &readfds, &writefds, &exceptfds, &timeout) < 0) {
- warn("%s: select", testname);
- return (-1);
- }
- *readable = FD_ISSET(fd, &readfds) ? 1 : 0;
- *writable = FD_ISSET(fd, &writefds) ? 1 : 0;
- *exception = FD_ISSET(fd, &exceptfds) ? 1 : 0;
- return (0);
-}
-
-/*
- * Given an existing kqueue, set up read and write event filters for the
- * passed file descriptor. Typically called once for the read endpoint, and
- * once for the write endpoint.
- */
-static int
-kqueue_setup(int kqueue_fd, int fd, const char *testname)
-{
- struct kevent kevent_changelist[2];
- struct kevent kevent_eventlist[KQUEUE_MAX_EVENT], *kp;
- struct timespec timeout;
- int i, ret;
-
- timeout.tv_sec = 0;
- timeout.tv_nsec = 0;
-
- bzero(&kevent_changelist, sizeof(kevent_changelist));
- EV_SET(&kevent_changelist[0], fd, EVFILT_READ, EV_ADD, 0, 0, 0);
- EV_SET(&kevent_changelist[1], fd, EVFILT_WRITE, EV_ADD, 0, 0, 0);
-
- bzero(&kevent_eventlist, sizeof(kevent_eventlist));
- ret = kevent(kqueue_fd, kevent_changelist, 2, kevent_eventlist,
- KQUEUE_MAX_EVENT, &timeout);
- if (ret < 0) {
- warn("%s:%s: kevent initial register", testname, __func__);
- return (-1);
- }
-
- /*
- * Verify that the events registered alright.
- */
- for (i = 0; i < ret; i++) {
- kp = &kevent_eventlist[i];
- if (kp->flags != EV_ERROR)
- continue;
- errno = kp->data;
- warn("%s:%s: kevent register index %d", testname, __func__,
- i);
- return (-1);
- }
-
- return (0);
-}
-
-static int
-kqueue_status(int kqueue_fd, int fd, int *readable, int *writable,
- int *exception, const char *testname)
-{
- struct kevent kevent_eventlist[KQUEUE_MAX_EVENT], *kp;
- struct timespec timeout;
- int i, ret;
-
- timeout.tv_sec = 0;
- timeout.tv_nsec = 0;
-
- ret = kevent(kqueue_fd, NULL, 0, kevent_eventlist, KQUEUE_MAX_EVENT,
- &timeout);
- if (ret < 0) {
- warn("%s: %s: kevent", testname, __func__);
- return (-1);
- }
-
- *readable = *writable = *exception = 0;
- for (i = 0; i < ret; i++) {
- kp = &kevent_eventlist[i];
- if (kp->ident != (u_int)fd)
- continue;
- if (kp->filter == EVFILT_READ)
- *readable = 1;
- if (kp->filter == EVFILT_WRITE)
- *writable = 1;
- }
-
- return (0);
-}
-
-static int
-fionread_status(int fd, int *readable, const char *testname)
-{
- int i;
-
- if (ioctl(fd, FIONREAD, &i) < 0) {
- warn("%s: ioctl(FIONREAD)", testname);
- return (-1);
- }
-
- if (i > 0)
- *readable = 1;
- else
- *readable = 0;
- return (0);
-}
-
-#define READABLE 1
-#define WRITABLE 1
-#define EXCEPTION 1
-
-#define NOT_READABLE 0
-#define NOT_WRITABLE 0
-#define NOT_EXCEPTION 0
-
-static int
-assert_status(int fd, int kqueue_fd, int assert_readable,
- int assert_writable, int assert_exception, const char *testname,
- const char *conditionname, const char *fdname)
-{
- int readable, writable, exception;
-
- if (poll_status(fd, &readable, &writable, &exception, testname) < 0)
- return (-1);
-
- if (readable != assert_readable || writable != assert_writable ||
- exception != assert_exception) {
- warnx("%s: %s polls r:%d, w:%d, e:%d on %s", testname,
- fdname, readable, writable, exception, conditionname);
- return (-1);
- }
-
- if (select_status(fd, &readable, &writable, &exception, testname) < 0)
- return (-1);
-
- if (readable != assert_readable || writable != assert_writable ||
- exception != assert_exception) {
- warnx("%s: %s selects r:%d, w:%d, e:%d on %s", testname,
- fdname, readable, writable, exception, conditionname);
- return (-1);
- }
-
- if (kqueue_status(kqueue_fd, fd, &readable, &writable, &exception,
- testname) < 0)
- return (-1);
-
- if (readable != assert_readable || writable != assert_writable ||
- exception != assert_exception) {
- warnx("%s: %s kevent r:%d, w:%d, e:%d on %s", testname,
- fdname, readable, writable, exception, conditionname);
- return (-1);
- }
-
- if (fionread_status(fd, &readable, __func__) < 0)
- return (-1);
-
- if (readable != assert_readable) {
- warnx("%s: %s fionread r:%d on %s", testname, fdname,
- readable, conditionname);
- return (-1);
- }
-
- return (0);
-}
-
-/*
- * test_events() uses poll(), select(), and kevent() to query the status of
- * fifo file descriptors and determine whether they match expected state
- * based on earlier semantic tests: specifically, whether or not poll/select/
- * kevent will correctly inform on readable/writable state following I/O.
- *
- * It would be nice to also test status changes as a result of closing of one
- * or another fifo endpoint.
- */
-static void
-test_events_outofbox(void)
-{
- int kqueue_fd, reader_fd, writer_fd;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd) < 0) {
- warn("test_events_outofbox: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- kqueue_fd = kqueue();
- if (kqueue_fd < 0) {
- warn("%s: kqueue", __func__);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (kqueue_setup(kqueue_fd, reader_fd, __func__) < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- if (kqueue_setup(kqueue_fd, writer_fd, __func__) < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * Make sure that fresh, out-of-the-box fifo file descriptors have
- * good initial states. The reader_fd should have no active state,
- * since it will not be readable (no data in pipe), writable (it's
- * a read-only descriptor), and there's no reason for error yet.
- */
- if (assert_status(reader_fd, kqueue_fd, NOT_READABLE, NOT_WRITABLE,
- NOT_EXCEPTION, __func__, "create", "reader_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * Make sure that fresh, out-of-the-box fifo file descriptors have
- * good initial states. The writer_fd should be ready to write.
- */
- if (assert_status(writer_fd, kqueue_fd, NOT_READABLE, WRITABLE,
- NOT_EXCEPTION, __func__, "create", "writer_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
-}
-
-static void
-test_events_write_read_byte(void)
-{
- int kqueue_fd, reader_fd, writer_fd;
- ssize_t len;
- u_char ch;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_events_write_read_byte: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- kqueue_fd = kqueue();
- if (kqueue_fd < 0) {
- warn("%s: kqueue", __func__);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (kqueue_setup(kqueue_fd, reader_fd, __func__) < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- if (kqueue_setup(kqueue_fd, writer_fd, __func__) < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * Write a byte to the fifo, and make sure that the read end becomes
- * readable, and that the write end remains writable (small write).
- */
- ch = 0x00;
- len = write(writer_fd, &ch, sizeof(ch));
- if (len < 0) {
- warn("%s: write", __func__);
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- if (assert_status(reader_fd, kqueue_fd, READABLE, NOT_WRITABLE,
- NOT_EXCEPTION, __func__, "write", "reader_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * the writer_fd should remain writable.
- */
- if (assert_status(writer_fd, kqueue_fd, NOT_READABLE, WRITABLE,
- NOT_EXCEPTION, __func__, "write", "writer_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * Read the byte from the reader_fd, and now confirm that that fifo
- * becomes unreadable.
- */
- len = read(reader_fd, &ch, sizeof(ch));
- if (len < 0) {
- warn("%s: read", __func__);
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- if (assert_status(reader_fd, kqueue_fd, NOT_READABLE, NOT_WRITABLE,
- NOT_EXCEPTION, __func__, "write+read", "reader_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * The writer_fd should remain writable.
- */
- if (assert_status(writer_fd, kqueue_fd, NOT_READABLE, WRITABLE,
- NOT_EXCEPTION, __func__, "write+read", "writer_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
-}
-
-/*
- * Write a 512k buffer to the fifo in non-blocking mode, and make sure that
- * the write end becomes un-writable as a result of a partial write that
- * fills the fifo buffer.
- */
-static void
-test_events_partial_write(void)
-{
- int kqueue_fd, reader_fd, writer_fd;
- u_char *buffer;
- ssize_t len;
-
- makefifo("testfifo", __func__);
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd)
- < 0) {
- warn("test_events_partial_write: openfifo: testfifo");
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- kqueue_fd = kqueue();
- if (kqueue_fd < 0) {
- warn("%s: kqueue", __func__);
- cleanfifo2("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (kqueue_setup(kqueue_fd, reader_fd, __func__) < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- if (kqueue_setup(kqueue_fd, writer_fd, __func__) < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- if (set_nonblocking(writer_fd, "test_events") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- buffer = malloc(512*1024);
- if (buffer == NULL) {
- warn("test_events_partial_write: malloc");
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
- bzero(buffer, 512*1024);
-
- len = write(writer_fd, buffer, 512*1024);
- if (len < 0) {
- warn("test_events_partial_write: write");
- free(buffer);
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- free(buffer);
-
- if (assert_status(writer_fd, kqueue_fd, NOT_READABLE, NOT_WRITABLE,
- NOT_EXCEPTION, __func__, "big write", "writer_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- if (drain_fd(reader_fd, "test_events") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * Test that the writer_fd has been restored to writable state after
- * draining.
- */
- if (assert_status(writer_fd, kqueue_fd, NOT_READABLE, WRITABLE,
- NOT_EXCEPTION, __func__, "big write + drain", "writer_fd") < 0) {
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
- exit(-1);
- }
-
- cleanfifo3("testfifo", reader_fd, writer_fd, kqueue_fd);
-}
-
-/*
- * We don't comprehensively test O_RDWR file descriptors, but do run a couple
- * of event tests to make sure that the fifo implementation doesn't mixed up
- * status checks. In particular, at least one past FreeBSD bug exists in
- * which the FIONREAD test was performed on the wrong socket implementing the
- * fifo, resulting in the fifo never returning readable.
- */
-static void
-test_events_rdwr(void)
-{
- int fd, kqueue_fd;
- ssize_t len;
- char ch;
-
- makefifo("testfifo", __func__);
- if (openfifo_rw("testfifo", __func__, &fd)
- < 0) {
- warn("%s: openfifo_rw: testfifo", __func__);
- cleanfifo2("testfifo", -1, -1);
- exit(-1);
- }
-
- kqueue_fd = kqueue();
- if (kqueue_fd < 0) {
- warn("%s: kqueue", __func__);
- cleanfifo2("testifo", fd, -1);
- exit(-1);
- }
-
- if (kqueue_setup(kqueue_fd, fd, __func__) < 0) {
- cleanfifo2("testfifo", fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * On first creation, the O_RDWR descriptor should be writable but
- * not readable.
- */
- if (assert_status(fd, kqueue_fd, NOT_READABLE, WRITABLE,
- NOT_EXCEPTION, __func__, "create", "fd") < 0) {
- cleanfifo2("testfifo", fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * Write a byte, which should cause the file descriptor to become
- * readable and writable.
- */
- ch = 0x00;
- len = write(fd, &ch, sizeof(ch));
- if (len < 0) {
- warn("%s: write", __func__);
- cleanfifo2("testfifo", fd, kqueue_fd);
- exit(-1);
- }
-
- if (assert_status(fd, kqueue_fd, READABLE, WRITABLE, NOT_EXCEPTION,
- __func__, "write", "fd") < 0) {
- cleanfifo2("testfifo", fd, kqueue_fd);
- exit(-1);
- }
-
- /*
- * Read a byte, which should cause the file descriptor to return to
- * simply being writable.
- */
- len = read(fd, &ch, sizeof(ch));
- if (len < 0) {
- warn("%s: read", __func__);
- cleanfifo2("testfifo", fd, kqueue_fd);
- exit(-1);
- }
-
- if (assert_status(fd, kqueue_fd, NOT_READABLE, WRITABLE,
- NOT_EXCEPTION, __func__, "write+read", "fd") < 0) {
- cleanfifo2("testfifo", fd, kqueue_fd);
- exit(-1);
- }
-
- cleanfifo2("testfifo", fd, kqueue_fd);
-}
-
-int
-main(int argc, char *argv[])
-{
-
- strcpy(temp_dir, "/tmp/fifo_io.XXXXXXXXXXX");
- if (mkdtemp(temp_dir) == NULL)
- err(-1, "mkdtemp");
- atexit(atexit_temp_dir);
-
- if (chdir(temp_dir) < 0)
- err(-1, "chdir %s", temp_dir);
-
- test_simpleio();
- test_blocking_read_empty();
- test_blocking_one_byte();
- test_nonblocking_one_byte();
- test_blocking_partial_write();
- test_nonblocking_partial_write();
- test_coalesce_big_read();
- test_coalesce_big_write();
- test_events_outofbox();
- test_events_write_read_byte();
- test_events_partial_write();
- test_events_rdwr();
-
- return (0);
-}
diff --git a/tools/regression/fifo/fifo_misc/Makefile b/tools/regression/fifo/fifo_misc/Makefile
deleted file mode 100644
index 97f85ec..0000000
--- a/tools/regression/fifo/fifo_misc/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-PROG= fifo_misc
-MAN=
-WARNS?= 3
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/fifo/fifo_misc/fifo_misc.c b/tools/regression/fifo/fifo_misc/fifo_misc.c
deleted file mode 100644
index 4215212..0000000
--- a/tools/regression/fifo/fifo_misc/fifo_misc.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/*-
- * Copyright (c) 2005 Robert N. M. Watson
- * Copyright (c) 2012 Jilles Tjoelker
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/filio.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * Regression test for piddling details of fifos.
- */
-
-/*
- * All activity occurs within a temporary directory created early in the
- * test.
- */
-char temp_dir[PATH_MAX];
-
-static void __unused
-atexit_temp_dir(void)
-{
-
- rmdir(temp_dir);
-}
-
-static void
-makefifo(const char *fifoname, const char *testname)
-{
-
- if (mkfifo(fifoname, 0700) < 0)
- err(-1, "%s: makefifo: mkfifo: %s", testname, fifoname);
-}
-
-static void
-cleanfifo(const char *fifoname, int fd1, int fd2)
-{
-
- if (fd1 != -1)
- close(fd1);
- if (fd2 != -1)
- close(fd2);
- (void)unlink(fifoname);
-}
-
-static int
-openfifo(const char *fifoname, const char *testname, int *reader_fdp,
- int *writer_fdp)
-{
- int error, fd1, fd2;
-
- fd1 = open(fifoname, O_RDONLY | O_NONBLOCK);
- if (fd1 < 0)
- return (-1);
- fd2 = open(fifoname, O_WRONLY | O_NONBLOCK);
- if (fd2 < 0) {
- error = errno;
- close(fd1);
- errno = error;
- return (-1);
- }
- *reader_fdp = fd1;
- *writer_fdp = fd2;
-
- return (0);
-}
-
-/*
- * POSIX does not allow lseek(2) on fifos, so we expect ESPIPE as a result.
- */
-static void
-test_lseek(void)
-{
- int reader_fd, writer_fd;
-
- makefifo("testfifo", __func__);
-
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd) < 0) {
- warn("%s: openfifo", __func__);
- cleanfifo("testfifo", -1, -1);
- exit(-1);
- }
-
- if (lseek(reader_fd, 1, SEEK_CUR) >= 0) {
- warnx("%s: lseek succeeded instead of returning ESPIPE",
- __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (errno != ESPIPE) {
- warn("%s: lseek returned instead of ESPIPE", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo("testfifo", reader_fd, writer_fd);
-}
-
-/*
- * truncate(2) on FIFO should silently return success.
- */
-static void
-test_truncate(void)
-{
-
- makefifo("testfifo", __func__);
-
- if (truncate("testfifo", 1024) != 0) {
- warn("%s: truncate", __func__);
- cleanfifo("testfifo", -1, -1);
- exit(-1);
- }
-
- cleanfifo("testfifo", -1, -1);
-}
-
-static int
-test_ioctl_setclearflag(int fd, int flag, const char *testname,
- const char *fdname, const char *flagname)
-{
- int i;
-
- i = 1;
- if (ioctl(fd, flag, &i) < 0) {
- warn("%s:%s: ioctl(%s, %s, 1)", testname, __func__, fdname,
- flagname);
- cleanfifo("testfifo", -1, -1);
- exit(-1);
- }
-
- i = 0;
- if (ioctl(fd, flag, &i) < 0) {
- warn("%s:%s: ioctl(%s, %s, 0)", testname, __func__, fdname,
- flagname);
- cleanfifo("testfifo", -1, -1);
- exit(-1);
- }
-
- return (0);
-}
-
-/*
- * Test that various ioctls can be issued against the file descriptor. We
- * don't currently test the semantics of these changes here.
- */
-static void
-test_ioctl(void)
-{
- int reader_fd, writer_fd;
-
- makefifo("testfifo", __func__);
-
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd) < 0) {
- warn("%s: openfifo", __func__);
- cleanfifo("testfifo", -1, -1);
- exit(-1);
- }
-
- /*
- * Set and remove the non-blocking I/O flag.
- */
- if (test_ioctl_setclearflag(reader_fd, FIONBIO, __func__,
- "reader_fd", "FIONBIO") < 0) {
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (test_ioctl_setclearflag(writer_fd, FIONBIO, __func__,
- "writer_fd", "FIONBIO") < 0) {
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- /*
- * Set and remove the async I/O flag.
- */
- if (test_ioctl_setclearflag(reader_fd, FIOASYNC, __func__,
- "reader_fd", "FIOASYNC") < 0) {
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (test_ioctl_setclearflag(writer_fd, FIOASYNC, __func__,
- "writer_fd", "FIONASYNC") < 0) {
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo("testfifo", reader_fd, writer_fd);
-}
-
-/*
- * fchmod(2)/fchown(2) on FIFO should work.
- */
-static void
-test_chmodchown(void)
-{
- struct stat sb;
- int reader_fd, writer_fd;
- uid_t u;
- gid_t g;
-
- makefifo("testfifo", __func__);
-
- if (openfifo("testfifo", __func__, &reader_fd, &writer_fd) < 0) {
- warn("%s: openfifo", __func__);
- cleanfifo("testfifo", -1, -1);
- exit(-1);
- }
-
- if (fchmod(reader_fd, 0666) != 0) {
- warn("%s: fchmod", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (stat("testfifo", &sb) != 0) {
- warn("%s: stat", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if ((sb.st_mode & 0777) != 0666) {
- warnx("%s: stat chmod result", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (fstat(writer_fd, &sb) != 0) {
- warn("%s: fstat", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if ((sb.st_mode & 0777) != 0666) {
- warnx("%s: fstat chmod result", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (fchown(reader_fd, -1, -1) != 0) {
- warn("%s: fchown 1", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- u = geteuid();
- if (u == 0)
- u = 1;
- g = getegid();
- if (fchown(reader_fd, u, g) != 0) {
- warn("%s: fchown 2", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
- if (stat("testfifo", &sb) != 0) {
- warn("%s: stat", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (sb.st_uid != u || sb.st_gid != g) {
- warnx("%s: stat chown result", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (fstat(writer_fd, &sb) != 0) {
- warn("%s: fstat", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- if (sb.st_uid != u || sb.st_gid != g) {
- warnx("%s: fstat chown result", __func__);
- cleanfifo("testfifo", reader_fd, writer_fd);
- exit(-1);
- }
-
- cleanfifo("testfifo", -1, -1);
-}
-
-int
-main(int argc, char *argv[])
-{
-
- strcpy(temp_dir, "/tmp/fifo_misc.XXXXXXXXXXX");
- if (mkdtemp(temp_dir) == NULL)
- err(-1, "mkdtemp");
- atexit(atexit_temp_dir);
-
- if (chdir(temp_dir) < 0)
- err(-1, "chdir %s", temp_dir);
-
- test_lseek();
- test_truncate();
- test_ioctl();
- test_chmodchown();
-
- return (0);
-}
diff --git a/tools/regression/fifo/fifo_open/Makefile b/tools/regression/fifo/fifo_open/Makefile
deleted file mode 100644
index d90811c..0000000
--- a/tools/regression/fifo/fifo_open/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-PROG= fifo_open
-MAN=
-WARNS?= 3
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/fifo/fifo_open/fifo_open.c b/tools/regression/fifo/fifo_open/fifo_open.c
deleted file mode 100644
index 6899a3a..0000000
--- a/tools/regression/fifo/fifo_open/fifo_open.c
+++ /dev/null
@@ -1,476 +0,0 @@
-/*-
- * Copyright (c) 2005 Robert N. M. Watson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * Regression test to exercise various POSIX-defined parts of fifo behavior
- * described for open(2):
- *
- * O_NONBLOCK
- * When opening a FIFO with O_RDONLY or O_WRONLY set:
- *
- * - If O_NONBLOCK is set, an open() for reading-only shall return without
- * delay. An open() for writing-only shall return an error if no process
- * currently has the file open for reading.
- *
- * - If O_NONBLOCK is clear, an open() for reading-only shall block the
- * calling thread until a thread opens the file for writing. An open()
- * for writing-only shall block the calling thread until a thread opens
- * the file for reading.
- *
- * When opening a block special or character special file that supports
- * non-blocking opens:
- *
- * - If O_NONBLOCK is set, the open() function shall return without blocking
- * for the device to be ready or available. Subsequent behavior of the
- * device is device-specific.
- *
- * - If O_NONBLOCK is clear, the open() function shall block the calling
- * thread until the device is ready or available before returning.
- *
- * Special errors:
- *
- * [ENXIO]
- * O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is set, and no
- * process has the file open for reading.
- */
-
-/*
- * In order to test blocking/non-blocking behavior, test processes must
- * potentially block themselves until released. As bugs in blocking result
- * in processes that won't un-block, we must sacrifice a process to the task,
- * watching and potentially killing it after a time-out. The main test
- * process is never used to open or act directly on a fifo (other than to
- * create or unlink it) in order to avoid the main test process being
- * blocked.
- */
-
-/*
- * All activity occurs within a temporary directory created early in the
- * test.
- */
-char temp_dir[PATH_MAX];
-
-static void __unused
-atexit_temp_dir(void)
-{
-
- rmdir(temp_dir);
-}
-
-/*
- * Run a function in a particular test process.
- */
-static int
-run_in_process(int (*func)(void), pid_t *pidp, const char *errstr)
-{
- pid_t pid;
-
- pid = fork();
- if (pid < 0) {
- warn("%s: run_in_process: fork", errstr);
- return (-1);
- }
-
- if (pid == 0)
- exit(func());
-
- if (pidp != NULL)
- *pidp = pid;
-
- return (0);
-}
-
-/*
- * Wait for a process on a timeout, and if the timeout expires, kill the
- * process. Test each second rather than waiting the full timeout at once to
- * minimize the amount of time spent hanging around unnecessarily.
- */
-static int
-wait_and_timeout(pid_t pid, int timeout, int *status, const char *errstr)
-{
- pid_t wpid;
- int i;
-
- /*
- * Count up to the timeout, but do a non-hanging waitpid() after each
- * second so we can avoid waiting a lot of extra time.
- */
- for (i = 0; i < timeout; i++) {
- wpid = waitpid(pid, status, WNOHANG);
- if (wpid < 0) {
- warn("%s: wait_and_timeout: waitpid %d", errstr, pid);
- return (-1);
- }
-
- if (wpid == pid)
- return (0);
-
- sleep(1);
- }
-
- wpid = waitpid(pid, status, WNOHANG);
- if (wpid < 0) {
- warn("%s: wait_and_timeout: waitpid %d", errstr, pid);
- return (-1);
- }
-
- if (wpid == pid)
- return (0);
-
- if (kill(pid, SIGTERM) < 0) {
- warn("%s: wait_and_timeout: kill %d", errstr, pid);
- return (-1);
- }
-
- wpid = waitpid(pid, status, 0);
- if (wpid < 0) {
- warn("%s: wait_and_timeout: waitpid %d", errstr, pid);
- return (-1);
- }
-
- if (wpid != pid) {
- warn("%s: waitpid: returned %d not %d", errstr, wpid, pid);
- return (-1);
- }
-
- warnx("%s: process blocked", errstr);
- return (-1);
-}
-
-static int
-non_blocking_open_reader(void)
-{
- int fd;
-
- fd = open("testfifo", O_RDONLY | O_NONBLOCK);
- if (fd < 0)
- return (errno);
- close(fd);
-
- return (0);
-}
-
-static int
-non_blocking_open_writer(void)
-{
- int fd;
-
- fd = open("testfifo", O_WRONLY | O_NONBLOCK);
- if (fd < 0)
- return (errno);
- close(fd);
-
- return (0);
-}
-
-static int
-blocking_open_reader(void)
-{
- int fd;
-
- fd = open("testfifo", O_RDONLY);
- if (fd < 0)
- return (errno);
- close(fd);
-
- return (0);
-}
-
-static int
-blocking_open_writer(void)
-{
- int fd;
-
- fd = open("testfifo", O_WRONLY);
- if (fd < 0)
- return (errno);
- close(fd);
-
- return (0);
-}
-
-static void
-test_blocking_reader(void)
-{
- pid_t reader_pid, writer_pid, wpid;
- int error, status;
-
- if (mkfifo("testfifo", 0600) < 0)
- err(-1, "test_blocking_reader: mkfifo: testfifo");
-
- /*
- * Block a process in opening the fifo.
- */
- if (run_in_process(blocking_open_reader, &reader_pid,
- "test_blocking_reader: blocking_open_reader") < 0) {
- (void)unlink("testfifo");
- exit(-1);
- }
-
- /*
- * Test that it blocked.
- */
- sleep(5);
- wpid = waitpid(reader_pid, &status, WNOHANG);
- if (wpid < 0) {
- error = errno;
- (void)unlink("testfifo");
- errno = error;
- err(-1, "test_blocking_reader: waitpid %d", reader_pid);
- }
-
- if (wpid != 0 && wpid != reader_pid) {
- (void)unlink("testfifo");
- errx(-1, "test_blocking_reader: waitpid %d returned %d",
- reader_pid, wpid);
- }
-
- if (wpid == reader_pid) {
- (void)unlink("testfifo");
- errx(-1, "test_blocking_reader: blocking child didn't "
- "block");
- }
-
- /*
- * Unblock the blocking reader.
- */
- if (run_in_process(blocking_open_writer, &writer_pid,
- "test_blocking_reader: blocking_open_writer") < 0) {
- (void)unlink("testfifo");
- (void)kill(reader_pid, SIGTERM);
- (void)waitpid(reader_pid, &status, 0);
- exit(-1);
- }
-
- /*
- * Make sure both processes exited quickly (<1 second) to make sure
- * they didn't block, and GC.
- */
- if (wait_and_timeout(reader_pid, 1, &status,
- "test_blocking_reader: blocking_open_reader") < 0) {
- (void)unlink("testinfo");
- (void)kill(reader_pid, SIGTERM);
- (void)kill(writer_pid, SIGTERM);
- exit(-1);
- }
-
- if (wait_and_timeout(writer_pid, 1, &status,
- "test_blocking_reader: blocking_open_writer") < 0) {
- (void)unlink("testinfo");
- (void)kill(writer_pid, SIGTERM);
- exit(-1);
- }
-
- if (unlink("testfifo") < 0)
- err(-1, "test_blocking_reader: unlink: testfifo");
-}
-static void
-test_blocking_writer(void)
-{
- pid_t reader_pid, writer_pid, wpid;
- int error, status;
-
- if (mkfifo("testfifo", 0600) < 0)
- err(-1, "test_blocking_writer: mkfifo: testfifo");
-
- /*
- * Block a process in opening the fifo.
- */
- if (run_in_process(blocking_open_writer, &writer_pid,
- "test_blocking_writer: blocking_open_writer") < 0) {
- (void)unlink("testfifo");
- exit(-1);
- }
-
- /*
- * Test that it blocked.
- */
- sleep(5);
- wpid = waitpid(writer_pid, &status, WNOHANG);
- if (wpid < 0) {
- error = errno;
- (void)unlink("testfifo");
- errno = error;
- err(-1, "test_blocking_writer: waitpid %d", writer_pid);
- }
-
- if (wpid != 0 && wpid != writer_pid) {
- (void)unlink("testfifo");
- errx(-1, "test_blocking_writer: waitpid %d returned %d",
- writer_pid, wpid);
- }
-
- if (wpid == writer_pid) {
- (void)unlink("testfifo");
- errx(-1, "test_blocking_writer: blocking child didn't "
- "block");
- }
-
- /*
- * Unblock the blocking writer.
- */
- if (run_in_process(blocking_open_reader, &reader_pid,
- "test_blocking_writer: blocking_open_reader") < 0) {
- (void)unlink("testfifo");
- (void)kill(writer_pid, SIGTERM);
- (void)waitpid(writer_pid, &status, 0);
- exit(-1);
- }
-
- /*
- * Make sure both processes exited quickly (<1 second) to make sure
- * they didn't block, and GC.
- */
- if (wait_and_timeout(writer_pid, 1, &status,
- "test_blocking_writer: blocking_open_writer") < 0) {
- (void)unlink("testinfo");
- (void)kill(writer_pid, SIGTERM);
- (void)kill(reader_pid, SIGTERM);
- (void)waitpid(writer_pid, &status, 0);
- (void)waitpid(reader_pid, &status, 0);
- exit(-1);
- }
-
- if (wait_and_timeout(reader_pid, 1, &status,
- "test_blocking_writer: blocking_open_reader") < 0) {
- (void)unlink("testinfo");
- (void)kill(reader_pid, SIGTERM);
- (void)waitpid(reader_pid, &status, 0);
- exit(-1);
- }
-
- if (unlink("testfifo") < 0)
- err(-1, "test_blocking_writer: unlink: testfifo");
-}
-
-static void
-test_non_blocking_reader(void)
-{
- int status;
- pid_t pid;
-
- if (mkfifo("testfifo", 0600) < 0)
- err(-1, "test_non_blocking_reader: mkfifo: testfifo");
-
- if (run_in_process(non_blocking_open_reader, &pid,
- "test_non_blocking_reader: non_blocking_open_reader") < 0) {
- (void)unlink("testfifo");
- exit(-1);
- }
-
- status = -1;
- if (wait_and_timeout(pid, 5, &status,
- "test_non_blocking_reader: non_blocking_open_reader") < 0) {
- (void)unlink("testfifo");
- exit(-1);
- }
-
- if (WEXITSTATUS(status) != 0) {
- (void)unlink("testfifo");
- errno = WEXITSTATUS(status);
- err(-1, "test_non_blocking_reader: "
- "non_blocking_open_reader: open: testfifo");
- }
-
- if (unlink("testfifo") < 0)
- err(-1, "test_non_blocking_reader: unlink: testfifo");
-}
-
-static void
-test_non_blocking_writer(void)
-{
- int status;
- pid_t pid;
-
- if (mkfifo("testfifo", 0600) < 0)
- err(-1, "test_non_blocking_writer: mkfifo: testfifo");
-
- if (run_in_process(non_blocking_open_writer, &pid,
- "test_non_blocking_writer: non_blocking_open_writer") < 0) {
- (void)unlink("testfifo");
- exit(-1);
- }
-
- status = -1;
- if (wait_and_timeout(pid, 5, &status,
- "test_non_blocking_writer: non_blocking_open_writer") < 0) {
- (void)unlink("testfifo");
- exit(-1);
- }
-
- if (WEXITSTATUS(status) != ENXIO) {
- (void)unlink("testfifo");
-
- errno = WEXITSTATUS(status);
- if (errno == 0)
- errx(-1, "test_non_blocking_writer: "
- "non_blocking_open_writer: open succeeded");
- err(-1, "test_non_blocking_writer: "
- "non_blocking_open_writer: open: testfifo");
- }
-
- if (unlink("testfifo") < 0)
- err(-1, "test_non_blocking_writer: unlink: testfifo");
-}
-
-int
-main(int argc, char *argv[])
-{
-
- if (geteuid() != 0)
- errx(-1, "must be run as root");
-
- strcpy(temp_dir, "/tmp/fifo_open.XXXXXXXXXXX");
- if (mkdtemp(temp_dir) == NULL)
- err(-1, "mkdtemp");
- if (chdir(temp_dir) < 0)
- err(-1, "chdir: %s", temp_dir);
- atexit(atexit_temp_dir);
-
- test_non_blocking_reader();
- test_non_blocking_writer();
-
- test_blocking_reader();
- test_blocking_writer();
-
- return (0);
-}
diff --git a/tools/regression/file/closefrom/closefrom.c b/tools/regression/file/closefrom/closefrom.c
index e119f20..b27ec51 100644
--- a/tools/regression/file/closefrom/closefrom.c
+++ b/tools/regression/file/closefrom/closefrom.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2009 Advanced Computing Technologies LLC
+ * Copyright (c) 2009 Hudson River Trading LLC
* Written by: John H. Baldwin <jhb@FreeBSD.org>
* All rights reserved.
*
diff --git a/tools/regression/file/dup/Makefile b/tools/regression/file/dup/Makefile
deleted file mode 100644
index 225c2e2..0000000
--- a/tools/regression/file/dup/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-PROG= dup
-MAN=
-WARNS?= 6
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/file/dup/dup.c b/tools/regression/file/dup/dup.c
deleted file mode 100644
index 8173818..0000000
--- a/tools/regression/file/dup/dup.c
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * $OpenBSD: dup2test.c,v 1.3 2003/07/31 21:48:08 deraadt Exp $
- * $OpenBSD: dup2_self.c,v 1.3 2003/07/31 21:48:08 deraadt Exp $
- * $OpenBSD: fcntl_dup.c,v 1.2 2003/07/31 21:48:08 deraadt Exp $
- *
- * Written by Artur Grabowski <art@openbsd.org> 2002 Public Domain.
- *
- * $FreeBSD$
- */
-
-/*
- * Test #1: check if dup(2) works.
- * Test #2: check if dup2(2) works.
- * Test #3: check if dup2(2) returned a fd we asked for.
- * Test #4: check if dup2(2) cleared close-on-exec flag for duped fd.
- * Test #5: check if dup2(2) allows to dup fd to itself.
- * Test #6: check if dup2(2) returned a fd we asked for.
- * Test #7: check if dup2(2) did not clear close-on-exec flag for duped fd.
- * Test #8: check if fcntl(F_DUPFD) works.
- * Test #9: check if fcntl(F_DUPFD) cleared close-on-exec flag for duped fd.
- * Test #10: check if dup2() to a fd > current maximum number of open files
- * limit work.
- * Test #11: check if fcntl(F_DUP2FD) works.
- * Test #12: check if fcntl(F_DUP2FD) returned a fd we asked for.
- * Test #13: check if fcntl(F_DUP2FD) cleared close-on-exec flag for duped fd.
- * Test #14: check if fcntl(F_DUP2FD) allows to dup fd to itself.
- * Test #15: check if fcntl(F_DUP2FD) returned a fd we asked for.
- * Test #16: check if fcntl(F_DUP2FD) did not clear close-on-exec flag for
- * duped fd.
- * Test #17: check if fcntl(F_DUP2FD) to a fd > current maximum number of open
- * files limit work.
- * Test #18: check if fcntl(F_DUPFD_CLOEXEC) works.
- * Test #19: check if fcntl(F_DUPFD_CLOEXEC) set close-on-exec flag for duped
- * fd.
- * Test #20: check if fcntl(F_DUP2FD_CLOEXEC) works.
- * Test #21: check if fcntl(F_DUP2FD_CLOEXEC) returned a fd we asked for.
- * Test #22: check if fcntl(F_DUP2FD_CLOEXEC) set close-on-exec flag for duped
- * fd.
- * Test #23: check if fcntl(F_DUP2FD_CLOEXEC) to a fd > current maximum number
- * of open files limit work.
- * Test #24: check if dup3(O_CLOEXEC) works.
- * Test #25: check if dup3(O_CLOEXEC) returned a fd we asked for.
- * Test #26: check if dup3(O_CLOEXEC) set close-on-exec flag for duped fd.
- * Test #27: check if dup3(0) works.
- * Test #28: check if dup3(0) returned a fd we asked for.
- * Test #29: check if dup3(0) cleared close-on-exec flag for duped fd.
- * Test #30: check if dup3(O_CLOEXEC) fails if oldfd == newfd.
- * Test #31: check if dup3(0) fails if oldfd == newfd.
- * Test #32: check if dup3(O_CLOEXEC) to a fd > current maximum number of
- * open files limit work.
- */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-#include <err.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-static int getafile(void);
-
-static int
-getafile(void)
-{
- int fd;
-
- char temp[] = "/tmp/dup2XXXXXXXXX";
- if ((fd = mkstemp(temp)) < 0)
- err(1, "mkstemp");
- remove(temp);
- if (ftruncate(fd, 1024) != 0)
- err(1, "ftruncate");
- return (fd);
-}
-
-int
-main(int __unused argc, char __unused *argv[])
-{
- struct rlimit rlp;
- int orgfd, fd1, fd2, test = 0;
-
- orgfd = getafile();
-
- printf("1..32\n");
-
- /* If dup(2) ever work? */
- if ((fd1 = dup(orgfd)) < 0)
- err(1, "dup");
- printf("ok %d - dup(2) works\n", ++test);
-
- /* Set close-on-exec */
- if (fcntl(fd1, F_SETFD, 1) != 0)
- err(1, "fcntl(F_SETFD)");
-
- /* If dup2(2) ever work? */
- if ((fd2 = dup2(fd1, fd1 + 1)) < 0)
- err(1, "dup2");
- printf("ok %d - dup2(2) works\n", ++test);
-
- /* Do we get the right fd? */
- ++test;
- if (fd2 != fd1 + 1)
- printf("no ok %d - dup2(2) didn't give us the right fd\n",
- test);
- else
- printf("ok %d - dup2(2) returned a correct fd\n", test);
-
- /* Was close-on-exec cleared? */
- ++test;
- if (fcntl(fd2, F_GETFD) != 0)
- printf("not ok %d - dup2(2) didn't clear close-on-exec\n",
- test);
- else
- printf("ok %d - dup2(2) cleared close-on-exec\n", test);
-
- /*
- * Dup to itself.
- *
- * We're testing a small tweak in dup2 semantics.
- * Normally dup and dup2 will clear the close-on-exec
- * flag on the new fd (which appears to be an implementation
- * mistake from start and not some planned behavior).
- * In today's implementations of dup and dup2 we have to make
- * an effort to really clear that flag. But all tested
- * implementations of dup2 have another tweak. If we
- * dup2(old, new) when old == new, the syscall short-circuits
- * and returns early (because there is no need to do all the
- * work (and there is a risk for serious mistakes)).
- * So although the docs say that dup2 should "take 'old',
- * close 'new' perform a dup(2) of 'old' into 'new'"
- * the docs are not really followed because close-on-exec
- * is not cleared on 'new'.
- *
- * Since everyone has this bug, we pretend that this is
- * the way it is supposed to be and test here that it really
- * works that way.
- *
- * This is a fine example on where two separate implementation
- * fuckups take out each other and make the end-result the way
- * it was meant to be.
- */
- if ((fd2 = dup2(fd1, fd1)) < 0)
- err(1, "dup2");
- printf("ok %d - dup2(2) to itself works\n", ++test);
-
- /* Do we get the right fd? */
- ++test;
- if (fd2 != fd1)
- printf("not ok %d - dup2(2) didn't give us the right fd\n",
- test);
- else
- printf("ok %d - dup2(2) to itself returned a correct fd\n",
- test);
-
- /* Was close-on-exec cleared? */
- ++test;
- if (fcntl(fd2, F_GETFD) == 0)
- printf("not ok %d - dup2(2) cleared close-on-exec\n", test);
- else
- printf("ok %d - dup2(2) didn't clear close-on-exec\n", test);
-
- /* Does fcntl(F_DUPFD) work? */
- if ((fd2 = fcntl(fd1, F_DUPFD, 10)) < 0)
- err(1, "fcntl(F_DUPFD)");
- if (fd2 < 10)
- printf("not ok %d - fcntl(F_DUPFD) returned wrong fd %d\n",
- ++test, fd2);
- else
- printf("ok %d - fcntl(F_DUPFD) works\n", ++test);
-
- /* Was close-on-exec cleared? */
- ++test;
- if (fcntl(fd2, F_GETFD) != 0)
- printf(
- "not ok %d - fcntl(F_DUPFD) didn't clear close-on-exec\n",
- test);
- else
- printf("ok %d - fcntl(F_DUPFD) cleared close-on-exec\n", test);
-
- ++test;
- if (getrlimit(RLIMIT_NOFILE, &rlp) < 0)
- err(1, "getrlimit");
- if ((fd2 = dup2(fd1, rlp.rlim_cur + 1)) >= 0)
- printf("not ok %d - dup2(2) bypassed NOFILE limit\n", test);
- else
- printf("ok %d - dup2(2) didn't bypass NOFILE limit\n", test);
-
- /* If fcntl(F_DUP2FD) ever work? */
- if ((fd2 = fcntl(fd1, F_DUP2FD, fd1 + 1)) < 0)
- err(1, "fcntl(F_DUP2FD)");
- printf("ok %d - fcntl(F_DUP2FD) works\n", ++test);
-
- /* Do we get the right fd? */
- ++test;
- if (fd2 != fd1 + 1)
- printf(
- "no ok %d - fcntl(F_DUP2FD) didn't give us the right fd\n",
- test);
- else
- printf("ok %d - fcntl(F_DUP2FD) returned a correct fd\n",
- test);
-
- /* Was close-on-exec cleared? */
- ++test;
- if (fcntl(fd2, F_GETFD) != 0)
- printf(
- "not ok %d - fcntl(F_DUP2FD) didn't clear close-on-exec\n",
- test);
- else
- printf("ok %d - fcntl(F_DUP2FD) cleared close-on-exec\n",
- test);
-
- /* Dup to itself */
- if ((fd2 = fcntl(fd1, F_DUP2FD, fd1)) < 0)
- err(1, "fcntl(F_DUP2FD)");
- printf("ok %d - fcntl(F_DUP2FD) to itself works\n", ++test);
-
- /* Do we get the right fd? */
- ++test;
- if (fd2 != fd1)
- printf(
- "not ok %d - fcntl(F_DUP2FD) didn't give us the right fd\n",
- test);
- else
- printf(
- "ok %d - fcntl(F_DUP2FD) to itself returned a correct fd\n",
- test);
-
- /* Was close-on-exec cleared? */
- ++test;
- if (fcntl(fd2, F_GETFD) == 0)
- printf("not ok %d - fcntl(F_DUP2FD) cleared close-on-exec\n",
- test);
- else
- printf("ok %d - fcntl(F_DUP2FD) didn't clear close-on-exec\n",
- test);
-
- ++test;
- if (getrlimit(RLIMIT_NOFILE, &rlp) < 0)
- err(1, "getrlimit");
- if ((fd2 = fcntl(fd1, F_DUP2FD, rlp.rlim_cur + 1)) >= 0)
- printf("not ok %d - fcntl(F_DUP2FD) bypassed NOFILE limit\n",
- test);
- else
- printf("ok %d - fcntl(F_DUP2FD) didn't bypass NOFILE limit\n",
- test);
-
- /* Does fcntl(F_DUPFD_CLOEXEC) work? */
- if ((fd2 = fcntl(fd1, F_DUPFD_CLOEXEC, 10)) < 0)
- err(1, "fcntl(F_DUPFD_CLOEXEC)");
- if (fd2 < 10)
- printf("not ok %d - fcntl(F_DUPFD_CLOEXEC) returned wrong fd %d\n",
- ++test, fd2);
- else
- printf("ok %d - fcntl(F_DUPFD_CLOEXEC) works\n", ++test);
-
- /* Was close-on-exec cleared? */
- ++test;
- if (fcntl(fd2, F_GETFD) != 1)
- printf(
- "not ok %d - fcntl(F_DUPFD_CLOEXEC) didn't set close-on-exec\n",
- test);
- else
- printf("ok %d - fcntl(F_DUPFD_CLOEXEC) set close-on-exec\n",
- test);
-
- /* If fcntl(F_DUP2FD_CLOEXEC) ever work? */
- if ((fd2 = fcntl(fd1, F_DUP2FD_CLOEXEC, fd1 + 1)) < 0)
- err(1, "fcntl(F_DUP2FD_CLOEXEC)");
- printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) works\n", ++test);
-
- /* Do we get the right fd? */
- ++test;
- if (fd2 != fd1 + 1)
- printf(
- "no ok %d - fcntl(F_DUP2FD_CLOEXEC) didn't give us the right fd\n",
- test);
- else
- printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) returned a correct fd\n",
- test);
-
- /* Was close-on-exec set? */
- ++test;
- if (fcntl(fd2, F_GETFD) != FD_CLOEXEC)
- printf(
- "not ok %d - fcntl(F_DUP2FD_CLOEXEC) didn't set close-on-exec\n",
- test);
- else
- printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) set close-on-exec\n",
- test);
-
- /*
- * It is unclear what F_DUP2FD_CLOEXEC should do when duplicating a
- * file descriptor onto itself.
- */
-
- ++test;
- if (getrlimit(RLIMIT_NOFILE, &rlp) < 0)
- err(1, "getrlimit");
- if ((fd2 = fcntl(fd1, F_DUP2FD_CLOEXEC, rlp.rlim_cur + 1)) >= 0)
- printf("not ok %d - fcntl(F_DUP2FD_CLOEXEC) bypassed NOFILE limit\n",
- test);
- else
- printf("ok %d - fcntl(F_DUP2FD_CLOEXEC) didn't bypass NOFILE limit\n",
- test);
-
- /* Does dup3(O_CLOEXEC) ever work? */
- if ((fd2 = dup3(fd1, fd1 + 1, O_CLOEXEC)) < 0)
- err(1, "dup3(O_CLOEXEC)");
- printf("ok %d - dup3(O_CLOEXEC) works\n", ++test);
-
- /* Do we get the right fd? */
- ++test;
- if (fd2 != fd1 + 1)
- printf(
- "no ok %d - dup3(O_CLOEXEC) didn't give us the right fd\n",
- test);
- else
- printf("ok %d - dup3(O_CLOEXEC) returned a correct fd\n",
- test);
-
- /* Was close-on-exec set? */
- ++test;
- if (fcntl(fd2, F_GETFD) != FD_CLOEXEC)
- printf(
- "not ok %d - dup3(O_CLOEXEC) didn't set close-on-exec\n",
- test);
- else
- printf("ok %d - dup3(O_CLOEXEC) set close-on-exec\n",
- test);
-
- /* Does dup3(0) ever work? */
- if ((fd2 = dup3(fd1, fd1 + 1, 0)) < 0)
- err(1, "dup3(0)");
- printf("ok %d - dup3(0) works\n", ++test);
-
- /* Do we get the right fd? */
- ++test;
- if (fd2 != fd1 + 1)
- printf(
- "no ok %d - dup3(0) didn't give us the right fd\n",
- test);
- else
- printf("ok %d - dup3(0) returned a correct fd\n",
- test);
-
- /* Was close-on-exec cleared? */
- ++test;
- if (fcntl(fd2, F_GETFD) != 0)
- printf(
- "not ok %d - dup3(0) didn't clear close-on-exec\n",
- test);
- else
- printf("ok %d - dup3(0) cleared close-on-exec\n",
- test);
-
- /* dup3() does not allow duplicating to the same fd */
- ++test;
- if (dup3(fd1, fd1, O_CLOEXEC) != -1)
- printf(
- "not ok %d - dup3(fd1, fd1, O_CLOEXEC) succeeded\n", test);
- else
- printf("ok %d - dup3(fd1, fd1, O_CLOEXEC) failed\n", test);
-
- ++test;
- if (dup3(fd1, fd1, 0) != -1)
- printf(
- "not ok %d - dup3(fd1, fd1, 0) succeeded\n", test);
- else
- printf("ok %d - dup3(fd1, fd1, 0) failed\n", test);
-
- ++test;
- if (getrlimit(RLIMIT_NOFILE, &rlp) < 0)
- err(1, "getrlimit");
- if ((fd2 = dup3(fd1, rlp.rlim_cur + 1, O_CLOEXEC)) >= 0)
- printf("not ok %d - dup3(O_CLOEXEC) bypassed NOFILE limit\n",
- test);
- else
- printf("ok %d - dup3(O_CLOEXEC) didn't bypass NOFILE limit\n",
- test);
-
- return (0);
-}
diff --git a/tools/regression/file/dup/dup.t b/tools/regression/file/dup/dup.t
deleted file mode 100644
index 8bdfd03..0000000
--- a/tools/regression/file/dup/dup.t
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-cd `dirname $0`
-
-executable=`basename $0 .t`
-
-make $executable 2>&1 > /dev/null
-
-exec ./$executable
diff --git a/tools/regression/file/fcntlflags/Makefile b/tools/regression/file/fcntlflags/Makefile
deleted file mode 100644
index 9e7fc3e..0000000
--- a/tools/regression/file/fcntlflags/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-PROG= fcntlflags
-MAN=
-WARNS?= 6
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/file/fcntlflags/Makefile.depend b/tools/regression/file/fcntlflags/Makefile.depend
deleted file mode 100644
index 82222e2..0000000
--- a/tools/regression/file/fcntlflags/Makefile.depend
+++ /dev/null
@@ -1,17 +0,0 @@
-# Autogenerated - do NOT edit!
-
-DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
-
-DIRDEPS = \
- gnu/lib/libgcc \
- include \
- lib/${CSU_DIR} \
- lib/libc \
- lib/libcompiler_rt \
-
-
-.include <dirdeps.mk>
-
-.if ${DEP_RELDIR} == ${_DEP_RELDIR}
-# local dependencies - needed for -jN in clean tree
-.endif
diff --git a/tools/regression/file/fcntlflags/fcntlflags.c b/tools/regression/file/fcntlflags/fcntlflags.c
deleted file mode 100644
index bcb3b54..0000000
--- a/tools/regression/file/fcntlflags/fcntlflags.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*-
- * Copyright (c) 2013 Jilles Tjoelker
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/cdefs.h>
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-
-/*
- * O_ACCMODE is currently defined incorrectly. This is what it should be.
- * Various code depends on the incorrect value.
- */
-#define CORRECT_O_ACCMODE (O_ACCMODE | O_EXEC)
-
-static int testnum;
-
-static void
-subtests(const char *path, int omode, const char *omodetext)
-{
- int fd, flags1, flags2, flags3;
-
- fd = open(path, omode);
- if (fd == -1)
- printf("not ok %d - open(\"%s\", %s) failed\n",
- testnum++, path, omodetext);
- else
- printf("ok %d - open(\"%s\", %s) succeeded\n",
- testnum++, path, omodetext);
- flags1 = fcntl(fd, F_GETFL);
- if (flags1 == -1)
- printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++);
- else if ((flags1 & CORRECT_O_ACCMODE) == omode)
- printf("ok %d - fcntl(F_GETFL) gave correct result\n",
- testnum++);
- else
- printf("not ok %d - fcntl(F_GETFL) gave incorrect result "
- "(%#x & %#x != %#x)\n",
- testnum++, flags1, CORRECT_O_ACCMODE, omode);
- if (fcntl(fd, F_SETFL, flags1) == -1)
- printf("not ok %d - fcntl(F_SETFL) same flags failed\n",
- testnum++);
- else
- printf("ok %d - fcntl(F_SETFL) same flags succeeded\n",
- testnum++);
- flags2 = fcntl(fd, F_GETFL);
- if (flags2 == -1)
- printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++);
- else if (flags2 == flags1)
- printf("ok %d - fcntl(F_GETFL) gave same result\n",
- testnum++);
- else
- printf("not ok %d - fcntl(F_SETFL) caused fcntl(F_GETFL) to "
- "change from %#x to %#x\n",
- testnum++, flags1, flags2);
- if (fcntl(fd, F_SETFL, flags2 | O_NONBLOCK) == -1)
- printf("not ok %d - fcntl(F_SETFL) O_NONBLOCK failed\n",
- testnum++);
- else
- printf("ok %d - fcntl(F_SETFL) O_NONBLOCK succeeded\n",
- testnum++);
- flags3 = fcntl(fd, F_GETFL);
- if (flags3 == -1)
- printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++);
- else if (flags3 == (flags2 | O_NONBLOCK))
- printf("ok %d - fcntl(F_GETFL) gave expected result\n",
- testnum++);
- else
- printf("not ok %d - fcntl(F_SETFL) gave unexpected result "
- "(%#x != %#x)\n",
- testnum++, flags3, flags2 | O_NONBLOCK);
- (void)close(fd);
-}
-
-int
-main(int argc __unused, char **argv __unused)
-{
- printf("1..24\n");
- testnum = 1;
- subtests("/dev/null", O_RDONLY, "O_RDONLY");
- subtests("/dev/null", O_WRONLY, "O_WRONLY");
- subtests("/dev/null", O_RDWR, "O_RDWR");
- subtests("/bin/sh", O_EXEC, "O_EXEC");
- return (0);
-}
diff --git a/tools/regression/file/fcntlflags/fcntlflags.t b/tools/regression/file/fcntlflags/fcntlflags.t
deleted file mode 100644
index 8bdfd03..0000000
--- a/tools/regression/file/fcntlflags/fcntlflags.t
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-cd `dirname $0`
-
-executable=`basename $0 .t`
-
-make $executable 2>&1 > /dev/null
-
-exec ./$executable
diff --git a/tools/regression/file/flock/Makefile b/tools/regression/file/flock/Makefile
deleted file mode 100644
index cd1a46d..0000000
--- a/tools/regression/file/flock/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= flock
-MAN=
-WARNS?= 6
-DPADD= ${LIBPTHREAD}
-LDADD= -lpthread
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/file/flock/flock.c b/tools/regression/file/flock/flock.c
deleted file mode 100644
index fd426b0..0000000
--- a/tools/regression/file/flock/flock.c
+++ /dev/null
@@ -1,1594 +0,0 @@
-/*-
- * Copyright (c) 2008 Isilon Inc http://www.isilon.com/
- * Authors: Doug Rabson <dfr@rabson.org>
- * Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/file.h>
-#include <sys/time.h>
-#ifdef __FreeBSD__
-#include <sys/mount.h>
-#endif
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <signal.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifdef __FreeBSD__
-#if __FreeBSD_version >= 800028
-#define HAVE_SYSID
-#endif
-#include <sys/cdefs.h>
-#else
-#ifndef __unused
-#ifdef __GNUC__
-#define __unused __attribute__((__unused__))
-#else
-#define __unused
-#endif
-#endif
-#endif
-
-int verbose = 0;
-
-static int
-make_file(const char *pathname, off_t sz)
-{
- struct stat st;
- const char *template = "/flocktempXXXXXX";
- size_t len;
- char *filename;
- int fd;
-
- if (stat(pathname, &st) == 0) {
- if (S_ISREG(st.st_mode)) {
- fd = open(pathname, O_RDWR);
- if (fd < 0)
- err(1, "open(%s)", pathname);
- if (ftruncate(fd, sz) < 0)
- err(1, "ftruncate");
- return (fd);
- }
- }
-
- len = strlen(pathname) + strlen(template) + 1;
- filename = malloc(len);
- strcpy(filename, pathname);
- strcat(filename, template);
- fd = mkstemp(filename);
- if (fd < 0)
- err(1, "mkstemp");
- if (ftruncate(fd, sz) < 0)
- err(1, "ftruncate");
- if (unlink(filename) < 0)
- err(1, "unlink");
- free(filename);
-
- return (fd);
-}
-
-static void
-ignore_alarm(int __unused sig)
-{
-}
-
-static int
-safe_waitpid(pid_t pid)
-{
- int save_errno;
- int status;
-
- save_errno = errno;
- errno = 0;
- while (waitpid(pid, &status, 0) != pid) {
- if (errno == EINTR)
- continue;
- err(1, "waitpid");
- }
- errno = save_errno;
-
- return (status);
-}
-
-#define FAIL(test) \
- do { \
- if (test) { \
- printf("FAIL (%s)\n", #test); \
- return -1; \
- } \
- } while (0)
-
-#define SUCCEED \
- do { printf("SUCCEED\n"); return 0; } while (0)
-
-/*
- * Test 1 - F_GETLK on unlocked region
- *
- * If no lock is found that would prevent this lock from being
- * created, the structure is left unchanged by this function call
- * except for the lock type which is set to F_UNLCK.
- */
-static int
-test1(int fd, __unused int argc, const __unused char **argv)
-{
- struct flock fl1, fl2;
-
- memset(&fl1, 1, sizeof(fl1));
- fl1.l_type = F_WRLCK;
- fl1.l_whence = SEEK_SET;
- fl2 = fl1;
-
- if (fcntl(fd, F_GETLK, &fl1) < 0)
- err(1, "F_GETLK");
-
- printf("1 - F_GETLK on unlocked region: ");
- FAIL(fl1.l_start != fl2.l_start);
- FAIL(fl1.l_len != fl2.l_len);
- FAIL(fl1.l_pid != fl2.l_pid);
- FAIL(fl1.l_type != F_UNLCK);
- FAIL(fl1.l_whence != fl2.l_whence);
-#ifdef HAVE_SYSID
- FAIL(fl1.l_sysid != fl2.l_sysid);
-#endif
-
- SUCCEED;
-}
-
-/*
- * Test 2 - F_SETLK on locked region
- *
- * If a shared or exclusive lock cannot be set, fcntl returns
- * immediately with EACCES or EAGAIN.
- */
-static int
-test2(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should return -1 with errno set to either EACCES or
- * EAGAIN.
- */
- printf("2 - F_SETLK on locked region: ");
- res = fcntl(fd, F_SETLK, &fl);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
- FAIL(res == 0);
- FAIL(errno != EACCES && errno != EAGAIN);
-
- SUCCEED;
-}
-
-/*
- * Test 3 - F_SETLKW on locked region
- *
- * If a shared or exclusive lock is blocked by other locks, the
- * process waits until the request can be satisfied.
- *
- * XXX this test hangs on FreeBSD NFS filesystems due to limitations
- * in FreeBSD's client (and server) lockd implementation.
- */
-static int
-test3(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- printf("3 - F_SETLKW on locked region: ");
-
- alarm(1);
-
- res = fcntl(fd, F_SETLKW, &fl);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
- FAIL(res == 0);
- FAIL(errno != EINTR);
-
- SUCCEED;
-}
-
-/*
- * Test 4 - F_GETLK on locked region
- *
- * Get the first lock that blocks the lock.
- */
-static int
-test4(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 99;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should return a lock structure reflecting the lock we
- * made in the child process.
- */
- if (fcntl(fd, F_GETLK, &fl) < 0)
- err(1, "F_GETLK");
-
- printf("4 - F_GETLK on locked region: ");
- FAIL(fl.l_start != 0);
- FAIL(fl.l_len != 99);
- FAIL(fl.l_type != F_WRLCK);
- FAIL(fl.l_pid != pid);
-#ifdef HAVE_SYSID
- FAIL(fl.l_sysid != 0);
-#endif
-
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
-
- SUCCEED;
-}
-
-/*
- * Test 5 - F_SETLKW simple deadlock
- *
- * If a blocking shared lock request would cause a deadlock (i.e. the
- * lock request is blocked by a process which is itself blocked on a
- * lock currently owned by the process making the new request),
- * EDEADLK is returned.
- */
-static int
-test5(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. Because our test relies on the child process being
- * blocked on the parent's lock, we can't easily use a pipe to
- * synchronize so we just sleep in the parent to given the
- * child a chance to setup.
- *
- * To create the deadlock condition, we arrange for the parent
- * to lock the first byte of the file and the child to lock
- * the second byte. After locking the second byte, the child
- * will attempt to lock the first byte of the file, and
- * block. The parent will then attempt to lock the second byte
- * (owned by the child) which should cause deadlock.
- */
- int pid;
- struct flock fl;
- int res;
-
- /*
- * Lock the first byte in the parent.
- */
- fl.l_start = 0;
- fl.l_len = 1;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK 1 (parent)");
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * Lock the second byte in the child and then block on
- * the parent's lock.
- */
- fl.l_start = 1;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- fl.l_start = 0;
- if (fcntl(fd, F_SETLKW, &fl) < 0)
- err(1, "F_SETLKW (child)");
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- sleep(1);
-
- /*
- * fcntl should immediately return -1 with errno set to
- * EDEADLK. If the alarm fires, we failed to detect the
- * deadlock.
- */
- alarm(1);
- printf("5 - F_SETLKW simple deadlock: ");
-
- fl.l_start = 1;
- res = fcntl(fd, F_SETLKW, &fl);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
-
- FAIL(res == 0);
- FAIL(errno != EDEADLK);
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_UNLCK;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_UNLCK");
-
- /*
- * Cancel the alarm to avoid confusing later tests.
- */
- alarm(0);
-
- SUCCEED;
-}
-
-/*
- * Test 6 - F_SETLKW complex deadlock.
- *
- * This test involves three process, P, C1 and C2. We set things up so
- * that P locks byte zero, C1 locks byte 1 and C2 locks byte 2. We
- * also block C2 by attempting to lock byte zero. Lastly, P attempts
- * to lock a range including byte 1 and 2. This represents a deadlock
- * (due to C2's blocking attempt to lock byte zero).
- */
-static int
-test6(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * Because our test relies on the child process being blocked
- * on the parent's lock, we can't easily use a pipe to
- * synchronize so we just sleep in the parent to given the
- * children a chance to setup.
- */
- int pid1, pid2;
- struct flock fl;
- int res;
-
- /*
- * Lock the first byte in the parent.
- */
- fl.l_start = 0;
- fl.l_len = 1;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK 1 (parent)");
-
- pid1 = fork();
- if (pid1 < 0)
- err(1, "fork");
-
- if (pid1 == 0) {
- /*
- * C1
- * Lock the second byte in the child and then sleep
- */
- fl.l_start = 1;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child1)");
- pause();
- exit(0);
- }
-
- pid2 = fork();
- if (pid2 < 0)
- err(1, "fork");
-
- if (pid2 == 0) {
- /*
- * C2
- * Lock the third byte in the child and then block on
- * the parent's lock.
- */
- fl.l_start = 2;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child2)");
- fl.l_start = 0;
- if (fcntl(fd, F_SETLKW, &fl) < 0)
- err(1, "F_SETLKW (child2)");
- exit(0);
- }
-
- /*
- * Wait until the children have set their locks and then
- * perform the test.
- */
- sleep(1);
-
- /*
- * fcntl should immediately return -1 with errno set to
- * EDEADLK. If the alarm fires, we failed to detect the
- * deadlock.
- */
- alarm(1);
- printf("6 - F_SETLKW complex deadlock: ");
-
- fl.l_start = 1;
- fl.l_len = 2;
- res = fcntl(fd, F_SETLKW, &fl);
- kill(pid1, SIGTERM);
- safe_waitpid(pid1);
- kill(pid2, SIGTERM);
- safe_waitpid(pid2);
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_UNLCK;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_UNLCK");
-
- FAIL(res == 0);
- FAIL(errno != EDEADLK);
-
- /*
- * Cancel the alarm to avoid confusing later tests.
- */
- alarm(0);
-
- SUCCEED;
-}
-
-/*
- * Test 7 - F_SETLK shared lock on exclusive locked region
- *
- * If a shared or exclusive lock cannot be set, fcntl returns
- * immediately with EACCES or EAGAIN.
- */
-static int
-test7(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- printf("7 - F_SETLK shared lock on exclusive locked region: ");
-
- fl.l_type = F_RDLCK;
- res = fcntl(fd, F_SETLK, &fl);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
-
- FAIL(res == 0);
- FAIL(errno != EACCES && errno != EAGAIN);
-
- SUCCEED;
-}
-
-/*
- * Test 8 - F_SETLK shared lock on share locked region
- *
- * When a shared lock is set on a segment of a file, other processes
- * shall be able to set shared locks on that segment or a portion of
- * it.
- */
-static int
-test8(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_RDLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- printf("8 - F_SETLK shared lock on share locked region: ");
-
- fl.l_type = F_RDLCK;
- res = fcntl(fd, F_SETLK, &fl);
-
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_UNLCK;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_UNLCK");
-
- FAIL(res != 0);
-
- SUCCEED;
-}
-
-/*
- * Test 9 - F_SETLK exclusive lock on share locked region
- *
- * If a shared or exclusive lock cannot be set, fcntl returns
- * immediately with EACCES or EAGAIN.
- */
-static int
-test9(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_RDLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- printf("9 - F_SETLK exclusive lock on share locked region: ");
-
- fl.l_type = F_WRLCK;
- res = fcntl(fd, F_SETLK, &fl);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
-
- FAIL(res == 0);
- FAIL(errno != EACCES && errno != EAGAIN);
-
- SUCCEED;
-}
-
-/*
- * Test 10 - trying to set bogus pid or sysid values
- *
- * The l_pid and l_sysid fields are only used with F_GETLK to return
- * the process ID of the process holding a blocking lock and the
- * system ID of the system that owns that process
- */
-static int
-test10(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- fl.l_pid = 9999;
-#ifdef HAVE_SYSID
- fl.l_sysid = 9999;
-#endif
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- printf("10 - trying to set bogus pid or sysid values: ");
-
- if (fcntl(fd, F_GETLK, &fl) < 0)
- err(1, "F_GETLK");
-
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
-
- FAIL(fl.l_pid != pid);
-#ifdef HAVE_SYSID
- FAIL(fl.l_sysid != 0);
-#endif
-
- SUCCEED;
-}
-
-/*
- * Test 11 - remote locks
- *
- * XXX temporary interface which will be removed when the kernel lockd
- * is added.
- */
-static int
-test11(int fd, __unused int argc, const __unused char **argv)
-{
-#ifdef F_SETLK_REMOTE
- struct flock fl;
- int res;
-
- if (geteuid() != 0)
- return 0;
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- fl.l_pid = 9999;
- fl.l_sysid = 1001;
-
- printf("11 - remote locks: ");
-
- res = fcntl(fd, F_SETLK_REMOTE, &fl);
- FAIL(res != 0);
-
- fl.l_sysid = 1002;
- res = fcntl(fd, F_SETLK_REMOTE, &fl);
- FAIL(res == 0);
- FAIL(errno != EACCES && errno != EAGAIN);
-
- res = fcntl(fd, F_GETLK, &fl);
- FAIL(res != 0);
- FAIL(fl.l_pid != 9999);
- FAIL(fl.l_sysid != 1001);
-
- fl.l_type = F_UNLCK;
- fl.l_sysid = 1001;
- fl.l_start = 0;
- fl.l_len = 0;
- res = fcntl(fd, F_SETLK_REMOTE, &fl);
- FAIL(res != 0);
-
- fl.l_pid = 1234;
- fl.l_sysid = 1001;
- fl.l_start = 0;
- fl.l_len = 1;
- fl.l_whence = SEEK_SET;
- fl.l_type = F_RDLCK;
- res = fcntl(fd, F_SETLK_REMOTE, &fl);
- FAIL(res != 0);
-
- fl.l_sysid = 1002;
- res = fcntl(fd, F_SETLK_REMOTE, &fl);
- FAIL(res != 0);
-
- fl.l_type = F_UNLCKSYS;
- fl.l_sysid = 1001;
- res = fcntl(fd, F_SETLK_REMOTE, &fl);
- FAIL(res != 0);
-
- fl.l_type = F_WRLCK;
- res = fcntl(fd, F_GETLK, &fl);
- FAIL(res != 0);
- FAIL(fl.l_pid != 1234);
- FAIL(fl.l_sysid != 1002);
-
- fl.l_type = F_UNLCKSYS;
- fl.l_sysid = 1002;
- res = fcntl(fd, F_SETLK_REMOTE, &fl);
- FAIL(res != 0);
-
- SUCCEED;
-#else
- return 0;
-#endif
-}
-
-/*
- * Test 12 - F_SETLKW on locked region which is then unlocked
- *
- * If a shared or exclusive lock is blocked by other locks, the
- * process waits until the request can be satisfied.
- */
-static int
-test12(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
-
- sleep(1);
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- printf("12 - F_SETLKW on locked region which is then unlocked: ");
-
- //alarm(1);
-
- res = fcntl(fd, F_SETLKW, &fl);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
- FAIL(res != 0);
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_UNLCK;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_UNLCK");
-
- SUCCEED;
-}
-
-/*
- * Test 13 - F_SETLKW on locked region, race with owner
- *
- * If a shared or exclusive lock is blocked by other locks, the
- * process waits until the request can be satisfied.
- */
-static int
-test13(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int i;
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
- struct itimerval itv;
-
- printf("13 - F_SETLKW on locked region, race with owner: ");
- fflush(stdout);
-
- for (i = 0; i < 100; i++) {
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
-
- usleep(1);
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- while (read(pfd[0], &ch, 1) != 1) {
- if (errno == EINTR)
- continue;
- err(1, "reading from pipe (child)");
- }
-
- /*
- * fcntl should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- itv.it_interval.tv_sec = 0;
- itv.it_interval.tv_usec = 0;
- itv.it_value.tv_sec = 0;
- itv.it_value.tv_usec = 2;
- setitimer(ITIMER_REAL, &itv, NULL);
-
- res = fcntl(fd, F_SETLKW, &fl);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
- FAIL(!(res == 0 || (res == -1 && errno == EINTR)));
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_UNLCK;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "F_UNLCK");
- }
- SUCCEED;
-}
-
-/*
- * Test 14 - soak test
- */
-static int
-test14(int fd, int argc, const char **argv)
-{
-#define CHILD_COUNT 20
- /*
- * We create a set of child processes and let each one run
- * through a random sequence of locks and unlocks.
- */
- int i, j, id, id_base;
- int pids[CHILD_COUNT], pid;
- char buf[128];
- char tbuf[128];
- int map[128];
- char outbuf[512];
- struct flock fl;
- struct itimerval itv;
- int status;
-
- id_base = 0;
- if (argc >= 2)
- id_base = strtol(argv[1], NULL, 0);
-
- printf("14 - soak test: ");
- fflush(stdout);
-
- for (i = 0; i < 128; i++)
- map[i] = F_UNLCK;
-
- for (i = 0; i < CHILD_COUNT; i++) {
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
- if (pid) {
- /*
- * Parent - record the pid and continue.
- */
- pids[i] = pid;
- continue;
- }
-
- /*
- * Child - do some work and exit.
- */
- id = id_base + i;
- srandom(getpid());
-
- for (j = 0; j < 50; j++) {
- int start, end, len;
- int set, wrlock;
-
- do {
- start = random() & 127;
- end = random() & 127;
- } while (end <= start);
-
- set = random() & 1;
- wrlock = random() & 1;
-
- len = end - start;
- fl.l_start = start;
- fl.l_len = len;
- fl.l_whence = SEEK_SET;
- if (set)
- fl.l_type = wrlock ? F_WRLCK : F_RDLCK;
- else
- fl.l_type = F_UNLCK;
-
- itv.it_interval.tv_sec = 0;
- itv.it_interval.tv_usec = 0;
- itv.it_value.tv_sec = 0;
- itv.it_value.tv_usec = 3000;
- setitimer(ITIMER_REAL, &itv, NULL);
-
- if (fcntl(fd, F_SETLKW, &fl) < 0) {
- if (errno == EDEADLK || errno == EINTR) {
- if (verbose) {
- snprintf(outbuf, sizeof(outbuf),
- "%d[%d]: %s [%d .. %d] %s\n",
- id, j,
- set ? (wrlock ? "write lock"
- : "read lock")
- : "unlock", start, end,
- errno == EDEADLK
- ? "deadlock"
- : "interrupted");
- write(1, outbuf,
- strlen(outbuf));
- }
- continue;
- } else {
- perror("fcntl");
- }
- }
-
- itv.it_interval.tv_sec = 0;
- itv.it_interval.tv_usec = 0;
- itv.it_value.tv_sec = 0;
- itv.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &itv, NULL);
-
- if (verbose) {
- snprintf(outbuf, sizeof(outbuf),
- "%d[%d]: %s [%d .. %d] succeeded\n",
- id, j,
- set ? (wrlock ? "write lock" : "read lock")
- : "unlock", start, end);
- write(1, outbuf, strlen(outbuf));
- }
-
- if (set) {
- if (wrlock) {
- /*
- * We got a write lock - write
- * our ID to each byte that we
- * managed to claim.
- */
- for (i = start; i < end; i++)
- map[i] = F_WRLCK;
- memset(&buf[start], id, len);
- if (pwrite(fd, &buf[start], len,
- start) != len) {
- printf("%d: short write\n", id);
- exit(1);
- }
- } else {
- /*
- * We got a read lock - read
- * the bytes which we claimed
- * so that we can check that
- * they don't change
- * unexpectedly.
- */
- for (i = start; i < end; i++)
- map[i] = F_RDLCK;
- if (pread(fd, &buf[start], len,
- start) != len) {
- printf("%d: short read\n", id);
- exit(1);
- }
- }
- } else {
- for (i = start; i < end; i++)
- map[i] = F_UNLCK;
- }
-
- usleep(1000);
-
- /*
- * Read back the whole region so that we can
- * check that all the bytes we have some kind
- * of claim to have the correct value.
- */
- if (pread(fd, tbuf, sizeof(tbuf), 0) != sizeof(tbuf)) {
- printf("%d: short read\n", id);
- exit(1);
- }
-
- for (i = 0; i < 128; i++) {
- if (map[i] != F_UNLCK && buf[i] != tbuf[i]) {
- snprintf(outbuf, sizeof(outbuf),
- "%d: byte %d expected %d, "
- "got %d\n", id, i, buf[i], tbuf[i]);
- write(1, outbuf, strlen(outbuf));
- exit(1);
- }
- }
- }
- if (verbose)
- printf("%d[%d]: done\n", id, j);
-
- exit(0);
- }
-
- status = 0;
- for (i = 0; i < CHILD_COUNT; i++) {
- status += safe_waitpid(pids[i]);
- }
- if (status)
- FAIL(status != 0);
-
- SUCCEED;
-}
-
-/*
- * Test 15 - flock(2) semantcs
- *
- * When a lock holder has a shared lock and attempts to upgrade that
- * shared lock to exclusive, it must drop the shared lock before
- * blocking on the exclusive lock.
- *
- * To test this, we first arrange for two shared locks on the file,
- * and then attempt to upgrade one of them to exclusive. This should
- * drop one of the shared locks and block. We interrupt the blocking
- * lock request and examine the lock state of the file after dropping
- * the other shared lock - there should be no active locks at this
- * point.
- */
-static int
-test15(int fd, __unused int argc, const __unused char **argv)
-{
-#ifdef LOCK_EX
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- *
- * Since we only have one file descriptors and lock ownership
- * for flock(2) goes with the file descriptor, we use fcntl to
- * set the child's shared lock.
- */
- int pid;
- int pfd[2];
- struct flock fl;
- char ch;
- int res;
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a shared lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_RDLCK;
- fl.l_whence = SEEK_SET;
- if (fcntl(fd, F_SETLK, &fl) < 0)
- err(1, "fcntl(F_SETLK) (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- (void)dup(fd);
- if (flock(fd, LOCK_SH) < 0)
- err(1, "flock shared");
-
- /*
- * flock should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- printf("15 - flock(2) semantics: ");
-
- alarm(1);
- flock(fd, LOCK_EX);
-
- /*
- * Kill the child to force it to drop its locks.
- */
- kill(pid, SIGTERM);
- safe_waitpid(pid);
-
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- res = fcntl(fd, F_GETLK, &fl);
-
- close(pfd[0]);
- close(pfd[1]);
- FAIL(res != 0);
- FAIL(fl.l_type != F_UNLCK);
-
- SUCCEED;
-#else
- return 0;
-#endif
-}
-
-struct test_ctx {
- struct flock tc_fl;
- int tc_fd;
-};
-
-static void *
-test16_func(void *tc_in)
-{
- uintptr_t error;
- struct test_ctx *tc = tc_in;
-
- error = fcntl(tc->tc_fd, F_SETLKW, &tc->tc_fl);
-
- pthread_exit((void *)error);
-}
-
-#define THREADS 10
-
-/*
- * Test 16 - F_SETLKW from two threads
- *
- * If two threads within a process are blocked on a lock and the lock
- * is granted, make sure things are sane.
- */
-static int
-test16(int fd, __unused int argc, const __unused char **argv)
-{
- /*
- * We create a child process to hold the lock which we will
- * test. We use a pipe to communicate with the child.
- */
- int pid;
- int pfd[2];
- struct test_ctx tc = { .tc_fd = fd };
- char ch;
- int i;
- int error;
- pthread_t thr[THREADS];
-
- if (pipe(pfd) < 0)
- err(1, "pipe");
-
- tc.tc_fl.l_start = 0;
- tc.tc_fl.l_len = 0;
- tc.tc_fl.l_type = F_WRLCK;
- tc.tc_fl.l_whence = SEEK_SET;
-
- pid = fork();
- if (pid < 0)
- err(1, "fork");
-
- if (pid == 0) {
- /*
- * We are the child. We set a write lock and then
- * write one byte back to the parent to tell it. The
- * parent will kill us when its done.
- */
- if (fcntl(fd, F_SETLK, &tc.tc_fl) < 0)
- err(1, "F_SETLK (child)");
- if (write(pfd[1], "a", 1) < 0)
- err(1, "writing to pipe (child)");
- pause();
- exit(0);
- }
-
- /*
- * Wait until the child has set its lock and then perform the
- * test.
- */
- if (read(pfd[0], &ch, 1) != 1)
- err(1, "reading from pipe (child)");
-
- /*
- * fcntl should wait until the alarm and then return -1 with
- * errno set to EINTR.
- */
- printf("16 - F_SETLKW on locked region by two threads: ");
-
- for (i = 0; i < THREADS; i++) {
- error = pthread_create(&thr[i], NULL, test16_func, &tc);
- if (error)
- err(1, "pthread_create");
- }
-
- /*
- * Sleep, then kill the child. This makes me a little sad, but it's
- * tricky to tell whether the threads are all really blocked by this
- * point.
- */
- sleep(1);
- kill(pid, SIGTERM);
- safe_waitpid(pid);
- close(pfd[0]);
- close(pfd[1]);
-
- for (i = 0; i < THREADS; i++) {
- void *res;
- error = pthread_join(thr[i], &res);
- if (error)
- err(1, "pthread_join");
- FAIL((uintptr_t)res != 0);
- }
-
- SUCCEED;
-}
-
-struct test {
- int (*testfn)(int, int, const char **); /* function to perform the test */
- int num; /* test number */
- int intr; /* non-zero if the test interrupts a lock */
-};
-
-struct test tests[] = {
- { test1, 1, 0 },
- { test2, 2, 0 },
- { test3, 3, 1 },
- { test4, 4, 0 },
- { test5, 5, 1 },
- { test6, 6, 1 },
- { test7, 7, 0 },
- { test8, 8, 0 },
- { test9, 9, 0 },
- { test10, 10, 0 },
- { test11, 11, 1 },
- { test12, 12, 0 },
- { test13, 13, 1 },
- { test14, 14, 0 },
- { test15, 15, 1 },
- { test16, 16, 1 },
-};
-int test_count = sizeof(tests) / sizeof(tests[0]);
-
-int
-main(int argc, const char *argv[])
-{
- int testnum;
- int fd;
- int nointr;
- int i;
- struct sigaction sa;
- int test_argc;
- const char **test_argv;
-
- if (argc < 2) {
- errx(1, "usage: flock <directory> [test number] ...");
- }
-
- fd = make_file(argv[1], 1024);
- if (argc >= 3) {
- testnum = strtol(argv[2], NULL, 0);
- test_argc = argc - 2;
- test_argv = argv + 2;
- } else {
- testnum = 0;
- test_argc = 0;
- test_argv = 0;
- }
-
- sa.sa_handler = ignore_alarm;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- sigaction(SIGALRM, &sa, 0);
-
- nointr = 0;
-#if defined(__FreeBSD__) && __FreeBSD_version < 800040
- {
- /*
- * FreeBSD with userland NLM can't interrupt a blocked
- * lock request on an NFS mounted filesystem.
- */
- struct statfs st;
- fstatfs(fd, &st);
- nointr = !strcmp(st.f_fstypename, "nfs");
- }
-#endif
-
- for (i = 0; i < test_count; i++) {
- if (tests[i].intr && nointr)
- continue;
- if (!testnum || tests[i].num == testnum)
- tests[i].testfn(fd, test_argc, test_argv);
- }
-
- return 0;
-}
diff --git a/tools/regression/file/ftruncate/Makefile b/tools/regression/file/ftruncate/Makefile
deleted file mode 100644
index 40b753e..0000000
--- a/tools/regression/file/ftruncate/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-PROG= ftruncate
-MAN=
-WARNS?= 2
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/file/ftruncate/ftruncate.c b/tools/regression/file/ftruncate/ftruncate.c
deleted file mode 100644
index aebcdcd..0000000
--- a/tools/regression/file/ftruncate/ftruncate.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * Copyright (c) 2006 Robert N. M. Watson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Very simple regression test.
- *
- * Future tests that might be of interest:
- *
- * - Make sure we get EISDIR on a directory.
- */
-
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <stdio.h>
-#include <unistd.h>
-
-/*
- * Select various potentially interesting lengths at and around power of 2
- * edges.
- */
-static off_t lengths[] = {0, 1, 2, 3, 4, 127, 128, 129, 511, 512, 513, 1023,
- 1024, 1025, 2047, 2048, 2049, 4095, 4096, 4097, 8191, 8192, 8193, 16383,
- 16384, 16385};
-static int lengths_count = sizeof(lengths) / sizeof(off_t);
-
-int
-main(int argc, char *argv[])
-{
- int error, fd, fds[2], i, read_only_fd;
- char path[PATH_MAX];
- struct stat sb;
- size_t size;
- off_t len;
- char ch;
-
- /*
- * Tests using a writable temporary file: grow and then shrink a file
- * using ftruncate and various lengths. Make sure that a negative
- * file length is rejected. Make sure that when we grow the file,
- * bytes now in the range of the file size return 0.
- *
- * Save a read-only reference to the file to use later for read-only
- * descriptor tests.
- */
- snprintf(path, PATH_MAX, "/tmp/ftruncate.XXXXXXXXXXXXX");
- fd = mkstemp(path);
- if (fd < 0)
- err(-1, "makestemp");
- read_only_fd = open(path, O_RDONLY);
- if (read_only_fd < 0) {
- error = errno;
- (void)unlink(path);
- errno = error;
- err(-1, "open(%s, O_RDONLY)", path);
- }
- (void)unlink(path);
-
- if (ftruncate(fd, -1) == 0)
- errx(-1, "ftruncate(fd, -1) succeeded");
- if (errno != EINVAL)
- err(-1, "ftruncate(fd, -1) returned wrong error");
-
- for (i = 0; i < lengths_count; i++) {
- len = lengths[i];
- if (ftruncate(fd, len) < 0)
- err(-1, "ftruncate(%llu) up", len);
- if (fstat(fd, &sb) < 0)
- err(-1, "stat");
- if (sb.st_size != len)
- errx(-1, "fstat(%llu) returned len %llu up", len,
- sb.st_size);
- if (len != 0) {
- size = pread(fd, &ch, sizeof(ch), len - 1);
- if (size < 0)
- err(-1, "pread on len %llu up", len);
- if (size != sizeof(ch))
- errx(-1, "pread len %llu size %jd up",
- len, (intmax_t)size);
- if (ch != 0)
- errx(-1,
- "pread length %llu size %jd ch %d up",
- len, (intmax_t)size, ch);
- }
- }
-
- for (i = lengths_count - 1; i >= 0; i--) {
- len = lengths[i];
- if (ftruncate(fd, len) < 0)
- err(-1, "ftruncate(%llu) down", len);
- if (fstat(fd, &sb) < 0)
- err(-1, "stat");
- if (sb.st_size != len)
- errx(-1, "fstat(%llu) returned %llu down", len,
- sb.st_size);
- }
- close(fd);
-
- /*
- * Make sure that a read-only descriptor can't be truncated.
- */
- if (ftruncate(read_only_fd, 0) == 0)
- errx(-1, "ftruncate(read_only_fd) succeeded");
- if (errno != EINVAL)
- err(-1, "ftruncate(read_only_fd) returned wrong error");
- close(read_only_fd);
-
- /*
- * Make sure that ftruncate on sockets doesn't work.
- */
- fd = socket(PF_UNIX, SOCK_STREAM, 0);
- if (fd < 0)
- err(-1, "socket(PF_UNIX, SOCK_STREAM, 0)");
- if (ftruncate(fd, 0) == 0)
- errx(-1, "ftruncate(socket) succeeded");
- if (errno != EINVAL)
- err(-1, "ftruncate(socket) returned wrong error");
- close(fd);
-
- /*
- * Make sure that ftruncate on pipes doesn't work.
- */
- if (pipe(fds) < 0)
- err(-1, "pipe");
- if (ftruncate(fds[0], 0) == 0)
- errx(-1, "ftruncate(pipe) succeeded");
- if (errno != EINVAL)
- err(-1, "ftruncate(pipe) returned wrong error");
- close(fds[0]);
- close(fds[1]);
-
- /*
- * Make sure that ftruncate on kqueues doesn't work.
- */
- fd = kqueue();
- if (fd < 0)
- err(-1, "kqueue");
- if (ftruncate(fds[0], 0) == 0)
- errx(-1, "ftruncate(kqueue) succeeded");
- if (errno != EINVAL)
- err(-1, "ftruncate(kqueue) returned wrong error");
- close(fd);
-
- return (0);
-}
diff --git a/tools/regression/file/newfileops_on_fork/Makefile b/tools/regression/file/newfileops_on_fork/Makefile
deleted file mode 100644
index be0c5fe..0000000
--- a/tools/regression/file/newfileops_on_fork/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-PROG= newfileops_on_fork
-MAN=
-WARNS?= 6
-LDFLAGS= -lpthread
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c b/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c
deleted file mode 100644
index 8713a82..0000000
--- a/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*-
- * Copyright (c) 2009 Robert N. M. Watson
- * All rights reserved.
- *
- * This software was developed at the University of Cambridge Computer
- * Laboratory with support from a grant from Google, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * When a multi-threaded application calls fork(2) from one thread while
- * another thread is blocked in accept(2), we prefer that the file descriptor
- * to be returned by accept(2) not appear in the child process. Test this by
- * creating a thread blocked in accept(2), then forking a child and seeing if
- * the fd it would have returned is defined in the child or not.
- */
-
-#include <sys/socket.h>
-#include <sys/wait.h>
-
-#include <netinet/in.h>
-
-#include <err.h>
-#include <errno.h>
-#include <pthread.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define PORT 9000
-
-static int listen_fd;
-
-static void *
-do_accept(__unused void *arg)
-{
- int accept_fd;
-
- accept_fd = accept(listen_fd, NULL, NULL);
- if (accept_fd < 0)
- err(-1, "accept");
-
- return (NULL);
-}
-
-static void
-do_fork(void)
-{
- int pid;
-
- pid = fork();
- if (pid < 0)
- err(-1, "fork");
- if (pid > 0) {
- waitpid(pid, NULL, 0);
- exit(0);
- }
-
- /*
- * We will call ftruncate(2) on the next available file descriptor,
- * listen_fd+1, and get back EBADF if it's not a valid descriptor,
- * and EINVAL if it is. This (currently) works fine in practice.
- */
- if (ftruncate(listen_fd + 1, 0 < 0)) {
- if (errno == EBADF)
- exit(0);
- else if (errno == EINVAL)
- errx(-1, "file descriptor still open in child");
- else
- err(-1, "unexpected error");
- } else
- errx(-1, "ftruncate succeeded");
-}
-
-int
-main(__unused int argc, __unused char *argv[])
-{
- struct sockaddr_in sin;
- pthread_t accept_thread;
-
- listen_fd = socket(PF_INET, SOCK_STREAM, 0);
- if (listen_fd < 0)
- err(-1, "socket");
- bzero(&sin, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_len = sizeof(sin);
- sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- sin.sin_port = htons(PORT);
- if (bind(listen_fd, (struct sockaddr *)&sin, sizeof(sin)) < 0)
- err(-1, "bind");
- if (listen(listen_fd, -1) <0)
- err(-1, "listen");
- if (pthread_create(&accept_thread, NULL, do_accept, NULL) != 0)
- err(-1, "pthread_create");
- sleep(1); /* Easier than using a CV. */;
- do_fork();
- exit(0);
-}
diff --git a/tools/regression/gaithrstress/gaithrstress.c b/tools/regression/gaithrstress/gaithrstress.c
index c76f94f..2506625 100644
--- a/tools/regression/gaithrstress/gaithrstress.c
+++ b/tools/regression/gaithrstress/gaithrstress.c
@@ -230,7 +230,7 @@ usage:
err(1, "reading word file %s", wordfile);
if (nrandwords < 1)
errx(1, "word file %s did not have >0 words", wordfile);
- printf("Read %u random words from %s.\n", nrandwords, wordfile);
+ printf("Read %zu random words from %s.\n", nrandwords, wordfile);
workers = calloc(nworkers, sizeof(*workers));
if (workers == NULL)
err(1, "allocating workers");
@@ -242,8 +242,8 @@ usage:
for (i = 0; i < nworkers; i++) {
if (pthread_create(&workers[i].w_thread, NULL, work,
&workers[i]) != 0)
- err(1, "creating worker %u", i);
- printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", ");
+ err(1, "creating worker %zu", i);
+ printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", ");
fflush(stdout);
}
@@ -255,7 +255,7 @@ usage:
fflush(stdout);
for (i = 0; i < nworkers; i++) {
pthread_join(workers[i].w_thread, NULL);
- printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", ");
+ printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", ");
fflush(stdout);
}
@@ -264,7 +264,7 @@ usage:
printf("%-10s%-20s%-20s%-29s\n", "------", "--------------",
"----------", "---------------------------");
for (i = 0; i < nworkers; i++) {
- printf("%-10u%-20ju%-20ju%u:%s%.2f\n", i,
+ printf("%-10zu%-20ju%-20ju%ld:%s%.2f\n", i,
workers[i].w_lookup_success, workers[i].w_lookup_failure,
workers[i].w_max_lookup_time.tv_sec / 60,
workers[i].w_max_lookup_time.tv_sec % 60 < 10 ? "0" : "",
diff --git a/tools/regression/kqueue/Makefile b/tools/regression/kqueue/Makefile
deleted file mode 100644
index 12b7527..0000000
--- a/tools/regression/kqueue/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# $FreeBSD$
-#
-# svn://mark.heily.com/libkqueue/trunk/test
-# Last update: r114
-#
-# libkqueue and test suite by Mark Heily <mark@heily.com>
-#
-
-PROG=kqtest
-SRCS= \
- main.c \
- read.c \
- timer.c \
- vnode.c \
- proc.c \
- signal.c \
- user.c
-MAN=
-WARNS?= 2
-
-.include "bsd.prog.mk"
diff --git a/tools/regression/kqueue/common.h b/tools/regression/kqueue/common.h
deleted file mode 100644
index aada778..0000000
--- a/tools/regression/kqueue/common.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#ifndef _COMMON_H
-#define _COMMON_H
-
-
-#if HAVE_ERR_H
-# include <err.h>
-#else
-# define err(rc,msg,...) do { perror(msg); exit(rc); } while (0)
-# define errx(rc,msg,...) do { puts(msg); exit(rc); } while (0)
-#endif
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdint.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <sys/event.h>
-
-#include "config.h"
-
-extern char *cur_test_id;
-int vnode_fd;
-
-extern const char * kevent_to_str(struct kevent *);
-struct kevent * kevent_get(int);
-
-
-void kevent_cmp(struct kevent *, struct kevent *);
-
-void
-kevent_add(int kqfd, struct kevent *kev,
- uintptr_t ident,
- short filter,
- u_short flags,
- u_int fflags,
- intptr_t data,
- void *udata);
-
-/* DEPRECATED: */
-#define KEV_CMP(kev,_ident,_filter,_flags) do { \
- if (kev.ident != (_ident) || \
- kev.filter != (_filter) || \
- kev.flags != (_flags)) \
- err(1, "kevent mismatch: got [%d,%d,%d] but expecting [%d,%d,%d]", \
- (int)_ident, (int)_filter, (int)_flags,\
- (int)kev.ident, kev.filter, kev.flags);\
-} while (0);
-
-/* Checks if any events are pending, which is an error. */
-extern void test_no_kevents(void);
-
-extern void test_begin(const char *);
-extern void success(void);
-
-#endif /* _COMMON_H */
diff --git a/tools/regression/kqueue/config.h b/tools/regression/kqueue/config.h
deleted file mode 100644
index a204092..0000000
--- a/tools/regression/kqueue/config.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* $FreeBSD$ */
-
-#define HAVE_ERR_H 1
-#define HAVE_SYS_EVENT_H 1
-#define HAVE_EV_DISPATCH 1
-#define HAVE_EV_RECEIPT 1
-#undef HAVE_NOTE_TRUNCATE
-#define HAVE_EVFILT_TIMER 1
-#define HAVE_EVFILT_USER 1
-#define PROGRAM "libkqueue-test"
-#define VERSION "0.1"
-#define TARGET "freebsd"
-#define CFLAGS "-g -O0 -Wall -Werror"
diff --git a/tools/regression/kqueue/main.c b/tools/regression/kqueue/main.c
deleted file mode 100644
index f76c4e2..0000000
--- a/tools/regression/kqueue/main.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#include <sys/types.h>
-
-#include "config.h"
-#include "common.h"
-
-int testnum = 1;
-char *cur_test_id = NULL;
-int kqfd;
-
-extern void test_evfilt_read();
-extern void test_evfilt_signal();
-extern void test_evfilt_vnode();
-extern void test_evfilt_timer();
-extern void test_evfilt_proc();
-#if HAVE_EVFILT_USER
-extern void test_evfilt_user();
-#endif
-
-/* Checks if any events are pending, which is an error. */
-void
-test_no_kevents(void)
-{
- int nfds;
- struct timespec timeo;
- struct kevent kev;
-
- puts("confirming that there are no events pending");
- memset(&timeo, 0, sizeof(timeo));
- nfds = kevent(kqfd, NULL, 0, &kev, 1, &timeo);
- if (nfds != 0) {
- puts("\nUnexpected event:");
- puts(kevent_to_str(&kev));
- errx(1, "%d event(s) pending, but none expected:", nfds);
- }
-}
-
-/* Retrieve a single kevent */
-struct kevent *
-kevent_get(int kqfd)
-{
- int nfds;
- struct kevent *kev;
-
- if ((kev = calloc(1, sizeof(*kev))) == NULL)
- err(1, "out of memory");
-
- nfds = kevent(kqfd, NULL, 0, kev, 1, NULL);
- if (nfds < 1)
- err(1, "kevent(2)");
-
- return (kev);
-}
-
-char *
-kevent_fflags_dump(struct kevent *kev)
-{
- char *buf;
-
-#define KEVFFL_DUMP(attrib) \
- if (kev->fflags & attrib) \
- strncat(buf, #attrib" ", 64);
-
- if ((buf = calloc(1, 1024)) == NULL)
- abort();
-
- /* Not every filter has meaningful fflags */
- if (kev->filter != EVFILT_VNODE) {
- snprintf(buf, 1024, "fflags = %d", kev->fflags);
- return (buf);
- }
-
- snprintf(buf, 1024, "fflags = %d (", kev->fflags);
- KEVFFL_DUMP(NOTE_DELETE);
- KEVFFL_DUMP(NOTE_WRITE);
- KEVFFL_DUMP(NOTE_EXTEND);
-#if HAVE_NOTE_TRUNCATE
- KEVFFL_DUMP(NOTE_TRUNCATE);
-#endif
- KEVFFL_DUMP(NOTE_ATTRIB);
- KEVFFL_DUMP(NOTE_LINK);
- KEVFFL_DUMP(NOTE_RENAME);
-#if HAVE_NOTE_REVOKE
- KEVFFL_DUMP(NOTE_REVOKE);
-#endif
- buf[strlen(buf) - 1] = ')';
-
- return (buf);
-}
-
-char *
-kevent_flags_dump(struct kevent *kev)
-{
- char *buf;
-
-#define KEVFL_DUMP(attrib) \
- if (kev->flags & attrib) \
- strncat(buf, #attrib" ", 64);
-
- if ((buf = calloc(1, 1024)) == NULL)
- abort();
-
- snprintf(buf, 1024, "flags = %d (", kev->flags);
- KEVFL_DUMP(EV_ADD);
- KEVFL_DUMP(EV_ENABLE);
- KEVFL_DUMP(EV_DISABLE);
- KEVFL_DUMP(EV_DELETE);
- KEVFL_DUMP(EV_ONESHOT);
- KEVFL_DUMP(EV_CLEAR);
- KEVFL_DUMP(EV_EOF);
- KEVFL_DUMP(EV_ERROR);
-#if HAVE_EV_DISPATCH
- KEVFL_DUMP(EV_DISPATCH);
-#endif
-#if HAVE_EV_RECEIPT
- KEVFL_DUMP(EV_RECEIPT);
-#endif
- buf[strlen(buf) - 1] = ')';
-
- return (buf);
-}
-
-/* Copied from ../kevent.c kevent_dump() and improved */
-const char *
-kevent_to_str(struct kevent *kev)
-{
- char buf[512];
-
- snprintf(&buf[0], sizeof(buf),
- "[ident=%d, filter=%d, %s, %s, data=%d, udata=%p]",
- (u_int) kev->ident,
- kev->filter,
- kevent_flags_dump(kev),
- kevent_fflags_dump(kev),
- (int) kev->data,
- kev->udata);
-
- return (strdup(buf));
-}
-
-void
-kevent_add(int kqfd, struct kevent *kev,
- uintptr_t ident,
- short filter,
- u_short flags,
- u_int fflags,
- intptr_t data,
- void *udata)
-{
- EV_SET(kev, ident, filter, flags, fflags, data, NULL);
- if (kevent(kqfd, kev, 1, NULL, 0, NULL) < 0) {
- printf("Unable to add the following kevent:\n%s\n",
- kevent_to_str(kev));
- err(1, "kevent(): %s", strerror(errno));
- }
-}
-
-void
-kevent_cmp(struct kevent *k1, struct kevent *k2)
-{
-/* XXX-
- Workaround for inconsistent implementation of kevent(2)
- */
-#ifdef __FreeBSD__
- if (k1->flags & EV_ADD)
- k2->flags |= EV_ADD;
-#endif
- if (memcmp(k1, k2, sizeof(*k1)) != 0) {
- printf("kevent_cmp: mismatch:\n %s !=\n %s\n",
- kevent_to_str(k1), kevent_to_str(k2));
- abort();
- }
-}
-
-void
-test_begin(const char *func)
-{
- if (cur_test_id)
- free(cur_test_id);
- cur_test_id = strdup(func);
- if (!cur_test_id)
- err(1, "strdup failed");
-
- printf("\n\nTest %d: %s\n", testnum++, func);
-}
-
-void
-success(void)
-{
- printf("%-70s %s\n", cur_test_id, "passed");
- free(cur_test_id);
- cur_test_id = NULL;
-}
-
-void
-test_kqueue(void)
-{
- test_begin("kqueue()");
- if ((kqfd = kqueue()) < 0)
- err(1, "kqueue()");
- test_no_kevents();
- success();
-}
-
-void
-test_kqueue_close(void)
-{
- test_begin("close(kq)");
- if (close(kqfd) < 0)
- err(1, "close()");
- success();
-}
-
-int
-main(int argc, char **argv)
-{
- int test_proc = 1;
- int test_socket = 1;
- int test_signal = 1;
- int test_vnode = 1;
- int test_timer = 1;
-#ifdef __FreeBSD__
- int test_user = 1;
-#else
- /* XXX-FIXME temporary */
- int test_user = 0;
-#endif
-
- while (argc) {
- if (strcmp(argv[0], "--no-proc") == 0)
- test_proc = 0;
- if (strcmp(argv[0], "--no-socket") == 0)
- test_socket = 0;
- if (strcmp(argv[0], "--no-timer") == 0)
- test_timer = 0;
- if (strcmp(argv[0], "--no-signal") == 0)
- test_signal = 0;
- if (strcmp(argv[0], "--no-vnode") == 0)
- test_vnode = 0;
- if (strcmp(argv[0], "--no-user") == 0)
- test_user = 0;
- argv++;
- argc--;
- }
-
- test_kqueue();
- test_kqueue_close();
-
- if (test_socket)
- test_evfilt_read();
- if (test_signal)
- test_evfilt_signal();
- if (test_vnode)
- test_evfilt_vnode();
-#if HAVE_EVFILT_USER
- if (test_user)
- test_evfilt_user();
-#endif
- if (test_timer)
- test_evfilt_timer();
- if (test_proc)
- test_evfilt_proc();
-
- printf("\n---\n"
- "+OK All %d tests completed.\n", testnum - 1);
- return (0);
-}
diff --git a/tools/regression/kqueue/proc.c b/tools/regression/kqueue/proc.c
deleted file mode 100644
index 6288ee6..0000000
--- a/tools/regression/kqueue/proc.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#include <sys/stat.h>
-
-#include <err.h>
-
-#include "config.h"
-#include "common.h"
-
-static int sigusr1_caught = 0;
-
-int kqfd;
-
-static void
-sig_handler(int signum)
-{
- sigusr1_caught = 1;
-}
-
-static void
-add_and_delete(void)
-{
- struct kevent kev;
- pid_t pid;
-
- /* Create a child that waits to be killed and then exits */
- pid = fork();
- if (pid == 0) {
- struct stat s;
- if (fstat(kqfd, &s) != -1)
- errx(1, "kqueue inherited across fork! (%s() at %s:%d)",
- __func__, __FILE__, __LINE__);
-
- pause();
- exit(2);
- }
- printf(" -- child created (pid %d)\n", (int) pid);
-
- test_begin("kevent(EVFILT_PROC, EV_ADD)");
-
- test_no_kevents();
- kevent_add(kqfd, &kev, pid, EVFILT_PROC, EV_ADD, 0, 0, NULL);
- test_no_kevents();
-
- success();
-
- test_begin("kevent(EVFILT_PROC, EV_DELETE)");
-
- sleep(1);
- test_no_kevents();
- kevent_add(kqfd, &kev, pid, EVFILT_PROC, EV_DELETE, 0, 0, NULL);
- if (kill(pid, SIGKILL) < 0)
- err(1, "kill");
- sleep(1);
- test_no_kevents();
-
- success();
-
-}
-
-#ifdef TODO
-static void
-event_trigger(void)
-{
- struct kevent kev;
- pid_t pid;
-
- test_begin("kevent(EVFILT_PROC, wait)");
-
- /* Create a child that waits to be killed and then exits */
- pid = fork();
- if (pid == 0) {
- pause();
- printf(" -- child caught signal, exiting\n");
- exit(2);
- }
- printf(" -- child created (pid %d)\n", (int) pid);
-
- test_no_kevents();
- kevent_add(kqfd, &kev, pid, EVFILT_PROC, EV_ADD, 0, 0, NULL);
-
- /* Cause the child to exit, then retrieve the event */
- printf(" -- killing process %d\n", (int) pid);
- if (kill(pid, SIGUSR1) < 0)
- err(1, "kill");
- kevent_cmp(&kev, kevent_get(kqfd));
- test_no_kevents();
-
- success();
-}
-
-void
-test_kevent_signal_disable(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_DISABLE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_DISABLE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGKILL) < 0)
- err(1, "kill");
-
- test_no_kevents();
-
- success();
-}
-
-void
-test_kevent_signal_enable(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_ENABLE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_ENABLE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- kev.flags = EV_ADD | EV_CLEAR;
-#if LIBKQUEUE
- kev.data = 1; /* WORKAROUND */
-#else
- kev.data = 2; // one extra time from test_kevent_signal_disable()
-#endif
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Delete the watch */
- kev.flags = EV_DELETE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_signal_del(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_DELETE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- /* Delete the kevent */
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_DELETE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- test_no_kevents();
- success();
-}
-
-void
-test_kevent_signal_oneshot(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_ONESHOT)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_ADD | EV_ONESHOT, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- kev.flags |= EV_CLEAR;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Send another one and make sure we get no events */
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
- test_no_kevents();
-
- success();
-}
-#endif
-
-void
-test_evfilt_proc()
-{
- kqfd = kqueue();
-
- signal(SIGUSR1, sig_handler);
-
- add_and_delete();
-
-#if TODO
- event_trigger();
-#endif
-
- signal(SIGUSR1, SIG_DFL);
-
-#if TODO
- test_kevent_signal_add();
- test_kevent_signal_del();
- test_kevent_signal_get();
- test_kevent_signal_disable();
- test_kevent_signal_enable();
- test_kevent_signal_oneshot();
-#endif
- close(kqfd);
-}
diff --git a/tools/regression/kqueue/read.c b/tools/regression/kqueue/read.c
deleted file mode 100644
index cc65427..0000000
--- a/tools/regression/kqueue/read.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#include "common.h"
-
-int kqfd;
-int sockfd[2];
-
-static void
-kevent_socket_drain(void)
-{
- char buf[1];
-
- /* Drain the read buffer, then make sure there are no more events. */
- puts("draining the read buffer");
- if (read(sockfd[0], &buf[0], 1) < 1)
- err(1, "read(2)");
-}
-
-static void
-kevent_socket_fill(void)
-{
- puts("filling the read buffer");
- if (write(sockfd[1], ".", 1) < 1)
- err(1, "write(2)");
-}
-
-
-void
-test_kevent_socket_add(void)
-{
- const char *test_id = "kevent(EVFILT_READ, EV_ADD)";
- struct kevent kev;
-
- test_begin(test_id);
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_socket_get(void)
-{
- const char *test_id = "kevent(EVFILT_READ) wait";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- kevent_socket_fill();
-
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- kevent_socket_drain();
- test_no_kevents();
-
- kev.flags = EV_DELETE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_socket_clear(void)
-{
- const char *test_id = "kevent(EVFILT_READ, EV_CLEAR)";
- struct kevent kev;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- kevent_socket_fill();
- kevent_socket_fill();
-
- kev.data = 2;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* We filled twice, but drain once. Edge-triggered would not generate
- additional events.
- */
- kevent_socket_drain();
- test_no_kevents();
-
- kevent_socket_drain();
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_DELETE, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_socket_disable_and_enable(void)
-{
- const char *test_id = "kevent(EVFILT_READ, EV_DISABLE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- /* Add an event, then disable it. */
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_DISABLE, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- kevent_socket_fill();
- test_no_kevents();
-
- /* Re-enable the knote, then see if an event is generated */
- kev.flags = EV_ENABLE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- kev.flags = EV_ADD;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- kevent_socket_drain();
-
- kev.flags = EV_DELETE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_socket_del(void)
-{
- const char *test_id = "kevent(EVFILT_READ, EV_DELETE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_DELETE, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- kevent_socket_fill();
- test_no_kevents();
- kevent_socket_drain();
-
- success();
-}
-
-void
-test_kevent_socket_oneshot(void)
-{
- const char *test_id = "kevent(EVFILT_READ, EV_ONESHOT)";
- struct kevent kev;
-
- test_begin(test_id);
-
- /* Re-add the watch and make sure no events are pending */
- puts("-- re-adding knote");
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD | EV_ONESHOT, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- test_no_kevents();
-
- puts("-- getting one event");
- kevent_socket_fill();
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- puts("-- checking knote disabled");
- test_no_kevents();
-
- /* Try to delete the knote, it should already be deleted */
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_DELETE, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) == 0)
- err(1, "%s", test_id);
-
- kevent_socket_drain();
-
- success();
-}
-
-
-#if HAVE_EV_DISPATCH
-void
-test_kevent_socket_dispatch(void)
-{
- const char *test_id = "kevent(EVFILT_READ, EV_DISPATCH)";
-
- test_begin(test_id);
-
- struct kevent kev;
-
- /* Re-add the watch and make sure no events are pending */
- puts("-- re-adding knote");
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD | EV_DISPATCH, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- test_no_kevents();
-
- /* The event will occur only once, even though EV_CLEAR is not
- specified. */
- kevent_socket_fill();
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
- test_no_kevents();
-
- /* Since the knote is disabled, the EV_DELETE operation succeeds. */
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_DELETE, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- kevent_socket_drain();
-
- success();
-}
-#endif /* HAVE_EV_DISPATCH */
-
-#if BROKEN
-void
-test_kevent_socket_lowat(void)
-{
- const char *test_id = "kevent(EVFILT_READ, NOTE_LOWAT)";
- struct kevent kev;
-
- test_begin(test_id);
-
- /* Re-add the watch and make sure no events are pending */
- puts("-- re-adding knote, setting low watermark to 2 bytes");
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD | EV_ONESHOT, NOTE_LOWAT, 2, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- test_no_kevents();
-
- puts("-- checking that one byte does not trigger an event..");
- kevent_socket_fill();
- test_no_kevents();
-
- puts("-- checking that two bytes triggers an event..");
- kevent_socket_fill();
- if (kevent(kqfd, NULL, 0, &kev, 1, NULL) != 1)
- err(1, "%s", test_id);
- KEV_CMP(kev, sockfd[0], EVFILT_READ, 0);
- test_no_kevents();
-
- kevent_socket_drain();
- kevent_socket_drain();
-
- success();
-}
-#endif
-
-void
-test_kevent_socket_eof(void)
-{
- const char *test_id = "kevent(EVFILT_READ, EV_EOF)";
- struct kevent kev;
-
- test_begin(test_id);
-
- /* Re-add the watch and make sure no events are pending */
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- test_no_kevents();
-
- if (close(sockfd[1]) < 0)
- err(1, "close(2)");
-
- kev.flags |= EV_EOF;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Delete the watch */
- EV_SET(&kev, sockfd[0], EVFILT_READ, EV_DELETE, 0, 0, &sockfd[0]);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_evfilt_read()
-{
- /* Create a connected pair of full-duplex sockets for testing socket events */
- if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockfd) < 0)
- abort();
-
- kqfd = kqueue();
- test_kevent_socket_add();
- test_kevent_socket_del();
- test_kevent_socket_get();
- test_kevent_socket_disable_and_enable();
- test_kevent_socket_oneshot();
- test_kevent_socket_clear();
-#if HAVE_EV_DISPATCH
- test_kevent_socket_dispatch();
-#endif
- test_kevent_socket_eof();
- close(kqfd);
-}
diff --git a/tools/regression/kqueue/signal.c b/tools/regression/kqueue/signal.c
deleted file mode 100644
index 14e751d..0000000
--- a/tools/regression/kqueue/signal.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#include "common.h"
-
-int kqfd;
-
-void
-test_kevent_signal_add(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_ADD)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_signal_get(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, wait)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- kev.flags |= EV_CLEAR;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- success();
-}
-
-void
-test_kevent_signal_disable(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_DISABLE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_DISABLE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- test_no_kevents();
-
- success();
-}
-
-void
-test_kevent_signal_enable(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_ENABLE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_ENABLE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- kev.flags = EV_ADD | EV_CLEAR;
-#if LIBKQUEUE
- kev.data = 1; /* WORKAROUND */
-#else
- kev.data = 2; // one extra time from test_kevent_signal_disable()
-#endif
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Delete the watch */
- kev.flags = EV_DELETE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_signal_del(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_DELETE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- /* Delete the kevent */
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_DELETE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- test_no_kevents();
- success();
-}
-
-void
-test_kevent_signal_oneshot(void)
-{
- const char *test_id = "kevent(EVFILT_SIGNAL, EV_ONESHOT)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, SIGUSR1, EVFILT_SIGNAL, EV_ADD | EV_ONESHOT, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Block SIGUSR1, then send it to ourselves */
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
- err(1, "sigprocmask");
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
-
- kev.flags |= EV_CLEAR;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Send another one and make sure we get no events */
- if (kill(getpid(), SIGUSR1) < 0)
- err(1, "kill");
- test_no_kevents();
-
- success();
-}
-
-void
-test_evfilt_signal()
-{
- kqfd = kqueue();
- test_kevent_signal_add();
- test_kevent_signal_del();
- test_kevent_signal_get();
- test_kevent_signal_disable();
- test_kevent_signal_enable();
- test_kevent_signal_oneshot();
- close(kqfd);
-}
diff --git a/tools/regression/kqueue/timer.c b/tools/regression/kqueue/timer.c
deleted file mode 100644
index 766125d..0000000
--- a/tools/regression/kqueue/timer.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#include "common.h"
-
-int kqfd;
-
-void
-test_kevent_timer_add(void)
-{
- const char *test_id = "kevent(EVFILT_TIMER, EV_ADD)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, 1, EVFILT_TIMER, EV_ADD, 0, 1000, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_timer_del(void)
-{
- const char *test_id = "kevent(EVFILT_TIMER, EV_DELETE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, 1, EVFILT_TIMER, EV_DELETE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- test_no_kevents();
-
- success();
-}
-
-void
-test_kevent_timer_get(void)
-{
- const char *test_id = "kevent(EVFILT_TIMER, wait)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, 1, EVFILT_TIMER, EV_ADD, 0, 1000, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- kev.flags |= EV_CLEAR;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- EV_SET(&kev, 1, EVFILT_TIMER, EV_DELETE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-static void
-test_oneshot(void)
-{
- const char *test_id = "kevent(EVFILT_TIMER, EV_ONESHOT)";
- struct kevent kev;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, 500,NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Retrieve the event */
- kev.flags = EV_ADD | EV_CLEAR | EV_ONESHOT;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Check if the event occurs again */
- sleep(3);
- test_no_kevents();
-
-
- success();
-}
-
-static void
-test_periodic(void)
-{
- const char *test_id = "kevent(EVFILT_TIMER, periodic)";
- struct kevent kev;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD, 0, 1000,NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Retrieve the event */
- kev.flags = EV_ADD | EV_CLEAR;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Check if the event occurs again */
- sleep(1);
- kevent_cmp(&kev, kevent_get(kqfd));
-
- /* Delete the event */
- kev.flags = EV_DELETE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-static void
-disable_and_enable(void)
-{
- const char *test_id = "kevent(EVFILT_TIMER, EV_DISABLE and EV_ENABLE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- /* Add the watch and immediately disable it */
- EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, 2000,NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- kev.flags = EV_DISABLE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- test_no_kevents();
-
- /* Re-enable and check again */
- kev.flags = EV_ENABLE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- kev.flags = EV_ADD | EV_CLEAR | EV_ONESHOT;
- kev.data = 1;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- success();
-}
-
-void
-test_evfilt_timer()
-{
- kqfd = kqueue();
- test_kevent_timer_add();
- test_kevent_timer_del();
- test_kevent_timer_get();
- test_oneshot();
- test_periodic();
- disable_and_enable();
- close(kqfd);
-}
diff --git a/tools/regression/kqueue/user.c b/tools/regression/kqueue/user.c
deleted file mode 100644
index 9ba25f9..0000000
--- a/tools/regression/kqueue/user.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#include "common.h"
-
-int kqfd;
-
-static void
-add_and_delete(void)
-{
- const char *test_id = "kevent(EVFILT_USER, EV_ADD and EV_DELETE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- kevent_add(kqfd, &kev, 1, EVFILT_USER, EV_ADD, 0, 0, NULL);
- test_no_kevents();
-
- kevent_add(kqfd, &kev, 1, EVFILT_USER, EV_DELETE, 0, 0, NULL);
- test_no_kevents();
-
- success();
-}
-
-static void
-event_wait(void)
-{
- const char *test_id = "kevent(EVFILT_USER, wait)";
- struct kevent kev;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- /* Add the event, and then trigger it */
- kevent_add(kqfd, &kev, 1, EVFILT_USER, EV_ADD | EV_CLEAR, 0, 0, NULL);
- kevent_add(kqfd, &kev, 1, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL);
-
- kev.fflags &= ~NOTE_FFCTRLMASK;
- kev.fflags &= ~NOTE_TRIGGER;
- kev.flags = EV_CLEAR;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- test_no_kevents();
-
- success();
-}
-
-static void
-disable_and_enable(void)
-{
- const char *test_id = "kevent(EVFILT_USER, EV_DISABLE and EV_ENABLE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- kevent_add(kqfd, &kev, 1, EVFILT_USER, EV_ADD, 0, 0, NULL);
- kevent_add(kqfd, &kev, 1, EVFILT_USER, EV_DISABLE, 0, 0, NULL);
-
- /* Trigger the event, but since it is disabled, nothing will happen. */
- kevent_add(kqfd, &kev, 1, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL);
- test_no_kevents();
-
- kevent_add(kqfd, &kev, 1, EVFILT_USER, EV_ENABLE, 0, 0, NULL);
- kevent_add(kqfd, &kev, 1, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL);
-
- kev.flags = EV_CLEAR;
- kev.fflags &= ~NOTE_FFCTRLMASK;
- kev.fflags &= ~NOTE_TRIGGER;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- success();
-}
-
-static void
-oneshot(void)
-{
- const char *test_id = "kevent(EVFILT_USER, EV_ONESHOT)";
- struct kevent kev;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- kevent_add(kqfd, &kev, 2, EVFILT_USER, EV_ADD | EV_ONESHOT, 0, 0, NULL);
-
- puts(" -- event 1");
- kevent_add(kqfd, &kev, 2, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL);
-
- kev.flags = EV_ONESHOT;
- kev.fflags &= ~NOTE_FFCTRLMASK;
- kev.fflags &= ~NOTE_TRIGGER;
- kevent_cmp(&kev, kevent_get(kqfd));
-
- test_no_kevents();
-
- success();
-}
-
-void
-test_evfilt_user()
-{
- kqfd = kqueue();
-
- add_and_delete();
- event_wait();
- disable_and_enable();
- oneshot();
- /* TODO: try different fflags operations */
-
- close(kqfd);
-}
diff --git a/tools/regression/kqueue/vnode.c b/tools/regression/kqueue/vnode.c
deleted file mode 100644
index dfa0b5e..0000000
--- a/tools/regression/kqueue/vnode.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2009 Mark Heily <mark@heily.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * $FreeBSD$
- */
-
-#include "common.h"
-
-int kqfd;
-int vnode_fd;
-
-void
-test_kevent_vnode_add(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, EV_ADD)";
- const char *testfile = "/tmp/kqueue-test.tmp";
- struct kevent kev;
-
- test_begin(test_id);
-
- system("touch /tmp/kqueue-test.tmp");
- vnode_fd = open(testfile, O_RDONLY);
- if (vnode_fd < 0)
- err(1, "open of %s", testfile);
- else
- printf("vnode_fd = %d\n", vnode_fd);
-
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_ADD,
- NOTE_WRITE | NOTE_ATTRIB | NOTE_RENAME | NOTE_DELETE, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_vnode_note_delete(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, NOTE_DELETE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, NOTE_DELETE, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- if (unlink("/tmp/kqueue-test.tmp") < 0)
- err(1, "unlink");
-
- kevent_cmp(&kev, kevent_get(kqfd));
-
- success();
-}
-
-void
-test_kevent_vnode_note_write(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, NOTE_WRITE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, NOTE_WRITE, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- if (system("echo hello >> /tmp/kqueue-test.tmp") < 0)
- err(1, "system");
-
- /* BSD kqueue adds NOTE_EXTEND even though it was not requested */
- /* BSD kqueue removes EV_ENABLE */
- kev.flags &= ~EV_ENABLE; // XXX-FIXME compatibility issue
- kev.fflags |= NOTE_EXTEND; // XXX-FIXME compatibility issue
- kevent_cmp(&kev, kevent_get(kqfd));
-
- success();
-}
-
-void
-test_kevent_vnode_note_attrib(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, NOTE_ATTRIB)";
- struct kevent kev;
- int nfds;
-
- test_begin(test_id);
-
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, NOTE_ATTRIB, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- if (system("touch /tmp/kqueue-test.tmp") < 0)
- err(1, "system");
-
- nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL);
- if (nfds < 1)
- err(1, "%s", test_id);
- if (kev.ident != vnode_fd ||
- kev.filter != EVFILT_VNODE ||
- kev.fflags != NOTE_ATTRIB)
- err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)",
- test_id, (unsigned int)kev.ident, kev.filter, kev.flags);
-
- success();
-}
-
-void
-test_kevent_vnode_note_rename(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, NOTE_RENAME)";
- struct kevent kev;
- int nfds;
-
- test_begin(test_id);
-
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, NOTE_RENAME, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- if (system("mv /tmp/kqueue-test.tmp /tmp/kqueue-test2.tmp") < 0)
- err(1, "system");
-
- nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL);
- if (nfds < 1)
- err(1, "%s", test_id);
- if (kev.ident != vnode_fd ||
- kev.filter != EVFILT_VNODE ||
- kev.fflags != NOTE_RENAME)
- err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)",
- test_id, (unsigned int)kev.ident, kev.filter, kev.flags);
-
- if (system("mv /tmp/kqueue-test2.tmp /tmp/kqueue-test.tmp") < 0)
- err(1, "system");
-
- success();
-}
-
-void
-test_kevent_vnode_del(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, EV_DELETE)";
- struct kevent kev;
-
- test_begin(test_id);
-
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_DELETE, 0, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- success();
-}
-
-void
-test_kevent_vnode_disable_and_enable(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, EV_DISABLE and EV_ENABLE)";
- struct kevent kev;
- int nfds;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- /* Add the watch and immediately disable it */
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_ADD | EV_ONESHOT, NOTE_ATTRIB, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- kev.flags = EV_DISABLE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- /* Confirm that the watch is disabled */
- if (system("touch /tmp/kqueue-test.tmp") < 0)
- err(1, "system");
- test_no_kevents();
-
- /* Re-enable and check again */
- kev.flags = EV_ENABLE;
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
- if (system("touch /tmp/kqueue-test.tmp") < 0)
- err(1, "system");
- nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL);
- if (nfds < 1)
- err(1, "%s", test_id);
- if (kev.ident != vnode_fd ||
- kev.filter != EVFILT_VNODE ||
- kev.fflags != NOTE_ATTRIB)
- err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)",
- test_id, (unsigned int)kev.ident, kev.filter, kev.flags);
-
- success();
-}
-
-#if HAVE_EV_DISPATCH
-void
-test_kevent_vnode_dispatch(void)
-{
- const char *test_id = "kevent(EVFILT_VNODE, EV_DISPATCH)";
- struct kevent kev;
- int nfds;
-
- test_begin(test_id);
-
- test_no_kevents();
-
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_ADD | EV_DISPATCH, NOTE_ATTRIB, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "%s", test_id);
-
- if (system("touch /tmp/kqueue-test.tmp") < 0)
- err(1, "system");
-
- nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL);
- if (nfds < 1)
- err(1, "%s", test_id);
- if (kev.ident != vnode_fd ||
- kev.filter != EVFILT_VNODE ||
- kev.fflags != NOTE_ATTRIB)
- err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)",
- test_id, (unsigned int)kev.ident, kev.filter, kev.flags);
-
- /* Confirm that the watch is disabled automatically */
- puts("-- checking that watch is disabled");
- if (system("touch /tmp/kqueue-test.tmp") < 0)
- err(1, "system");
- test_no_kevents();
-
- /* Delete the watch */
- EV_SET(&kev, vnode_fd, EVFILT_VNODE, EV_DELETE, NOTE_ATTRIB, 0, NULL);
- if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0)
- err(1, "remove watch failed: %s", test_id);
-
- success();
-}
-#endif /* HAVE_EV_DISPATCH */
-
-void
-test_evfilt_vnode()
-{
- kqfd = kqueue();
- test_kevent_vnode_add();
- test_kevent_vnode_del();
- test_kevent_vnode_disable_and_enable();
-#if HAVE_EV_DISPATCH
- test_kevent_vnode_dispatch();
-#endif
- test_kevent_vnode_note_write();
- test_kevent_vnode_note_attrib();
- test_kevent_vnode_note_rename();
- test_kevent_vnode_note_delete();
- close(kqfd);
-}
diff --git a/tools/regression/lib/libc/gen/test-wordexp.c b/tools/regression/lib/libc/gen/test-wordexp.c
index 15d1b7c..069190f 100644
--- a/tools/regression/lib/libc/gen/test-wordexp.c
+++ b/tools/regression/lib/libc/gen/test-wordexp.c
@@ -240,6 +240,21 @@ main(int argc, char *argv[])
r = unsetenv("IFS");
assert(r == 0);
+ /*
+ * With IFS set to a non-default value, and using it.
+ */
+ r = setenv("IFS", ":", 1);
+ assert(r == 0);
+ r = wordexp("${IFS+hello:world}", &we, 0);
+ assert(r == 0);
+ assert(we.we_wordc == 2);
+ assert(strcmp(we.we_wordv[0], "hello") == 0);
+ assert(strcmp(we.we_wordv[1], "world") == 0);
+ assert(we.we_wordv[2] == NULL);
+ wordfree(&we);
+ r = unsetenv("IFS");
+ assert(r == 0);
+
printf("PASS wordexp()\n");
printf("PASS wordfree()\n");
diff --git a/tools/regression/lib/libc/stdio/test-fmemopen.t b/tools/regression/lib/libc/stdio/test-fmemopen.t
deleted file mode 100644
index bd5157b..0000000
--- a/tools/regression/lib/libc/stdio/test-fmemopen.t
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-cd `dirname $0`
-
-executable=`basename $0 .t`
-
-make $executable 2>&1 > /dev/null
-
-echo 1..1
-if ./$executable; then
- echo ok 1 - $executable successful
-else
- echo not ok 1 - $executable failed
-fi
diff --git a/tools/regression/lib/libc/stdio/test-open_memstream.c b/tools/regression/lib/libc/stdio/test-open_memstream.c
index 1a168c6..fdbda30 100644
--- a/tools/regression/lib/libc/stdio/test-open_memstream.c
+++ b/tools/regression/lib/libc/stdio/test-open_memstream.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2013 Advanced Computing Technologies LLC
+ * Copyright (c) 2013 Hudson River Trading LLC
* Written by: John H. Baldwin <jhb@FreeBSD.org>
* All rights reserved.
*
diff --git a/tools/regression/lib/libc/stdio/test-open_wmemstream.c b/tools/regression/lib/libc/stdio/test-open_wmemstream.c
index 4cd0ab9..2a90fcd 100644
--- a/tools/regression/lib/libc/stdio/test-open_wmemstream.c
+++ b/tools/regression/lib/libc/stdio/test-open_wmemstream.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2013 Advanced Computing Technologies LLC
+ * Copyright (c) 2013 Hudson River Trading LLC
* Written by: John H. Baldwin <jhb@FreeBSD.org>
* All rights reserved.
*
diff --git a/tools/regression/mmap/Makefile b/tools/regression/mmap/Makefile
deleted file mode 100644
index c9bb5c4..0000000
--- a/tools/regression/mmap/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-PROG= mmap
-MAN=
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/mmap/mmap.c b/tools/regression/mmap/mmap.c
deleted file mode 100644
index 14c55a1..0000000
--- a/tools/regression/mmap/mmap.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-
- * Copyright (c) 2009 Simon L. Nielsen <simon@FreeBSD.org>,
- * Bjoern A. Zeeb <bz@FreeBSD.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/mman.h>
-#include <sys/sysctl.h>
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <err.h>
-
-const struct tests {
- void *addr;
- int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */
-} tests[] = {
- { (void *)0, { 0, 1 } }, /* Test sysctl. */
- { (void *)1, { 0, 0 } },
- { (void *)(PAGE_SIZE - 1), { 0, 0 } },
- { (void *)PAGE_SIZE, { 1, 1 } },
- { (void *)-1, { 0, 0 } },
- { (void *)(-PAGE_SIZE), { 0, 0 } },
- { (void *)(-1 - PAGE_SIZE), { 0, 0 } },
- { (void *)(-1 - PAGE_SIZE - 1), { 0, 0 } },
- { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } },
-};
-
-int
-main(void)
-{
- void *p;
- size_t len;
- int i, error, mib[3], map_at_zero;
-
- error = 0;
-
- /* Get the current sysctl value of security.bsd.map_at_zero. */
- len = sizeof(mib) / sizeof(*mib);
- if (sysctlnametomib("security.bsd.map_at_zero", mib, &len) == -1)
- err(1, "sysctlnametomib(security.bsd.map_at_zero)");
-
- len = sizeof(map_at_zero);
- if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1)
- err(1, "sysctl(security.bsd.map_at_zero)");
-
- /* Normalize to 0 or 1 for array access. */
- map_at_zero = !!map_at_zero;
-
- for (i=0; i < (sizeof(tests) / sizeof(*tests)); i++) {
- p = mmap((void *)tests[i].addr, PAGE_SIZE,
- PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED,
- -1, 0);
- if (p == MAP_FAILED) {
- if (tests[i].ok[map_at_zero] != 0)
- error++;
- warnx("%s: mmap(%p, ...) failed.",
- (tests[i].ok[map_at_zero] == 0) ? "OK " : "ERR",
- tests[i].addr);
- } else {
- if (tests[i].ok[map_at_zero] != 1)
- error++;
- warnx("%s: mmap(%p, ...) succeeded: p=%p",
- (tests[i].ok[map_at_zero] == 1) ? "OK " : "ERR",
- tests[i].addr, p);
- }
- }
-
- if (error)
- err(1, "---\nERROR: %d unexpected results.", error);
-
- return (error != 0);
-}
diff --git a/tools/regression/mqueue/Makefile b/tools/regression/mqueue/Makefile
deleted file mode 100644
index a4f386b..0000000
--- a/tools/regression/mqueue/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-SUBDIR=mqtest1 mqtest2 mqtest3 mqtest4 mqtest5
-
-.include <bsd.subdir.mk>
diff --git a/tools/regression/mqueue/mqtest1/Makefile b/tools/regression/mqueue/mqtest1/Makefile
deleted file mode 100644
index 3a50cee..0000000
--- a/tools/regression/mqueue/mqtest1/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG=mqtest1
-DPADD= ${LIBRT}
-LDADD= -lrt
-MAN=
-DEBUG_FLAGS=-g
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/mqueue/mqtest1/mqtest1.c b/tools/regression/mqueue/mqtest1/mqtest1.c
deleted file mode 100644
index 25fc1ba..0000000
--- a/tools/regression/mqueue/mqtest1/mqtest1.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* $FreeBSD$ */
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <mqueue.h>
-#include <signal.h>
-#include <stdio.h>
-
-#define MQNAME "/mytstqueue1"
-
-int main()
-{
- struct mq_attr attr, attr2;
- struct sigevent sigev;
- mqd_t mq;
- int status;
-
- attr.mq_maxmsg = 2;
- attr.mq_msgsize = 100;
- mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
- if (mq == (mqd_t)-1)
- err(1, "mq_open");
- status = mq_unlink(MQNAME);
- if (status)
- err(1, "mq_unlink");
- status = mq_getattr(mq, &attr2);
- if (status)
- err(1, "mq_getattr");
- if (attr.mq_maxmsg != attr2.mq_maxmsg)
- err(1, "mq_maxmsg changed");
- if (attr.mq_msgsize != attr2.mq_msgsize)
- err(1, "mq_msgsize changed");
-
- sigev.sigev_notify = SIGEV_SIGNAL;
- sigev.sigev_signo = SIGRTMIN;
- status = mq_notify(mq, &sigev);
- if (status)
- err(1, "mq_notify");
- status = mq_notify(mq, &sigev);
- if (status == 0)
- err(1, "mq_notify 2");
- else if (errno != EBUSY)
- err(1, "mq_notify 3");
- status = mq_notify(mq, NULL);
- if (status)
- err(1, "mq_notify 4");
- status = mq_close(mq);
- if (status)
- err(1, "mq_close");
- return (0);
-}
diff --git a/tools/regression/mqueue/mqtest2/Makefile b/tools/regression/mqueue/mqtest2/Makefile
deleted file mode 100644
index 0709854..0000000
--- a/tools/regression/mqueue/mqtest2/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG=mqtest2
-DPADD= ${LIBRT}
-LDADD= -lrt
-MAN=
-DEBUG_FLAGS=-g
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/mqueue/mqtest2/mqtest2.c b/tools/regression/mqueue/mqtest2/mqtest2.c
deleted file mode 100644
index bfe6d97..0000000
--- a/tools/regression/mqueue/mqtest2/mqtest2.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* $FreeBSD$ */
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <err.h>
-#include <fcntl.h>
-#include <mqueue.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define MQNAME "/mytstqueue2"
-#define LOOPS 1000
-#define PRIO 10
-
-void alarmhandler(int sig)
-{
- write(1, "timeout\n", 8);
- _exit(1);
-}
-
-int main()
-{
- struct mq_attr attr;
- mqd_t mq;
- int status, pid;
-
- mq_unlink(MQNAME);
-
- attr.mq_maxmsg = 5;
- attr.mq_msgsize = 128;
- mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
- if (mq == (mqd_t)-1)
- err(1, "mq_open");
- status = mq_getattr(mq, &attr);
- if (status)
- err(1, "mq_getattr");
- pid = fork();
- if (pid == 0) { /* child */
- int prio, j, i;
- char *buf;
-
- mq_close(mq);
-
- signal(SIGALRM, alarmhandler);
-
- mq = mq_open(MQNAME, O_RDWR);
- if (mq == (mqd_t)-1)
- err(1, "child: mq_open");
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- alarm(3);
- status = mq_receive(mq, buf, attr.mq_msgsize, &prio);
- if (status == -1)
- err(2, "child: mq_receive");
- for (i = 0; i < attr.mq_msgsize; ++i)
- if (buf[i] != i)
- err(3, "child: message data corrupted");
- if (prio != PRIO)
- err(4, "child: priority is incorrect: %d",
- prio);
- }
- alarm(0);
- free(buf);
- mq_close(mq);
- return (0);
- } else if (pid == -1) {
- err(1, "fork()");
- } else {
- char *buf;
- int i, j, prio;
-
- signal(SIGALRM, alarmhandler);
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- for (i = 0; i < attr.mq_msgsize; ++i)
- buf[i] = i;
- alarm(3);
- status = mq_send(mq, buf, attr.mq_msgsize, PRIO);
- if (status)
- err(1, "mq_send");
- }
- alarm(3);
- wait(&status);
- alarm(0);
- }
- status = mq_close(mq);
- if (status)
- err(1, "mq_close");
- mq_unlink(MQNAME);
- return (0);
-}
diff --git a/tools/regression/mqueue/mqtest3/Makefile b/tools/regression/mqueue/mqtest3/Makefile
deleted file mode 100644
index 514cbac..0000000
--- a/tools/regression/mqueue/mqtest3/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG=mqtest3
-DPADD= ${LIBRT}
-LDADD= -lrt
-MAN=
-DEBUG_FLAGS=-g
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/mqueue/mqtest3/mqtest3.c b/tools/regression/mqueue/mqtest3/mqtest3.c
deleted file mode 100644
index aa47ffa..0000000
--- a/tools/regression/mqueue/mqtest3/mqtest3.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* $FreeBSD$ */
-
-#include <sys/types.h>
-#include <sys/select.h>
-#include <sys/wait.h>
-#include <err.h>
-#include <fcntl.h>
-#include <mqueue.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define MQNAME "/mytstqueue3"
-#define LOOPS 1000
-#define PRIO 10
-
-void sighandler(int sig)
-{
- write(1, "timeout\n", 8);
- _exit(1);
-}
-
-int main()
-{
- mqd_t mq;
- int status;
- struct mq_attr attr;
- int pid;
- fd_set set;
-
- mq_unlink(MQNAME);
-
- attr.mq_maxmsg = 5;
- attr.mq_msgsize = 128;
- mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
- if (mq == (mqd_t)-1)
- err(1, "mq_open()");
- status = mq_getattr(mq, &attr);
- if (status)
- err(1, "mq_getattr()");
-
- pid = fork();
- if (pid == 0) { /* child */
- int prio, j, i;
- char *buf;
-
- mq_close(mq);
-
- signal(SIGALRM, sighandler);
-
- mq = mq_open(MQNAME, O_RDWR);
- if (mq == (mqd_t)-1)
- err(1, "child process: mq_open");
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- FD_ZERO(&set);
- FD_SET(__mq_oshandle(mq), &set);
- alarm(3);
- status = select(__mq_oshandle(mq)+1, &set, NULL, NULL, NULL);
- if (status != 1)
- err(1, "child process: select()");
- status = mq_receive(mq, buf, attr.mq_msgsize, &prio);
- if (status == -1)
- err(2, "child process: mq_receive");
- for (i = 0; i < attr.mq_msgsize; ++i)
- if (buf[i] != i)
- err(3, "message data corrupted");
- if (prio != PRIO)
- err(4, "priority is incorrect: %d", prio);
- }
- alarm(0);
- free(buf);
- mq_close(mq);
- return (0);
- } else if (pid == -1) {
- err(1, "fork()");
- } else {
- char *buf;
- int i, j, prio;
-
- signal(SIGALRM, sighandler);
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- for (i = 0; i < attr.mq_msgsize; ++i) {
- buf[i] = i;
- }
- alarm(3);
- FD_ZERO(&set);
- FD_SET(__mq_oshandle(mq), &set);
- status = select(__mq_oshandle(mq)+1, NULL, &set, NULL, NULL);
- if (status != 1)
- err(1, "select()");
- status = mq_send(mq, buf, attr.mq_msgsize, PRIO);
- if (status) {
- kill(pid, SIGKILL);
- err(2, "mq_send()");
- }
- }
- alarm(3);
- wait(&status);
- alarm(0);
- }
- status = mq_close(mq);
- if (status)
- err(1, "mq_close");
- mq_unlink(MQNAME);
- return (0);
-}
diff --git a/tools/regression/mqueue/mqtest4/Makefile b/tools/regression/mqueue/mqtest4/Makefile
deleted file mode 100644
index 781d76d..0000000
--- a/tools/regression/mqueue/mqtest4/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG=mqtest4
-DPADD= ${LIBRT}
-LDADD= -lrt
-MAN=
-DEBUG_FLAGS=-g
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/mqueue/mqtest4/mqtest4.c b/tools/regression/mqueue/mqtest4/mqtest4.c
deleted file mode 100644
index 80a7f88..0000000
--- a/tools/regression/mqueue/mqtest4/mqtest4.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* $FreeBSD$ */
-
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/select.h>
-#include <sys/wait.h>
-#include <err.h>
-#include <fcntl.h>
-#include <mqueue.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define MQNAME "/mytstqueue4"
-#define LOOPS 1000
-#define PRIO 10
-
-void sighandler(int sig)
-{
- write(1, "timeout\n", 8);
- _exit(1);
-}
-
-int main()
-{
- mqd_t mq;
- int status;
- struct mq_attr attr;
- int pid;
- fd_set set;
- int kq;
- struct kevent kev;
-
- mq_unlink(MQNAME);
-
- attr.mq_maxmsg = 5;
- attr.mq_msgsize = 128;
- mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
- if (mq == (mqd_t) -1)
- err(1, "mq_open()");
- status = mq_getattr(mq, &attr);
- if (status)
- err(1, "mq_getattr()");
- pid = fork();
- if (pid == 0) { /* child */
- int prio, j, i;
- char *buf;
-
- mq_close(mq);
- kq = kqueue();
- mq = mq_open(MQNAME, O_RDWR);
- if (mq == (mqd_t)-1)
- err(1, "child: mq_open");
- EV_SET(&kev, __mq_oshandle(mq), EVFILT_READ, EV_ADD, 0, 0, 0);
- status = kevent(kq, &kev, 1, NULL, 0, NULL);
- if (status == -1)
- err(1, "child: kevent");
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- alarm(3);
- status = kevent(kq, NULL, 0, &kev, 1, NULL);
- if (status != 1)
- err(1, "child: kevent 2");
- status = mq_receive(mq, buf, attr.mq_msgsize, &prio);
- if (status == -1)
- err(2, "child: mq_receive");
- for (i = 0; i < attr.mq_msgsize; ++i)
- if (buf[i] != i)
- err(3, "child: message data corrupted");
- if (prio != PRIO)
- err(4, "child: priority is incorrect: %d",
- prio);
- }
- alarm(0);
- free(buf);
- mq_close(mq);
- return (0);
- } else if (pid == -1) {
- err(1, "fork()");
- } else {
- char *buf;
- int i, j, prio;
-
- signal(SIGALRM, sighandler);
- kq = kqueue();
- EV_SET(&kev, __mq_oshandle(mq), EVFILT_WRITE, EV_ADD, 0, 0, 0);
- status = kevent(kq, &kev, 1, NULL, 0, NULL);
- if (status == -1)
- err(1, "kevent");
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- for (i = 0; i < attr.mq_msgsize; ++i) {
- buf[i] = i;
- }
- alarm(3);
- status = kevent(kq, NULL, 0, &kev, 1, NULL);
- if (status != 1)
- err(1, "child: kevent 2");
- status = mq_send(mq, buf, attr.mq_msgsize, PRIO);
- if (status) {
- err(2, "mq_send()");
- }
- }
- free(buf);
- alarm(3);
- wait(&status);
- alarm(0);
- }
- status = mq_close(mq);
- if (status)
- err(1, "mq_close");
- mq_unlink(MQNAME);
- return (0);
-}
diff --git a/tools/regression/mqueue/mqtest5/Makefile b/tools/regression/mqueue/mqtest5/Makefile
deleted file mode 100644
index d94e541..0000000
--- a/tools/regression/mqueue/mqtest5/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG=mqtest5
-DPADD= ${LIBRT}
-LDADD= -lrt
-MAN=
-DEBUG_FLAGS=-g
-
-.include <bsd.prog.mk>
diff --git a/tools/regression/mqueue/mqtest5/mqtest5.c b/tools/regression/mqueue/mqtest5/mqtest5.c
deleted file mode 100644
index 354a7bb..0000000
--- a/tools/regression/mqueue/mqtest5/mqtest5.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* $FreeBSD$ */
-
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/select.h>
-#include <sys/wait.h>
-#include <err.h>
-#include <fcntl.h>
-#include <mqueue.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define MQNAME "/mytstqueue5"
-#define LOOPS 1000
-#define PRIO 10
-
-void sighandler(int sig)
-{
- write(1, "timeout\n", 8);
- _exit(1);
-}
-
-int main()
-{
- mqd_t mq;
- int status;
- struct mq_attr attr;
- int pid;
- sigset_t set;
- struct sigaction sa;
- siginfo_t info;
-
- mq_unlink(MQNAME);
-
- sigemptyset(&set);
- sigaddset(&set, SIGRTMIN);
- sigprocmask(SIG_BLOCK, &set, NULL);
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_SIGINFO;
- sa.sa_sigaction = (void *) SIG_DFL;
- sigaction(SIGRTMIN, &sa, NULL);
-
- attr.mq_maxmsg = 5;
- attr.mq_msgsize = 128;
- mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
- if (mq == (mqd_t)-1)
- err(1, "mq_open()");
- status = mq_getattr(mq, &attr);
- if (status)
- err(1, "mq_getattr()");
- pid = fork();
- if (pid == 0) { /* child */
- int prio, j, i;
- char *buf;
- struct sigevent sigev;
-
- signal(SIGALRM, sighandler);
-
- sigev.sigev_notify = SIGEV_SIGNAL;
- sigev.sigev_signo = SIGRTMIN;
- sigev.sigev_value.sival_int = 2;
-
- mq_close(mq);
- mq = mq_open(MQNAME, O_RDWR | O_NONBLOCK);
- if (mq == (mqd_t)-1)
- err(1, "child: mq_open");
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- alarm(3);
- status = mq_notify(mq, &sigev);
- if (status)
- err(1, "child: mq_notify");
- status = sigwaitinfo(&set, &info);
- if (status == -1)
- err(1, "child: sigwaitinfo");
- if (info.si_value.sival_int != 2)
- err(1, "child: sival_int");
- status = mq_receive(mq, buf, attr.mq_msgsize, &prio);
- if (status == -1)
- err(2, "child: mq_receive");
- for (i = 0; i < attr.mq_msgsize; ++i)
- if (buf[i] != i)
- err(3, "child: message data corrupted");
- if (prio != PRIO)
- err(4, "child: priority is incorrect: %d",
- prio);
- }
- alarm(0);
- free(buf);
- mq_close(mq);
- return (0);
- } else if (pid == -1) {
- err(1, "fork()");
- } else {
- char *buf;
- int i, j, prio;
-
- signal(SIGALRM, sighandler);
- buf = malloc(attr.mq_msgsize);
- for (j = 0; j < LOOPS; ++j) {
- for (i = 0; i < attr.mq_msgsize; ++i) {
- buf[i] = i;
- }
- alarm(3);
- status = mq_send(mq, buf, attr.mq_msgsize, PRIO);
- if (status) {
- kill(pid, SIGKILL);
- err(2, "mq_send()");
- }
- }
- alarm(3);
- wait(&status);
- alarm(0);
- }
- status = mq_close(mq);
- if (status)
- err(1, "mq_close");
- mq_unlink(MQNAME);
- return (0);
-}
diff --git a/tools/regression/netinet/arphold/arphold.c b/tools/regression/netinet/arphold/arphold.c
index 8d694fe..417a2d8 100644
--- a/tools/regression/netinet/arphold/arphold.c
+++ b/tools/regression/netinet/arphold/arphold.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Advanced Computing Technologies LLC
+ * Copyright (c) 2010 Hudson River Trading LLC
* Written by George Neville-Neil gnn@freebsd.org
* All rights reserved.
*
diff --git a/tools/regression/p1003_1b/Makefile b/tools/regression/p1003_1b/Makefile
index 8cf7d5a..902666c 100644
--- a/tools/regression/p1003_1b/Makefile
+++ b/tools/regression/p1003_1b/Makefile
@@ -14,4 +14,5 @@ SRCS=\
MAN=
CFLAGS+=-DNO_MEMLOCK
+
.include <bsd.prog.mk>
diff --git a/tools/regression/p1003_1b/fifo.c b/tools/regression/p1003_1b/fifo.c
index 455f7f9..925e7c2 100644
--- a/tools/regression/p1003_1b/fifo.c
+++ b/tools/regression/p1003_1b/fifo.c
@@ -31,17 +31,17 @@
*
* $FreeBSD$
*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <err.h>
-#include <fcntl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/time.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
#include <sched.h>
#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
volatile int ticked;
#define CAN_USE_ALARMS
@@ -109,7 +109,7 @@ int fifo(int argc, char *argv[])
fifo_param.sched_priority = 1;
p = (long *)mmap(0, sizeof(*p),
- PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED|MAP_INHERIT, -1, 0);
+ PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
if (p == (long *)-1)
err(errno, "mmap");
diff --git a/tools/regression/p1003_1b/main.c b/tools/regression/p1003_1b/main.c
index 0e87c6c..23c3b02 100644
--- a/tools/regression/p1003_1b/main.c
+++ b/tools/regression/p1003_1b/main.c
@@ -1,5 +1,6 @@
/* $FreeBSD$ */
#include <stdio.h>
+#include <string.h>
int fifo(int argc, char *argv[]);
int memlock(int argc, char *argv[]);
diff --git a/tools/regression/p1003_1b/prutil.c b/tools/regression/p1003_1b/prutil.c
index e0e3d6f..2910b7f 100644
--- a/tools/regression/p1003_1b/prutil.c
+++ b/tools/regression/p1003_1b/prutil.c
@@ -1,10 +1,11 @@
+#include <err.h>
#include <errno.h>
-#include <unistd.h>
#include <sched.h>
#include <stdio.h>
-
-#include <err.h>
+#include <stdlib.h>
#include <sysexits.h>
+#include <unistd.h>
+
#include "prutil.h"
/*
@@ -12,7 +13,7 @@
*/
void quit(const char *text)
{
- err(errno, text);
+ err(errno, "%s", text);
}
char *sched_text(int scheduler)
diff --git a/tools/regression/p1003_1b/sched.c b/tools/regression/p1003_1b/sched.c
index bd978f8..1814c79 100644
--- a/tools/regression/p1003_1b/sched.c
+++ b/tools/regression/p1003_1b/sched.c
@@ -41,16 +41,17 @@
#define _POSIX_SOURCE
#define _POSIX_C_SOURCE 199309L
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <stdio.h>
-#include <string.h>
+#include <sys/mman.h>
#include <errno.h>
#include <fcntl.h>
-#include <sys/mman.h>
-
+#include <limits.h>
#include <sched.h>
+#include <stdio.h>
+#define __XSI_VISIBLE 1
+#include <stdlib.h>
+#undef __XSI_VISIBLE
+#include <string.h>
+#include <unistd.h>
#include "prutil.h"
@@ -209,17 +210,14 @@ int sched(int ac, char *av[])
{
-#define NAM "P1003_1b_schedXXXX"
- char nam[L_tmpnam];
+ char nam[] = "P1003_1b_schedXXXXXX";
int fd;
pid_t p;
pid_t *lastrun;
- strcpy(nam, NAM);
- if (tmpnam(nam) != nam)
- q(__LINE__, errno, "tmpnam " NAM);
- q(__LINE__, (fd = open(nam, O_RDWR|O_CREAT, 0666)),
- "open " NAM);
+ fd = mkstemp(nam);
+ if (fd == -1)
+ q(__LINE__, errno, "mkstemp failed");
(void)unlink(nam);
diff --git a/tools/regression/p1003_1b/yield.c b/tools/regression/p1003_1b/yield.c
index ac31a99..a9b7bad 100644
--- a/tools/regression/p1003_1b/yield.c
+++ b/tools/regression/p1003_1b/yield.c
@@ -89,7 +89,7 @@ int yield(int argc, char *argv[])
n = nslaves = atoi(argv[1]);
p = (int *)mmap(0, sizeof(int),
- PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED|MAP_INHERIT, -1, 0);
+ PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
if (p == (int *)-1)
err(errno, "mmap");
diff --git a/tools/regression/sockets/accept_fd_leak/Makefile b/tools/regression/sockets/accept_fd_leak/Makefile
index 208df0d..e9bfba6 100644
--- a/tools/regression/sockets/accept_fd_leak/Makefile
+++ b/tools/regression/sockets/accept_fd_leak/Makefile
@@ -4,8 +4,6 @@
PROG= accept_fd_leak
MAN=
-
-regress:
- ./accept_fd_leak
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c b/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c
index 32d4edf..659c22d 100644
--- a/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c
+++ b/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c
@@ -26,7 +26,7 @@
* $FreeBSD$
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/socket.h>
#include <sys/wait.h>
@@ -41,13 +41,16 @@
#include <string.h>
#include <unistd.h>
+#define BIND_ATTEMPTS 10
#define LOOPS 500
+#define NUM_ATTEMPTS 1000
-volatile int quit;
+static volatile int quit;
static void
-child_died(int sig)
+child_died(int sig __unused)
{
+
quit = 1;
}
@@ -59,13 +62,12 @@ child_died(int sig)
* briefly before beginning (not 100% reliable, but a good start).
*/
int
-main(int argc, char *argv[])
+main(void)
{
struct sockaddr_in sin;
socklen_t size;
pid_t child;
- int fd1, fd2, fd3, i, s;
- int status;
+ int fd1, fd2, fd3, i, listen_port, s, status;
printf("1..2\n");
@@ -85,10 +87,22 @@ main(int argc, char *argv[])
sin.sin_len = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- sin.sin_port = htons(8080);
- if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) != 0)
- errx(-1, "bind: %s", strerror(errno));
+ srandomdev();
+
+ for (i = 0; i < BIND_ATTEMPTS; i++) {
+ /* Pick a random unprivileged port 1025-65535 */
+ listen_port = MAX((int)random() % 65535, 1025);
+ sin.sin_port = htons(listen_port);
+ if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0)
+ break;
+ warn("bind with %d failed", listen_port);
+ usleep(1000);
+ }
+ if (i >= BIND_ATTEMPTS) {
+ printf("Bail out!\n");
+ exit(1);
+ }
if (listen(s, -1) != 0)
errx(-1, "listen: %s", strerror(errno));
@@ -134,16 +148,20 @@ main(int argc, char *argv[])
errx(-1, "fork: %s", strerror(errno));
/*
- * Child process does 1000 connect's.
+ * Child process does `NUM_ATTEMPTS` connects.
*/
if (child == 0) {
+ close(fd1);
+ close(fd2);
+ close(s);
+
bzero(&sin, sizeof(sin));
sin.sin_len = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- sin.sin_port = htons(8080);
+ sin.sin_port = htons(listen_port);
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < NUM_ATTEMPTS; i++) {
s = socket(PF_INET, SOCK_STREAM, 0);
if (s == -1)
errx(-1, "socket: %s", strerror(errno));
@@ -152,7 +170,7 @@ main(int argc, char *argv[])
errx(-1, "connect: %s", strerror(errno));
close(s);
}
- exit(0);
+ _exit(0);
}
/* Reset back to a blocking socket. */
@@ -167,9 +185,9 @@ main(int argc, char *argv[])
errx(-1, "ioctl(F_GETFL): %s", strerror(errno));
if (i & O_NONBLOCK)
errx(-1, "Failed to clear O_NONBLOCK (i=0x%x)\n", i);
-
- /* Do 1000 accept's with an invalid pointer. */
- for (i = 0; !quit && i < 1000; i++) {
+
+ /* Do `NUM_ATTEMPTS` accepts with an invalid pointer. */
+ for (i = 0; !quit && i < NUM_ATTEMPTS; i++) {
size = sizeof(sin);
if (accept(s, (struct sockaddr *)(uintptr_t)(0x100),
&size) != -1)
@@ -182,7 +200,7 @@ main(int argc, char *argv[])
errx(-1, "waitpid: %s", strerror(errno));
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
warnx("child process died");
-
+
/*
* Allocate a file descriptor and make sure it's fd2+2. 2 because
* we allocate an fd for the socket.
diff --git a/tools/regression/sockets/accf_data_attach/Makefile b/tools/regression/sockets/accf_data_attach/Makefile
index 75ed46b..4d33728 100644
--- a/tools/regression/sockets/accf_data_attach/Makefile
+++ b/tools/regression/sockets/accf_data_attach/Makefile
@@ -4,8 +4,6 @@
PROG= accf_data_attach
MAN=
-
-accf_data_attach: accf_data_attach.c
- gcc -Wall -o accf_data_attach accf_data_attach.c
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/accf_data_attach/accf_data_attach.c b/tools/regression/sockets/accf_data_attach/accf_data_attach.c
index 369481e..59ea68c 100644
--- a/tools/regression/sockets/accf_data_attach/accf_data_attach.c
+++ b/tools/regression/sockets/accf_data_attach/accf_data_attach.c
@@ -58,7 +58,7 @@
* make sure it is removed.
*/
int
-main(int argc, char *argv[])
+main(void)
{
struct accept_filter_arg afa;
struct sockaddr_in sin;
diff --git a/tools/regression/sockets/fstat/Makefile b/tools/regression/sockets/fstat/Makefile
index 28282ca..a583166 100644
--- a/tools/regression/sockets/fstat/Makefile
+++ b/tools/regression/sockets/fstat/Makefile
@@ -4,6 +4,6 @@
PROG= fstat
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/fstat/fstat.c b/tools/regression/sockets/fstat/fstat.c
index 2534f78..6ea931d 100644
--- a/tools/regression/sockets/fstat/fstat.c
+++ b/tools/regression/sockets/fstat/fstat.c
@@ -57,7 +57,7 @@ dotest(int domain, int type, int protocol)
}
int
-main(int argc, char *argv[])
+main(void)
{
dotest(PF_INET, SOCK_DGRAM, 0);
diff --git a/tools/regression/sockets/kqueue/Makefile b/tools/regression/sockets/kqueue/Makefile
index e37eadf..6771d25 100644
--- a/tools/regression/sockets/kqueue/Makefile
+++ b/tools/regression/sockets/kqueue/Makefile
@@ -4,5 +4,6 @@
PROG= kqueue
MAN=
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/kqueue/kqueue.c b/tools/regression/sockets/kqueue/kqueue.c
index d46db96..f73704a 100644
--- a/tools/regression/sockets/kqueue/kqueue.c
+++ b/tools/regression/sockets/kqueue/kqueue.c
@@ -250,9 +250,9 @@ test_evfilt_write(int kq, int fd[2], const char *socktype)
* sockets, and confirm that we can register for various events on them.
*/
int
-main(int argc, char *argv[])
+main(void)
{
- int i, kq, sv[2];
+ int kq, sv[2];
printf("1..49\n");
diff --git a/tools/regression/sockets/listen_backlog/Makefile b/tools/regression/sockets/listen_backlog/Makefile
index c7171ec..e2eb135 100644
--- a/tools/regression/sockets/listen_backlog/Makefile
+++ b/tools/regression/sockets/listen_backlog/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PROG= listen_backlog
-WARNS?= 3
MAN=
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/listen_backlog/listen_backlog.c b/tools/regression/sockets/listen_backlog/listen_backlog.c
index be170ab..2276393 100644
--- a/tools/regression/sockets/listen_backlog/listen_backlog.c
+++ b/tools/regression/sockets/listen_backlog/listen_backlog.c
@@ -218,7 +218,8 @@ test_defaults(void)
* the first and second listen().
*/
static int
-socket_listen_update(int domain, int type, int protocol, int backlog,
+socket_listen_update(int domain __unused, int type __unused,
+ int protocol __unused, int backlog,
int update_backlog, int listen_backlog_assertion,
int update_backlog_assertion, int *sockp, const char *domainstring,
const char *typestring, const char *testclass, const char *test)
@@ -365,7 +366,7 @@ test_set_qlimit(void)
}
int
-main(int argc, char *argv[])
+main(void)
{
size_t len;
diff --git a/tools/regression/sockets/listenclose/Makefile b/tools/regression/sockets/listenclose/Makefile
index 1e146dc..8f4dc4e 100644
--- a/tools/regression/sockets/listenclose/Makefile
+++ b/tools/regression/sockets/listenclose/Makefile
@@ -4,6 +4,6 @@
PROG= listenclose
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/listenclose/listenclose.c b/tools/regression/sockets/listenclose/listenclose.c
index 425e39f..f920846 100644
--- a/tools/regression/sockets/listenclose/listenclose.c
+++ b/tools/regression/sockets/listenclose/listenclose.c
@@ -52,7 +52,7 @@
*/
int
-main(int argc, char *argv[])
+main(void)
{
int listen_sock, connect_sock;
struct sockaddr_in sin;
diff --git a/tools/regression/sockets/pr_atomic/Makefile b/tools/regression/sockets/pr_atomic/Makefile
index b7ed9a6..1dc85ff 100644
--- a/tools/regression/sockets/pr_atomic/Makefile
+++ b/tools/regression/sockets/pr_atomic/Makefile
@@ -2,6 +2,6 @@
PROG= pr_atomic
MAN=
-WARNS?= 3
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/pr_atomic/pr_atomic.c b/tools/regression/sockets/pr_atomic/pr_atomic.c
index 69bbac7..e902cf7 100644
--- a/tools/regression/sockets/pr_atomic/pr_atomic.c
+++ b/tools/regression/sockets/pr_atomic/pr_atomic.c
@@ -42,31 +42,31 @@
#include <errno.h>
#include <unistd.h>
-#define TEST_SOCKET "/tmp/test_socket"
+static char socket_path[] = "tmp.XXXXXX";
static jmp_buf myjmpbuf;
-void handle_sigalrm(int signo);
-
-void handle_sigalrm(int signo)
+static void handle_sigalrm(int signo __unused)
{
longjmp(myjmpbuf, 1);
}
int
-main(int argc, char *argv[])
+main(void)
{
struct sockaddr_un un;
pid_t pid;
int s;
+ if (mkstemp(socket_path) == -1)
+ err(1, "mkstemp");
s = socket(PF_LOCAL, SOCK_DGRAM, 0);
if (s == -1)
errx(-1, "socket");
memset(&un, 0, sizeof(un));
un.sun_family = AF_LOCAL;
- unlink(TEST_SOCKET);
- strcpy(un.sun_path, TEST_SOCKET);
+ unlink(socket_path);
+ strcpy(un.sun_path, socket_path);
if (bind(s, (struct sockaddr *)&un, sizeof(un)) == -1)
errx(-1, "bind");
pid = fork();
diff --git a/tools/regression/sockets/reconnect/Makefile b/tools/regression/sockets/reconnect/Makefile
index edd6b47..d8fa5e0 100644
--- a/tools/regression/sockets/reconnect/Makefile
+++ b/tools/regression/sockets/reconnect/Makefile
@@ -4,6 +4,6 @@
PROG= reconnect
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/reconnect/reconnect.c b/tools/regression/sockets/reconnect/reconnect.c
index 02922bf..27f32cc 100644
--- a/tools/regression/sockets/reconnect/reconnect.c
+++ b/tools/regression/sockets/reconnect/reconnect.c
@@ -45,12 +45,12 @@
#include <string.h>
#include <unistd.h>
-static char *uds_name1 = NULL;
-static char *uds_name2 = NULL;
+static char uds_name1[] = "reconnect.XXXXXXXX";
+static char uds_name2[] = "reconnect.XXXXXXXX";
#define sstosa(ss) ((struct sockaddr *)(ss))
-void
+static void
prepare_ifsun(struct sockaddr_un *ifsun, const char *path)
{
@@ -62,7 +62,7 @@ prepare_ifsun(struct sockaddr_un *ifsun, const char *path)
strcpy(ifsun->sun_path, path);
}
-int
+static int
create_uds_server(const char *path)
{
struct sockaddr_un ifsun;
@@ -82,7 +82,7 @@ create_uds_server(const char *path)
return sock;
}
-void
+static void
connect_uds_server(int sock, const char *path)
{
struct sockaddr_un ifsun;
@@ -95,14 +95,12 @@ connect_uds_server(int sock, const char *path)
err(1, "can't connect to a socket");
}
-void
+static void
cleanup(void)
{
- if (uds_name1 != NULL)
- unlink(uds_name1);
- if (uds_name2 != NULL)
- unlink(uds_name2);
+ unlink(uds_name1);
+ unlink(uds_name2);
}
int
@@ -112,20 +110,14 @@ main()
atexit(cleanup);
- uds_name1 = strdup("/tmp/reconnect.XXXXXX");
- if (uds_name1 == NULL)
- err(1, "can't allocate memory");
- uds_name1 = mktemp(uds_name1);
- if (uds_name1 == NULL)
- err(1, "mktemp(3) failed");
+ if (mkstemp(uds_name1) == -1)
+ err(1, "mkstemp");
+ unlink(uds_name1);
s_sock1 = create_uds_server(uds_name1);
- uds_name2 = strdup("/tmp/reconnect.XXXXXX");
- if (uds_name2 == NULL)
- err(1, "can't allocate memory");
- uds_name2 = mktemp(uds_name2);
- if (uds_name2 == NULL)
- err(1, "mktemp(3) failed");
+ if (mkstemp(uds_name2) == -1)
+ err(1, "mkstemp");
+ unlink(uds_name2);
s_sock2 = create_uds_server(uds_name2);
c_sock = socket(PF_LOCAL, SOCK_DGRAM, 0);
diff --git a/tools/regression/sockets/rtsocket/Makefile b/tools/regression/sockets/rtsocket/Makefile
index 13a1238..f68b6c3 100644
--- a/tools/regression/sockets/rtsocket/Makefile
+++ b/tools/regression/sockets/rtsocket/Makefile
@@ -2,6 +2,6 @@
PROG= rtsocket
MAN=
-WARNS?= 3
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/rtsocket/rtsocket.c b/tools/regression/sockets/rtsocket/rtsocket.c
index 6a0738b..b5824b3 100644
--- a/tools/regression/sockets/rtsocket/rtsocket.c
+++ b/tools/regression/sockets/rtsocket/rtsocket.c
@@ -41,7 +41,7 @@
#include <unistd.h>
int
-main(int argc, char *argv[])
+main(void)
{
int sock, socks[2];
diff --git a/tools/regression/sockets/sblock/Makefile b/tools/regression/sockets/sblock/Makefile
index af8d0e4..aa2f890 100644
--- a/tools/regression/sockets/sblock/Makefile
+++ b/tools/regression/sockets/sblock/Makefile
@@ -4,6 +4,6 @@
PROG= sblock
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/sblock/sblock.c b/tools/regression/sockets/sblock/sblock.c
index a9f9518..415c4d4 100644
--- a/tools/regression/sockets/sblock/sblock.c
+++ b/tools/regression/sockets/sblock/sblock.c
@@ -54,7 +54,7 @@
static int interrupted;
static void
-signal_handler(int signum)
+signal_handler(int signum __unused)
{
interrupted++;
@@ -95,7 +95,7 @@ locking_recver(int fd)
ssize_t len;
char ch;
- if (sleep(1) < 0)
+ if (sleep(1) != 0)
err(-1, "FAIL: locking_recver: sleep");
len = recv(fd, &ch, sizeof(ch), 0);
if (len < 0 && errno != EINTR)
@@ -116,7 +116,7 @@ signaller(pid_t locking_recver_pid, int fd)
ssize_t len;
char ch;
- if (sleep(2) < 0) {
+ if (sleep(2) != 0) {
warn("signaller sleep(2)");
return;
}
@@ -124,7 +124,7 @@ signaller(pid_t locking_recver_pid, int fd)
warn("signaller kill(%d)", locking_recver_pid);
return;
}
- if (sleep(1) < 0) {
+ if (sleep(1) != 0) {
warn("signaller sleep(1)");
return;
}
@@ -141,14 +141,14 @@ signaller(pid_t locking_recver_pid, int fd)
warn("signaller close");
return;
}
- if (sleep(1) < 0) {
+ if (sleep(1) != 0) {
warn("signaller sleep(1)");
return;
}
}
int
-main(int argc, char *argv[])
+main(void)
{
int error, fds[2], recver_fd, sender_fd;
pid_t blocking_recver_pid;
diff --git a/tools/regression/sockets/sendfile/sendfile.c b/tools/regression/sockets/sendfile/sendfile.c
index 73033d7..18ae9ad 100644
--- a/tools/regression/sockets/sendfile/sendfile.c
+++ b/tools/regression/sockets/sendfile/sendfile.c
@@ -452,8 +452,8 @@ run_parent(void)
static void
cleanup(void)
{
- if (*path != '\0')
- unlink(path);
+
+ unlink(path);
}
int
@@ -461,12 +461,12 @@ main(int argc, char *argv[])
{
int pagesize;
- *path = '\0';
+ path[0] = '\0';
pagesize = getpagesize();
if (argc == 1) {
- snprintf(path, PATH_MAX, "/tmp/sendfile.XXXXXXXXXXXX");
+ snprintf(path, sizeof(path), "sendfile.XXXXXXXXXXXX");
file_fd = mkstemp(path);
if (file_fd == -1)
FAIL_ERR("mkstemp");
diff --git a/tools/regression/sockets/shutdown/Makefile b/tools/regression/sockets/shutdown/Makefile
index 07ba65d..63045f5 100644
--- a/tools/regression/sockets/shutdown/Makefile
+++ b/tools/regression/sockets/shutdown/Makefile
@@ -4,6 +4,6 @@
PROG= shutdown
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/shutdown/shutdown.c b/tools/regression/sockets/shutdown/shutdown.c
index c4e884d..3d23c94 100644
--- a/tools/regression/sockets/shutdown/shutdown.c
+++ b/tools/regression/sockets/shutdown/shutdown.c
@@ -45,6 +45,8 @@ main(void)
int listen_sock, connect_sock;
u_short port;
+ listen_sock = -1;
+
/* Shutdown(2) on an invalid file descriptor has to return EBADF. */
if ((shutdown(listen_sock, SHUT_RDWR) != -1) && (errno != EBADF))
errx(-1, "shutdown() for invalid file descriptor does not "
diff --git a/tools/regression/sockets/sigpipe/Makefile b/tools/regression/sockets/sigpipe/Makefile
index 030703e..5116701 100644
--- a/tools/regression/sockets/sigpipe/Makefile
+++ b/tools/regression/sockets/sigpipe/Makefile
@@ -4,6 +4,6 @@
PROG= sigpipe
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/sigpipe/sigpipe.c b/tools/regression/sockets/sigpipe/sigpipe.c
index 641536a..894d9de 100644
--- a/tools/regression/sockets/sigpipe/sigpipe.c
+++ b/tools/regression/sockets/sigpipe/sigpipe.c
@@ -69,7 +69,7 @@ got_signal(void)
}
static void
-signal_handler(int signum)
+signal_handler(int signum __unused)
{
signaled = 1;
diff --git a/tools/regression/sockets/so_setfib/Makefile b/tools/regression/sockets/so_setfib/Makefile
index fc12745..90111fb 100644
--- a/tools/regression/sockets/so_setfib/Makefile
+++ b/tools/regression/sockets/so_setfib/Makefile
@@ -1,14 +1,16 @@
# $FreeBSD$
+.include <src.opts.mk>
+
PROG= so_setfib
MAN=
WARNS?= 6
-.ifdef INET6
-CFLAGS+= -DINET6
-.endif
-.ifdef INET
+.if ${MK_INET} != "no"
CFLAGS+= -DINET
.endif
+.if ${MK_INET6} != "no"
+CFLAGS+= -DINET6
+.endif
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/so_setfib/so_setfib.c b/tools/regression/sockets/so_setfib/so_setfib.c
index 3c07852..50cb020 100644
--- a/tools/regression/sockets/so_setfib/so_setfib.c
+++ b/tools/regression/sockets/so_setfib/so_setfib.c
@@ -45,6 +45,7 @@
* 5. Repeat for next domain family and type from (2) on.
*/
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
@@ -143,6 +144,7 @@ t(u_int dom, u_int type)
if (s == -1) {
printf("not ok %d %s_%s # socket(): %s\n", testno,
t_dom[dom].name, t_type[type].name, strerror(errno));
+ testno++;
return;
}
@@ -168,6 +170,11 @@ main(int argc __unused, char *argv[] __unused)
u_int i, j;
size_t s;
+ if (geteuid() != 0) {
+ printf("1..0 # SKIP: must be root");
+ return (0);
+ }
+
/* Initalize randomness. */
srandomdev();
@@ -175,6 +182,10 @@ main(int argc __unused, char *argv[] __unused)
s = sizeof(rt_numfibs);
if (sysctlbyname("net.fibs", &rt_numfibs, &s, NULL, 0) == -1)
err(1, "sysctlbyname(net.fibs, ..)");
+
+ printf("1..%lu\n",
+ (nitems(t_dom) - 1) * nitems(t_type) * (2 + rt_numfibs + 2 + 3));
+
/* Adjust from number to index. */
rt_numfibs -= 1;
diff --git a/tools/regression/sockets/so_setfib/so_setfib.t b/tools/regression/sockets/so_setfib/so_setfib.t
deleted file mode 100644
index c80c173..0000000
--- a/tools/regression/sockets/so_setfib/so_setfib.t
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-#-
-# Copyright (c) 2012 Cisco Systems, Inc.
-# All rights reserved.
-#
-# This software was developed by Bjoern Zeeb under contract to
-# Cisco Systems, Inc..
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD$
-#
-
-cd `dirname $0`
-
-EXECUTABLE=`basename $0 .t`
-
-FIBS=`sysctl -n net.fibs`
-INET=`sysctl -n kern.features.inet`
-INET6=`sysctl -n kern.features.inet6`
-
-case "${INET}" in
-1) OPTS="${OPTS} -DINET" ;;
-*) INET=0 ;;
-esac
-case "${INET6}" in
-1) OPTS="${OPTS} -DINET6" ;;
-*) INET6=0 ;;
-esac
-
-make ${EXECUTABLE} ${OPTS} 2>&1 > /dev/null
-
-# two out of bounds on each side + 3 random
-FIBS=$((2 + FIBS + 2 + 3))
-# ROUTE and LOCAL are 1 domain together given 2 or 1 types only
-TESTS=$(((1 + ${INET} + ${INET6}) * 3 * ${FIBS}))
-
-echo "1..${TESTS}"
-
-exec ./${EXECUTABLE}
diff --git a/tools/regression/sockets/socketpair/Makefile b/tools/regression/sockets/socketpair/Makefile
index ae71b17..ed66e3c 100644
--- a/tools/regression/sockets/socketpair/Makefile
+++ b/tools/regression/sockets/socketpair/Makefile
@@ -4,6 +4,6 @@
PROG= socketpair
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/socketpair/socketpair.c b/tools/regression/sockets/socketpair/socketpair.c
index 5f46476..779878a 100644
--- a/tools/regression/sockets/socketpair/socketpair.c
+++ b/tools/regression/sockets/socketpair/socketpair.c
@@ -47,7 +47,7 @@
* right places.
*/
int
-main(int argc, char *argv[])
+main(void)
{
int fd1, fd2, fd3;
int sv[2];
diff --git a/tools/regression/sockets/unix_bindconnect/Makefile b/tools/regression/sockets/unix_bindconnect/Makefile
index 2c4edfd..52cc844 100644
--- a/tools/regression/sockets/unix_bindconnect/Makefile
+++ b/tools/regression/sockets/unix_bindconnect/Makefile
@@ -2,6 +2,6 @@
PROG= unix_bindconnect
MAN=
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c b/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c
index 7db82a0..079dc4d 100644
--- a/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c
+++ b/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c
@@ -54,8 +54,8 @@
#define UNWIND_MAX 1024
-int unwind_len;
-struct unwind {
+static int unwind_len;
+static struct unwind {
char u_path[PATH_MAX];
} unwind_list[UNWIND_MAX];
@@ -105,7 +105,7 @@ bind_test(const char *directory_path)
sun.sun_len = sizeof(sun);
sun.sun_family = AF_UNIX;
if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path)
- >= sizeof(sun.sun_path)) {
+ >= (int)sizeof(sun.sun_path)) {
warn("bind_test: snprintf(sun.sun_path)");
close(sock1);
return (-1);
@@ -216,7 +216,7 @@ connect_test(const char *directory_path)
sun.sun_len = sizeof(sun);
sun.sun_family = AF_UNIX;
if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path)
- >= sizeof(sun.sun_path)) {
+ >= (int)sizeof(sun.sun_path)) {
warn("connect_test: snprintf(sun.sun_path)");
close(sock1);
return (-1);
@@ -298,7 +298,7 @@ connect_test(const char *directory_path)
return (0);
}
int
-main(int argc, char *argv[])
+main(void)
{
char directory_path[PATH_MAX];
int error;
diff --git a/tools/regression/sockets/unix_close_race/Makefile b/tools/regression/sockets/unix_close_race/Makefile
index 8b9f792..370adc4 100644
--- a/tools/regression/sockets/unix_close_race/Makefile
+++ b/tools/regression/sockets/unix_close_race/Makefile
@@ -2,6 +2,6 @@
PROG= unix_close_race
MAN=
-WARNS?= 3
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/unix_close_race/unix_close_race.c b/tools/regression/sockets/unix_close_race/unix_close_race.c
index 97783e3..89c1b20 100644
--- a/tools/regression/sockets/unix_close_race/unix_close_race.c
+++ b/tools/regression/sockets/unix_close_race/unix_close_race.c
@@ -54,12 +54,13 @@
#include <unistd.h>
#include <err.h>
-#define UNIXSTR_PATH "/tmp/mytest.socket"
+static char socket_path[] = "tmp.XXXXXXXX";
+
#define USLEEP 100
#define LOOPS 100000
int
-main(int argc, char **argv)
+main(void)
{
struct sockaddr_un servaddr;
int listenfd, connfd, pid;
@@ -74,16 +75,20 @@ main(int argc, char **argv)
if (ncpus < 2)
warnx("SMP not present, test may be unable to trigger race");
+ if (mkstemp(socket_path) == -1)
+ err(1, "mkstemp failed");
+ unlink(socket_path);
+
/*
* Create a UNIX domain socket that the child will repeatedly
* accept() from, and that the parent will repeatedly connect() to.
*/
if ((listenfd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0)
err(1, "parent: socket error");
- (void)unlink(UNIXSTR_PATH);
+ (void)unlink(socket_path);
bzero(&servaddr, sizeof(servaddr));
servaddr.sun_family = AF_LOCAL;
- strcpy(servaddr.sun_path, UNIXSTR_PATH);
+ strcpy(servaddr.sun_path, socket_path);
if (bind(listenfd, (struct sockaddr *) &servaddr,
sizeof(servaddr)) < 0)
err(1, "parent: bind error");
@@ -102,7 +107,7 @@ main(int argc, char **argv)
sleep(1);
bzero(&servaddr, sizeof(servaddr));
servaddr.sun_family = AF_LOCAL;
- strcpy(servaddr.sun_path, UNIXSTR_PATH);
+ strcpy(servaddr.sun_path, socket_path);
for (counter = 0; counter < LOOPS; counter++) {
if ((connfd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) {
(void)kill(pid, SIGTERM);
diff --git a/tools/regression/sockets/unix_passfd/Makefile b/tools/regression/sockets/unix_passfd/Makefile
index 77c6b03..600b7b1 100644
--- a/tools/regression/sockets/unix_passfd/Makefile
+++ b/tools/regression/sockets/unix_passfd/Makefile
@@ -2,6 +2,6 @@
PROG= unix_passfd
MAN=
-WARNS?= 2
+WARNS?= 3
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/unix_passfd/unix_passfd.c b/tools/regression/sockets/unix_passfd/unix_passfd.c
index cc0acaa..07ef589 100644
--- a/tools/regression/sockets/unix_passfd/unix_passfd.c
+++ b/tools/regression/sockets/unix_passfd/unix_passfd.c
@@ -139,7 +139,7 @@ sendfd_payload(const char *test, int sockfd, int sendfd,
len = sendmsg(sockfd, &msghdr, 0);
if (len < 0)
err(-1, "%s: sendmsg", test);
- if (len != paylen)
+ if ((size_t)len != paylen)
errx(-1, "%s: sendmsg: %zd bytes sent", test, len);
}
@@ -175,7 +175,7 @@ recvfd_payload(const char *test, int sockfd, int *recvfd,
len = recvmsg(sockfd, &msghdr, 0);
if (len < 0)
err(-1, "%s: recvmsg", test);
- if (len != buflen)
+ if ((size_t)len != buflen)
errx(-1, "%s: recvmsg: %zd bytes received", test, len);
cmsghdr = CMSG_FIRSTHDR(&msghdr);
@@ -205,7 +205,7 @@ recvfd(const char *test, int sockfd, int *recvfd)
}
int
-main(int argc, char *argv[])
+main(void)
{
struct stat putfd_1_stat, putfd_2_stat, getfd_1_stat, getfd_2_stat;
int fd[2], putfd_1, putfd_2, getfd_1, getfd_2;
@@ -354,7 +354,7 @@ main(int argc, char *argv[])
* payload. Payload + SCM_RIGHTS + LOCAL_CREDS hit socket buffer
* limit, and receiver receives truncated data.
*/
- test = "test8-rigths+creds+payload";
+ test = "test8-rights+creds+payload";
printf("beginning %s\n", test);
{
diff --git a/tools/regression/sockets/unix_sendtorace/Makefile b/tools/regression/sockets/unix_sendtorace/Makefile
index 0b18376..75e7b9f 100644
--- a/tools/regression/sockets/unix_sendtorace/Makefile
+++ b/tools/regression/sockets/unix_sendtorace/Makefile
@@ -2,6 +2,6 @@
PROG= unix_sendtorace
MAN=
-WARNS?= 3
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c b/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c
index 2445b81..9fd748d 100644
--- a/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c
+++ b/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c
@@ -45,9 +45,10 @@
#include <string.h>
#include <unistd.h>
-#define PATH "/tmp/123"
#define ITERATIONS 1000000
+static char socket_path[] = "tmp.XXXXXX";
+
static void
stream_server(int listenfd)
{
@@ -75,7 +76,7 @@ stream_client(void)
bzero(&sun, sizeof(sun));
sun.sun_len = sizeof(sun);
sun.sun_family = AF_UNIX;
- strcpy(sun.sun_path, PATH);
+ strcpy(sun.sun_path, socket_path);
for (i = 0; i < ITERATIONS; i++) {
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
@@ -104,7 +105,7 @@ stream_test(void)
bzero(&sun, sizeof(sun));
sun.sun_len = sizeof(sun);
sun.sun_family = AF_UNIX;
- strcpy(sun.sun_path, PATH);
+ strcpy(sun.sun_path, socket_path);
if (bind(listenfd, (struct sockaddr *)&sun, sizeof(sun)) < 0)
err(-1, "stream_test: bind");
@@ -124,7 +125,7 @@ stream_test(void)
} else
stream_server(listenfd);
- (void)unlink(PATH);
+ (void)unlink(socket_path);
}
static void
@@ -151,7 +152,7 @@ datagram_client(void)
bzero(&sun, sizeof(sun));
sun.sun_len = sizeof(sun);
sun.sun_family = AF_UNIX;
- strcpy(sun.sun_path, PATH);
+ strcpy(sun.sun_path, socket_path);
for (i = 0; i < ITERATIONS; i++) {
fd = socket(PF_UNIX, SOCK_DGRAM, 0);
if (fd < 0) {
@@ -180,7 +181,7 @@ datagram_test(void)
bzero(&sun, sizeof(sun));
sun.sun_len = sizeof(sun);
sun.sun_family = AF_UNIX;
- strcpy(sun.sun_path, PATH);
+ strcpy(sun.sun_path, socket_path);
if (bind(serverfd, (struct sockaddr *)&sun, sizeof(sun)) < 0)
err(-1, "datagram_test: bind");
@@ -197,14 +198,16 @@ datagram_test(void)
} else
datagram_server(serverfd);
- (void)unlink(PATH);
+ (void)unlink(socket_path);
}
int
-main(int argc, char *argv[])
+main(void)
{
-
- (void)unlink(PATH);
+
+ if (mkstemp(socket_path) == -1)
+ err(1, "mkstemp failed");
+ (void)unlink(socket_path);
datagram_test();
if (0)
stream_test();
diff --git a/tools/regression/sockets/unix_socket/Makefile b/tools/regression/sockets/unix_socket/Makefile
index 40f6b92..bb60456 100644
--- a/tools/regression/sockets/unix_socket/Makefile
+++ b/tools/regression/sockets/unix_socket/Makefile
@@ -2,6 +2,6 @@
PROG= unix_socket
MAN=
-WARNS?= 3
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/unix_socket/unix_socket.c b/tools/regression/sockets/unix_socket/unix_socket.c
index 24b6baf..085366f 100644
--- a/tools/regression/sockets/unix_socket/unix_socket.c
+++ b/tools/regression/sockets/unix_socket/unix_socket.c
@@ -40,7 +40,7 @@
#include <unistd.h>
int
-main(int argc, char *argv[])
+main(void)
{
int sock, socks[2];
diff --git a/tools/regression/sockets/unix_sorflush/Makefile b/tools/regression/sockets/unix_sorflush/Makefile
index 237eb3d..db0aa6a 100644
--- a/tools/regression/sockets/unix_sorflush/Makefile
+++ b/tools/regression/sockets/unix_sorflush/Makefile
@@ -2,6 +2,6 @@
PROG= unix_sorflush
MAN=
-WARNS?= 3
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/tools/regression/sockets/unix_sorflush/unix_sorflush.c b/tools/regression/sockets/unix_sorflush/unix_sorflush.c
index 126de2f..e0deb00 100644
--- a/tools/regression/sockets/unix_sorflush/unix_sorflush.c
+++ b/tools/regression/sockets/unix_sorflush/unix_sorflush.c
@@ -68,7 +68,7 @@ shutdown_and_exit(int s)
}
int
-main(int argc, char *argv[])
+main(void)
{
pid_t pida, pidb;
int sv[2];
diff --git a/tools/regression/sockets/zerosend/zerosend.c b/tools/regression/sockets/zerosend/zerosend.c
index a42ec51..1f3217a 100644
--- a/tools/regression/sockets/zerosend/zerosend.c
+++ b/tools/regression/sockets/zerosend/zerosend.c
@@ -209,12 +209,12 @@ setup_pipe(const char *test, int *fdp)
static void
setup_fifo(const char *test, int *fdp)
{
- char path[PATH_MAX];
+ char path[] = "0send_fifo.XXXXXXX";
int fd1, fd2;
- strcpy(path, "/tmp/0send_fifo.XXXXXXX");
- if (mktemp(path) == NULL)
+ if (mkstemp(path) == -1)
err(-1, "%s: setup_fifo: mktemp", test);
+ unlink(path);
if (mkfifo(path, 0600) < 0)
err(-1, "%s: setup_fifo: mkfifo(%s)", test, path);
diff --git a/tools/regression/sysvshm/shmtest.c b/tools/regression/sysvshm/shmtest.c
index 7c61545..c3e5962 100644
--- a/tools/regression/sysvshm/shmtest.c
+++ b/tools/regression/sysvshm/shmtest.c
@@ -49,27 +49,22 @@
#include <time.h>
#include <unistd.h>
-int main __P((int, char *[]));
-void print_shmid_ds __P((struct shmid_ds *, mode_t));
-void sigsys_handler __P((int));
-void sigchld_handler __P((int));
-void cleanup __P((void));
-void receiver __P((void));
-void usage __P((void));
+static void print_shmid_ds(struct shmid_ds *, mode_t);
+static void sigsys_handler(int);
+static void sigchld_handler(int);
+static void cleanup(void);
+static void receiver(void);
+static void usage(void);
-const char *m_str = "The quick brown fox jumped over the lazy dog.";
+static const char *m_str = "The quick brown fox jumped over the lazy dog.";
-int sender_shmid = -1;
-pid_t child_pid;
-
-key_t shmkey;
-
-size_t pgsize;
+static int sender_shmid = -1;
+static pid_t child_pid;
+static key_t shmkey;
+static size_t pgsize;
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct sigaction sa;
struct shmid_ds s_ds;
@@ -172,17 +167,15 @@ main(argc, argv)
errx(1, "sender: received unexpected signal");
}
-void
-sigsys_handler(signo)
- int signo;
+static void
+sigsys_handler(int signo __unused)
{
errx(1, "System V Shared Memory support is not present in the kernel");
}
-void
-sigchld_handler(signo)
- int signo;
+static void
+sigchld_handler(int signo __unused)
{
struct shmid_ds s_ds;
int cstatus;
@@ -214,8 +207,8 @@ sigchld_handler(signo)
exit(0);
}
-void
-cleanup()
+static void
+cleanup(void)
{
/*
@@ -227,10 +220,8 @@ cleanup()
}
}
-void
-print_shmid_ds(sp, mode)
- struct shmid_ds *sp;
- mode_t mode;
+static void
+print_shmid_ds(struct shmid_ds *sp, mode_t mode)
{
uid_t uid = geteuid();
gid_t gid = getegid();
@@ -262,16 +253,16 @@ print_shmid_ds(sp, mode)
errx(1, "mode mismatch");
}
-void
-usage()
+static void
+usage(void)
{
fprintf(stderr, "usage: %s keypath\n", getprogname());
exit(1);
}
-void
-receiver()
+static void
+receiver(void)
{
int shmid;
void *shm_buf;
diff --git a/tools/regression/usr.bin/env/regress-env.rgdata b/tools/regression/usr.bin/env/regress-env.rgdata
index 9f562e9..90c296e 100644
--- a/tools/regression/usr.bin/env/regress-env.rgdata
+++ b/tools/regression/usr.bin/env/regress-env.rgdata
@@ -235,9 +235,9 @@ gblenv=OUTSIDEVAR=OutsideValue
script:/bin/echo "=== set ==="
script:# drop some environment variables that 'sh' itself sets, and
script:# then have 'set' print out all remaining environment variables.
- script:# (can't unset OPTIND, so we use grep to get rid of that)
- script:unset -v IFS PS1 PS2 PPID
- script:set | grep -v '^OPTIND=' | sort
+ script:# (can't unset OPTIND/PWD, so we use grep to get rid of those)
+ script:unset -v IFS PS1 PS2 PS4 PPID
+ script:set | grep -Ev '^(OPTIND|PWD)=' | sort
stdout:=== set ===
stdout:PATH=/bin:/usr/bin:/Not
stdout:TESTVAR=SbValue
@@ -382,3 +382,36 @@ gblenv=OUTSIDEVAR=OutsideValue
setenv:D=D_ThisisAlongstring_D1
stdout:A_ThisisAlongstring_A1 B_ThisisAlongstring_B1 C_ThisisAlongstring_C1 D_ThisisAlongstring_D1 ScriptName: [%-script.pathname-%]
[run]
+
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -S '\c' >/dev/null
+[run]
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -S'\c' >/dev/null
+[run]
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -u foo -S '\c' >/dev/null
+[run]
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -u foo -S'\c' >/dev/null
+[run]
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -S '-u bar \c' >/dev/null
+[run]
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -S'-u bar \c' >/dev/null
+[run]
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -u foo -S '-u bar \c' >/dev/null
+[run]
+[test]
+ sb_args:sh
+ script:[%-testpgm.pathname-%] -u foo -S'-u bar \c' >/dev/null
+[run]
diff --git a/tools/regression/usr.bin/env/regress-sb.rb b/tools/regression/usr.bin/env/regress-sb.rb
index f6333aa..b43ddd3 100644
--- a/tools/regression/usr.bin/env/regress-sb.rb
+++ b/tools/regression/usr.bin/env/regress-sb.rb
@@ -346,6 +346,7 @@ class RGTestOptions
# "just anything" that matches the general pattern. There are
# no blanks in the recognized values, but I use an x-tended
# regexp and then add blanks to make it more readable.
+ optval.gsub!(/\[%- testpgm\.pathname -%\]/x, $testpgm)
optval.gsub!(/\[%- testpgm\.basename -%\]/x, File.basename($testpgm))
optval.gsub!(/\[%- script\.pathname -%\]/x, $scriptfile)
diff --git a/tools/test/README b/tools/test/README
index eda43ea..22e8e74 100644
--- a/tools/test/README
+++ b/tools/test/README
@@ -8,7 +8,6 @@ and try to break it and/or measuring performance on it.
Please make a subdir per program, and add a brief description to this file.
devrandom Programs to test /dev/*random.
-dtrace DTrace test suite
malloc A program to test and benchmark malloc().
netfibs Programs to test multi-FIB network stacks.
posixshm A program to test POSIX shared memory.
diff --git a/tools/test/dtrace/Makefile b/tools/test/dtrace/Makefile
deleted file mode 100644
index 405d536..0000000
--- a/tools/test/dtrace/Makefile
+++ /dev/null
@@ -1,394 +0,0 @@
-# $FreeBSD$
-
-TESTSRCDIR= ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/dtrace/test
-CFLAGS+= -w
-DTEST= ${TESTSRCDIR}/cmd/scripts/dtest.pl -n
-
-IGNORE= \
- ${TESTSRCDIR}/tst/common/aggs/tst.subr.d \
- ${TESTSRCDIR}/tst/common/buffering/tst.cputime.ksh \
- ${TESTSRCDIR}/tst/common/buffering/tst.ring3.d \
- ${TESTSRCDIR}/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d \
- ${TESTSRCDIR}/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d\
- ${TESTSRCDIR}/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d\
- ${TESTSRCDIR}/tst/common/cpc/err.cpcvscpustatpart1.ksh \
- ${TESTSRCDIR}/tst/common/cpc/err.cpcvscpustatpart2.ksh \
- ${TESTSRCDIR}/tst/common/cpc/err.cputrackfailtostart.ksh \
- ${TESTSRCDIR}/tst/common/cpc/err.cputrackterminates.ksh \
- ${TESTSRCDIR}/tst/common/cpc/err.toomanyenablings.d \
- ${TESTSRCDIR}/tst/common/cpc/tst.allcpus.ksh \
- ${TESTSRCDIR}/tst/common/cpc/tst.genericevent.d \
- ${TESTSRCDIR}/tst/common/cpc/tst.platformevent.ksh \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithFunctions \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithModules \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithNames \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithProviders \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceFunctions \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceModule \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceNames \
- ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceProvider \
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidModule3.d.ksh \
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidProvider3.d.ksh \
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidTraceFunc7.d.ksh \
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidTraceModule6.d.ksh\
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidTraceProvider4.d.ksh\
- ${TESTSRCDIR}/tst/common/funcs/tst.bcopy.d \
- ${TESTSRCDIR}/tst/common/funcs/tst.copyin.d \
- ${TESTSRCDIR}/tst/common/funcs/tst.copyinto.d \
- ${TESTSRCDIR}/tst/common/funcs/tst.ddi_pathname.d \
- ${TESTSRCDIR}/tst/common/funcs/tst.index.d \
- ${TESTSRCDIR}/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d \
- ${TESTSRCDIR}/tst/common/inline/tst.InlineTypedef.d \
- ${TESTSRCDIR}/tst/common/io/tst.fds.c \
- ${TESTSRCDIR}/tst/common/java_api/tst.FunctionLookup.c \
- ${TESTSRCDIR}/tst/common/java_api/tst.ProbeData.c \
- ${TESTSRCDIR}/common/misc/tst.include.ksh \
- ${TESTSRCDIR}/tst/common/misc/tst.roch.d \
- ${TESTSRCDIR}/tst/common/nfs/tst.call.c \
- ${TESTSRCDIR}/tst/common/nfs/tst.call.d \
- ${TESTSRCDIR}/tst/common/nfs/tst.call3.c \
- ${TESTSRCDIR}/tst/common/nfs/tst.call3.d \
- ${TESTSRCDIR}/tst/common/offsetof/err.D_OFFSETOF_BITFIELD.bitfield.d\
- ${TESTSRCDIR}/tst/common/pointers/err.D_OP_LVAL.AddressChange.d \
- ${TESTSRCDIR}/tst/common/pointers/tst.GlobalVar.d \
- ${TESTSRCDIR}/tst/common/pointers/tst.basic1.d \
- ${TESTSRCDIR}/tst/common/pointers/tst.basic2.d \
- ${TESTSRCDIR}/tst/common/predicates/tst.argsnotcached.d \
- ${TESTSRCDIR}/tst/common/privs/tst.func_access.ksh \
- ${TESTSRCDIR}/tst/common/privs/tst.op_access.ksh \
- ${TESTSRCDIR}/tst/common/proc/tst.discard.ksh \
- ${TESTSRCDIR}/tst/common/proc/tst.signal.ksh \
- ${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh \
- ${TESTSRCDIR}/tst/common/scalars/tst.misc.d \
- ${TESTSRCDIR}/tst/common/scalars/tst.selfarray2.d \
- ${TESTSRCDIR}/tst/common/sysevent/tst.post.c \
- ${TESTSRCDIR}/tst/common/sysevent/tst.post.d \
- ${TESTSRCDIR}/tst/common/sysevent/tst.post_chan.c \
- ${TESTSRCDIR}/tst/common/sysevent/tst.post_chan.d \
- ${TESTSRCDIR}/tst/common/trace/tst.misc.d \
- ${TESTSRCDIR}/tst/common/tracemem/err.D_TRACEMEM_ADDR.badaddr.d \
- ${TESTSRCDIR}/tst/common/tracemem/tst.rootvp.d \
- ${TESTSRCDIR}/tst/common/translators/tst.ProcModelTrans.d \
- ${TESTSRCDIR}/tst/common/types/err.D_XLATE_REDECL.ResultDynType.d\
- ${TESTSRCDIR}/tst/common/types/tst.ptrops.d \
- ${TESTSRCDIR}/tst/common/types/tst.struct.d \
- ${TESTSRCDIR}/tst/common/types/tst.typedef.d \
- ${TESTSRCDIR}/tst/common/vars/tst.ucaller.ksh \
- ${TESTSRCDIR}/tst/common/vars/tst.walltimestamp.d \
- ${TESTSRCDIR}/tst/common/usdt/tst.argmap.c \
- ${TESTSRCDIR}/tst/common/usdt/tst.args.c \
- ${TESTSRCDIR}/tst/common/usdt/tst.forker.c \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv4localtcp.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv4localudp.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv4remotetcp.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv4remoteudp.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.localtcpstate.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.remotetcpstate.ksh \
- ${TESTSRCDIR}/tst/common/scripting/tst.projid.ksh \
- ${TESTSRCDIR}/tst/common/scripting/tst.taskid.ksh \
- ${TESTSRCDIR}/tst/common/json/tst.usdt.c
-
-
-
-NOTWORK+= \
- ${TESTSRCDIR}/tst/common/io/tst.fds.d \
- ${TESTSRCDIR}/tst/common/java_api/tst.Abort.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.Bean.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.Close.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.Drop.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.Enable.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.FunctionLookup.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.GetAggregate.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.MaxConsumers.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.MultiAggPrinta.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.ProbeData.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.ProbeDescription.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.StateMachine.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.StopLock.ksh \
- ${TESTSRCDIR}/tst/common/java_api/tst.printa.d \
- ${TESTSRCDIR}/tst/common/lexer/err.D_CHR_NL.char.d \
- ${TESTSRCDIR}/tst/common/lexer/err.D_STR_NL.string.d \
- ${TESTSRCDIR}/tst/common/mdb/tst.dtracedcmd.ksh \
- ${TESTSRCDIR}/tst/common/mib/tst.icmp.ksh \
- ${TESTSRCDIR}/tst/common/mib/tst.tcp.ksh \
- ${TESTSRCDIR}/tst/common/mib/tst.udp.ksh \
- ${TESTSRCDIR}/tst/common/profile-n/tst.func.ksh \
- ${TESTSRCDIR}/tst/common/profile-n/tst.mod.ksh \
- ${TESTSRCDIR}/tst/common/profile-n/tst.sym.ksh \
- ${TESTSRCDIR}/tst/common/safety/tst.basename.d \
- ${TESTSRCDIR}/tst/common/safety/tst.caller.d \
- ${TESTSRCDIR}/tst/common/safety/tst.cleanpath.d \
- ${TESTSRCDIR}/tst/common/safety/tst.copyin.d \
- ${TESTSRCDIR}/tst/common/safety/tst.copyin2.d \
- ${TESTSRCDIR}/tst/common/safety/tst.ddi_pathname.d \
- ${TESTSRCDIR}/tst/common/safety/tst.dirname.d \
- ${TESTSRCDIR}/tst/common/safety/tst.errno.d \
- ${TESTSRCDIR}/tst/common/safety/tst.execname.d \
- ${TESTSRCDIR}/tst/common/safety/tst.gid.d \
- ${TESTSRCDIR}/tst/common/safety/tst.hton.d \
- ${TESTSRCDIR}/tst/common/safety/tst.index.d \
- ${TESTSRCDIR}/tst/common/safety/tst.msgdsize.d \
- ${TESTSRCDIR}/tst/common/safety/tst.msgsize.d \
- ${TESTSRCDIR}/tst/common/safety/tst.null.d \
- ${TESTSRCDIR}/tst/common/safety/tst.pid.d \
- ${TESTSRCDIR}/tst/common/safety/tst.ppid.d \
- ${TESTSRCDIR}/tst/common/safety/tst.progenyof.d \
- ${TESTSRCDIR}/tst/common/safety/tst.random.d \
- ${TESTSRCDIR}/tst/common/safety/tst.rw.d \
- ${TESTSRCDIR}/tst/common/safety/tst.shortstr.d \
- ${TESTSRCDIR}/tst/common/safety/tst.stack.d \
- ${TESTSRCDIR}/tst/common/safety/tst.stackdepth.d \
- ${TESTSRCDIR}/tst/common/safety/tst.stddev.d \
- ${TESTSRCDIR}/tst/common/safety/tst.strchr.d \
- ${TESTSRCDIR}/tst/common/safety/tst.strjoin.d \
- ${TESTSRCDIR}/tst/common/safety/tst.strstr.d \
- ${TESTSRCDIR}/tst/common/safety/tst.strtok.d \
- ${TESTSRCDIR}/tst/common/safety/tst.substr.d \
- ${TESTSRCDIR}/tst/common/safety/tst.ucaller.d \
- ${TESTSRCDIR}/tst/common/safety/tst.uid.d \
- ${TESTSRCDIR}/tst/common/safety/tst.unalign.d \
- ${TESTSRCDIR}/tst/common/safety/tst.ustack.d \
- ${TESTSRCDIR}/tst/common/safety/tst.ustackdepth.d \
- ${TESTSRCDIR}/tst/common/safety/tst.vahole.d \
- ${TESTSRCDIR}/tst/common/safety/tst.violentdeath.ksh \
- ${TESTSRCDIR}/tst/common/safety/tst.zonename.d \
- ${TESTSRCDIR}/tst/common/sched/tst.enqueue.d \
- ${TESTSRCDIR}/tst/common/sched/tst.oncpu.d \
- ${TESTSRCDIR}/tst/common/sched/tst.stackdepth.d \
- ${TESTSRCDIR}/tst/common/usdt/argmap.d \
- ${TESTSRCDIR}/tst/common/usdt/args.d \
- ${TESTSRCDIR}/tst/common/usdt/forker.d \
- ${TESTSRCDIR}/tst/common/usdt/tst.andpid.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.argmap.d \
- ${TESTSRCDIR}/tst/common/usdt/tst.args.d \
- ${TESTSRCDIR}/tst/common/usdt/tst.badguess.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.dlclose1.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.dlclose2.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.dlclose3.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.eliminate.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.enabled.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.entryreturn.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.fork.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.forker.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.guess32.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.guess64.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.header.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.include.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.linkpriv.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.linkunpriv.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.multiple.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.nodtrace.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.onlyenabled.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.reeval.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.static.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.static2.ksh \
- ${TESTSRCDIR}/tst/common/usdt/tst.user.ksh \
- ${TESTSRCDIR}/tst/common/misc/tst.schrock.ksh
-
-# --------------------------------------------------------------------------------
-# Tests that just don't complete (even to fail) at the moment...
-
-NOTWORK+= \
- ${TESTSRCDIR}/tst/common/printa/tst.many.d \
- ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupgtype.d \
- ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupltype.d \
- ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupttype.d \
- ${TESTSRCDIR}/tst/common/vars/tst.gid.d \
- ${TESTSRCDIR}/tst/common/vars/tst.uid.d \
-
-# --------------------------------------------------------------------------------
-# Tests that currently hang the system:
-
-NOTWORK+= \
- ${TESTSRCDIR}/tst/common/fbtprovider/tst.basic.d \
- ${TESTSRCDIR}/tst/common/fbtprovider/tst.return.d \
- ${TESTSRCDIR}/tst/common/grammar/tst.stmts.d \
- ${TESTSRCDIR}/tst/common/misc/tst.enablerace.ksh \
- ${TESTSRCDIR}/tst/common/predicates/tst.predcache.ksh \
- ${TESTSRCDIR}/tst/common/proc/tst.exitkilled.ksh \
-
-.if ${MACHINE_ARCH} == "i386"
-
-NOTWORK+= ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel64.d.ksh
-
-NOTWORK+= ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel64.d.ksh
-
-# --------------------------------------------------------------------------------
-# This test causes i386 to go kaboom in a big way. There is a problem in the
-# fbt exception code which needs to be fixed.
-
-NOTWORK+= \
- ${TESTSRCDIR}/tst/common/fbtprovider/tst.tailcall.d
-
-# Some tests that don't complete on i386.... :-/
-
-NOTWORK+= ${TESTSRCDIR}/tst/common/funcs/tst.chill.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.create.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exec.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.execfail.ENOENT.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.execfail.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitcore.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitexit.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitkilled.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.signal.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.sigwait.c
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.sigwait.d
-NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh
-NOTWORK+= ${TESTSRCDIR}/tst/common/struct/tst.StructDataTypes.d
-NOTWORK+= ${TESTSRCDIR}/tst/common/union/tst.UnionDataTypes.d
-
-.endif
-
-# --------------------------------------------------------------------------------
-# Interrupt priority isn't relevant on FreeBSD.
-
-NOTWORK+= ${TESTSRCDIR}/tst/common/builtinvar/tst.ipl.d \
- ${TESTSRCDIR}/tst/common/builtinvar/tst.ipl1.d
-
-# --------------------------------------------------------------------------------
-# These tests relies on the Solaris ping behaviour of exiting after a number of
-# pings. On FreeBSD ping doesn't do that.
-
-NOTWORK+= ${TESTSRCDIR}/tst/common/funcs/tst.system.d \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv6remoteicmp.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv6localicmp.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv4localicmp.ksh \
- ${TESTSRCDIR}/tst/common/ip/tst.ipv4remoteicmp.ksh
-
-# --------------------------------------------------------------------------------
-# This test checks for a leading tab on a line before #define. That is illegal
-# on Solaris, but the gcc pre-processor on FreeBSD is happy with code like that.
-
-NOTWORK+= ${TESTSRCDIR}/tst/common/preprocessor/err.D_PRAGCTL_INVAL.tabdefine.d
-
-# --------------------------------------------------------------------------------
-# This test is coded to use Solaris syscall names. FreeBSD has none with 'lwp"
-# in them, so the test fails because of that.
-
-NOTWORK+= ${TESTSRCDIR}/tst/common/probes/tst.probestar.d
-
-NOTYET= ${IGNORE} ${NOTWORK}
-
-# --------------------------------------------------------------------------------
-# Only prepare the test lists if we need to:
-
-.if !make(obj) && !make(clean) && !make(cleandir) && !make(listerrors)
-
-# --------------------------------------------------------------------------------
-# Get a list of tests, named according to the directory they are in:
-
-_COMMONDIRS!= cd ${TESTSRCDIR}/tst/common; find . -depth 1 -type d
-COMMONDIRS= ${_COMMONDIRS:S/.\///}
-
-listtests :
- @echo ${COMMONDIRS}
-
-# --------------------------------------------------------------------------------
-# Create a test target for each directory:
-
-ALL_TESTFILES=
-
-# Process each common test directory:
-.for _d in ${COMMONDIRS}
-
-# Get a list of test files in the test directory:
-${_d}_ERR!= find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.d"
-${_d}_TSTD!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.d"
-${_d}_TSTC!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.c"
-${_d}_SHERR!= find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.ksh"
-${_d}_SHTST!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.ksh"
-${_d}_EXE!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.exe" -o \
- -name "err.*.exe"
-${_d}_TF= ${${_d}_ERR} ${${_d}_TSTD} ${${_d}_SHERR} ${${_d}_SHTST}
-
-# Go through the list of test files and prepare another list that contains
-# none of the test files listed in the NOTYET list:
-.for _f in ${${_d}_TF}
-.if (${NOTYET:M${_f}} == "")
-${_d}_TFS+= ${_f}
-.endif
-.endfor
-
-# Add the list of tests to the overall test list:
-ALL_TESTFILES+= ${${_d}_TFS}
-
-.for _f in ${${_d}_TSTC}
-.if (${NOTYET:M${_f}} == "")
-${_d}_TFCS+= ${_f}
-.endif
-.endfor
-
-ALL_TESTCFILES+= ${${_d}_TFCS}
-ALL_TESTEXEFILES+= ${${_d}_EXE}
-
-${_d} : ${${_d}_TFCS:T:S/c$/exe/} ${${_d}_EXE:T}
- @${DTEST} ${${_d}_TFS}
-.endfor
-
-# --------------------------------------------------------------------------------
-#
-
-PRGS= ${ALL_TESTCFILES:T:S/c$/exe/} ${ALL_TESTEXEFILES:T}
-
-listprgs :
- @echo ${PRGS}
-
-# --------------------------------------------------------------------------------
-#
-
-.for _f in ${ALL_TESTCFILES}
-${_f:T:S/c$/exe/} : ${_f}
- ${CC} -o ${.TARGET} ${_f} -lrt
-.endfor
-
-.for _f in ${ALL_TESTEXEFILES}
-${_f:T} : ${_f}
- cp -f ${_f} ${.TARGET}
- chmod a+x ${.TARGET}
-.endfor
-
-listcfiles :
- @echo ${ALL_TESTCFILES}
-
-# --------------------------------------------------------------------------------
-# A target to build all tests:
-
-all : ${PRGS}
- @sync; sync; sync; sync; sync
- @${DTEST} ${ALL_TESTFILES}
-
-# --------------------------------------------------------------------------------
-# A target to build the tests flagged as not working yet:
-
-ignore :
- @${DTEST} ${IGNORE}
-
-.endif
-
-listerrors :
- @find ${.OBJDIR} -name "*.err" -exec cat {} \; -print
-
-
-# --------------------------------------------------------------------------------
-# Test failures are written to failure.N directories in the object tree.
-# Get a list of directories in the object tree for 'make clean'.
-
-.if ${.OBJDIR} != ${.CURDIR} && !empty(${.OBJDIR})
-CLEANDIRS!= cd ${.OBJDIR} && ls -d *
-.endif
-
-# --------------------------------------------------------------------------------
-# Insist on using an object directory. Things get messy otherwsie.
-
-.if ${.OBJDIR} == ${.CURDIR} && !make(obj) && !make(clean) && !make(cleandir)
-.error ERROR: You must run 'make obj' first!
-.endif
-
-# --------------------------------------------------------------------------------
-# Load the DTrace module set if necessary.
-
-.BEGIN :
- @if ! kldstat -q -m dtrace_test; then kldload dtrace_test; fi
-
-.include <bsd.obj.mk>
-
diff --git a/tools/tools/ath/athaggrstats/Makefile b/tools/tools/ath/athaggrstats/Makefile
index 43e2a66..2748b6f 100644
--- a/tools/tools/ath/athaggrstats/Makefile
+++ b/tools/tools/ath/athaggrstats/Makefile
@@ -12,8 +12,8 @@ CLEANFILES+= opt_ah.h
CFLAGS+=-DATH_SUPPORT_ANI
CFLAGS+=-DATH_SUPPORT_TDMA
-USEPRIVATELIB= bsdstat
-LDADD= ${LDBSDSTAT}
+CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/
+LIBADD+= bsdstat
opt_ah.h:
echo "#define AH_DEBUG 1" > opt_ah.h
diff --git a/tools/tools/ath/athratestats/main.c b/tools/tools/ath/athratestats/main.c
index 8d146ca..3881e85 100644
--- a/tools/tools/ath/athratestats/main.c
+++ b/tools/tools/ath/athratestats/main.c
@@ -38,7 +38,6 @@
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_media.h>
-#include <net/if_var.h>
#include <stdio.h>
#include <stdlib.h>
@@ -115,7 +114,7 @@ static void
ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt,
struct sample_node *sn)
{
- uint32_t mask;
+ uint64_t mask;
int rix, y;
PRINTMSG("static_rix (%d) ratemask 0x%llx\n",
diff --git a/tools/tools/ath/athstats/Makefile b/tools/tools/ath/athstats/Makefile
index 8d1bfa6..93f98ae 100644
--- a/tools/tools/ath/athstats/Makefile
+++ b/tools/tools/ath/athstats/Makefile
@@ -8,10 +8,6 @@ MAN=
PROG= athstats
-# Because of a clang preprocessor parser limitation causing this
-# to not compile, use gcc for now.
-#CC= gcc
-
SRCS= main.c athstats.c opt_ah.h ah_osdep.h
CLEANFILES+= opt_ah.h
@@ -21,11 +17,11 @@ CLEANFILES+= opt_ah.h
CFLAGS+=-DATH_SUPPORT_ANI
CFLAGS+=-DATH_SUPPORT_TDMA
-CFLAGS.clang+= -fbracket-depth=512
+CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/
-USEPRIVATELIB= bsdstat
+CFLAGS.clang+= -fbracket-depth=512
-LDADD= ${LDBSDSTAT}
+LIBADD= bsdstat
opt_ah.h:
echo "#define AH_DEBUG 1" > opt_ah.h
diff --git a/tools/tools/ath/athstats/athstats.c b/tools/tools/ath/athstats/athstats.c
index ad7ab94..82b5620 100644
--- a/tools/tools/ath/athstats/athstats.c
+++ b/tools/tools/ath/athstats/athstats.c
@@ -51,6 +51,7 @@
#include "ah.h"
#include "ah_desc.h"
+#include "ah_diagcodes.h"
#include "net80211/ieee80211_ioctl.h"
#include "net80211/ieee80211_radiotap.h"
#include "if_athioctl.h"
@@ -336,7 +337,7 @@ static const struct fmt athstats[] = {
#define S_ANI_LISTEN AFTER(S_ANI_MAXSPUR)
{ 6, "listen","LISTEN", "listen time" },
#define S_ANI_NIUP AFTER(S_ANI_LISTEN)
- { 4, "ni+", "NI-", "ANI increased noise immunity" },
+ { 4, "ni+", "NI+", "ANI increased noise immunity" },
#define S_ANI_NIDOWN AFTER(S_ANI_NIUP)
{ 4, "ni-", "NI-", "ANI decrease noise immunity" },
#define S_ANI_SIUP AFTER(S_ANI_NIDOWN)
@@ -428,39 +429,11 @@ static const struct fmt athstats[] = {
#define S_LAST S_ANT_TX0
#define S_MAX S_BMISSCOUNT+1
-/*
- * XXX fold this into the external HAL definitions! -adrian
- */
struct _athstats {
struct ath_stats ath;
#ifdef ATH_SUPPORT_ANI
- struct {
- uint32_t ast_ani_niup; /* increased noise immunity */
- uint32_t ast_ani_nidown; /* decreased noise immunity */
- uint32_t ast_ani_spurup; /* increased spur immunity */
- uint32_t ast_ani_spurdown; /* descreased spur immunity */
- uint32_t ast_ani_ofdmon; /* OFDM weak signal detect on */
- uint32_t ast_ani_ofdmoff; /* OFDM weak signal detect off*/
- uint32_t ast_ani_cckhigh; /* CCK weak signal thr high */
- uint32_t ast_ani_ccklow; /* CCK weak signal thr low */
- uint32_t ast_ani_stepup; /* increased first step level */
- uint32_t ast_ani_stepdown; /* decreased first step level */
- uint32_t ast_ani_ofdmerrs; /* cumulative ofdm phy err cnt*/
- uint32_t ast_ani_cckerrs; /* cumulative cck phy err cnt */
- uint32_t ast_ani_reset; /* params zero'd for non-STA */
- uint32_t ast_ani_lzero; /* listen time forced to zero */
- uint32_t ast_ani_lneg; /* listen time calculated < 0 */
- HAL_MIB_STATS ast_mibstats; /* MIB counter stats */
- HAL_NODE_STATS ast_nodestats; /* latest rssi stats */
- } ani_stats;
- struct {
- uint8_t noiseImmunityLevel;
- uint8_t spurImmunityLevel;
- uint8_t firstepLevel;
- uint8_t ofdmWeakSigDetectOff;
- uint8_t cckWeakSigThreshold;
- uint32_t listenTime;
- } ani_state;
+ HAL_ANI_STATS ani_stats;
+ HAL_ANI_STATE ani_state;
#endif
};
@@ -504,14 +477,14 @@ ath_collect(struct athstatfoo_p *wf, struct _athstats *stats)
err(1, "ioctl: %s", wf->ifr.ifr_name);
#ifdef ATH_SUPPORT_ANI
if (wf->optstats & ATHSTATS_ANI) {
- wf->atd.ad_id = 5;
+ wf->atd.ad_id = HAL_DIAG_ANI_CURRENT; /* HAL_DIAG_ANI_CURRENT */
wf->atd.ad_out_data = (caddr_t) &stats->ani_state;
wf->atd.ad_out_size = sizeof(stats->ani_state);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) {
warn("ioctl: %s", wf->atd.ad_name);
wf->optstats &= ~ATHSTATS_ANI;
}
- wf->atd.ad_id = 8;
+ wf->atd.ad_id = HAL_DIAG_ANI_STATS; /* HAL_DIAG_ANI_STATS */
wf->atd.ad_out_data = (caddr_t) &stats->ani_stats;
wf->atd.ad_out_size = sizeof(stats->ani_stats);
if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0)
@@ -823,10 +796,12 @@ ath_get_totstat(struct bsdstat *sf, int s, char b[], size_t bs)
switch (s) {
case S_INPUT:
snprintf(b, bs, "%lu",
- wf->total.ath.ast_rx_packets - wf->total.ath.ast_rx_mgt);
+ (unsigned long) wf->total.ath.ast_rx_packets -
+ (unsigned long) wf->total.ath.ast_rx_mgt);
return 1;
case S_OUTPUT:
- snprintf(b, bs, "%lu", wf->total.ath.ast_tx_packets);
+ snprintf(b, bs, "%lu",
+ (unsigned long) wf->total.ath.ast_tx_packets);
return 1;
case S_RATE:
snprintrate(b, bs, wf->total.ath.ast_tx_rate);
diff --git a/tools/tools/cxgbetool/Makefile b/tools/tools/cxgbetool/Makefile
index 1c7adff..1430a5a 100644
--- a/tools/tools/cxgbetool/Makefile
+++ b/tools/tools/cxgbetool/Makefile
@@ -2,7 +2,7 @@
PROG= cxgbetool
SRCS= cxgbetool.c
-MAN=
+MAN= cxgbetool.8
CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I.
BINDIR?= /usr/sbin
diff --git a/tools/tools/cxgbetool/cxgbetool.8 b/tools/tools/cxgbetool/cxgbetool.8
new file mode 100644
index 0000000..16b0ce6
--- /dev/null
+++ b/tools/tools/cxgbetool/cxgbetool.8
@@ -0,0 +1,490 @@
+.\" Copyright (c) 2015, Chelsio Inc
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Chelsio Inc nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 1, 2013
+.Dt CXGBETOOL 8
+.Os
+.Sh NAME
+.Nm cxgbetool
+.Nd Userspace companion to
+.Xr cxgbe 4
+.Sh SYNOPSIS
+.Bl -item -compact
+.It
+.Nm Ar nexus command Op Ar parameter ...
+.Pp
+.It
+.Nm Ar nexus Cm clearstats Ar port_id
+.It
+.Nm Ar nexus Cm context Bro Cm ingress | egress | fl | cong Brc Ar cntxt_id
+.It
+.Nm Ar nexus Cm filter mode Op Ar match-criteria ...
+.It
+.Nm Ar nexus Cm filter Ar idx Bro Ar filter-specification | Cm delete Brc
+.It
+.Nm Ar nexus Cm filter list
+.It
+.Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len
+.It
+.Nm Ar nexus Cm loadfw Ar fw-image.bin
+.It
+.Nm Ar nexus Cm memdump Ar addr len
+.It
+.Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
+.It
+.Nm Ar nexus Cm regdump Op Ar register-block ...
+.It
+.Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value
+.It
+.Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class
+.It
+.Nm Ar nexus Cm stdio
+.It
+.Nm Ar nexus Cm tcb Ar tid
+.El
+.Sh DESCRIPTION
+.Nm
+provides command-line access to features and debug facilities exported by
+.Xr cxgbe 4
+via private ioctls.
+The target nexus device,
+.Va t4nex%d
+, is always the first argument.
+(The parent nexus for an Ethernet port
+.Va cxgbe%d
+is listed in
+.Va dev.cxgbe.%d.%parent
+in the
+.Xr sysctl 8
+MIB).
+The rest consists of a command and any parameters required by that command.
+.Ss Commands
+.Bl -ohang
+.It Cm clearstats Ar port_id
+Clear all transmit, receive, and error statistics of all queues associated
+with a port.
+The total number of ports attached to a nexus is listed in
+.Va dev.t4nex.%d.nports
+and the 0 based
+.Ar port_id
+identifies a port within this range.
+.Pp
+.Bl -item -compact
+.It
+.Cm context ingress Ar ingress_cntxt_id
+.It
+.Cm context cong Ar ingress_cntxt_id
+.It
+.Cm context egress Ar egress_cntxt_id
+.It
+.Cm context fl Ar flm_cntxt_id
+.El
+Display hardware context for an ingress queue, congestion manager, egress
+queue, or freelist manager.
+.Bl -tag -width ingress_cntxt_id -compact
+.It Ar ingress_cntxt_id
+context id of an ingress queue -- the value listed in one of
+.Va dev.t4nex.%d.fwq.cntxt_id Ns ,
+.Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns ,
+or
+.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns .
+.It Ar egress_cntxt_id
+context id of an egress queue -- the value listed in one of
+.Va dev.t4nex.%d.mgmtq.cntxt_id Ns ,
+.Va dev.cxgbe.%d.txq.%d.cntxt_id Ns ,
+.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns ,
+.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns ,
+.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns ,
+or
+.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns .
+Note that freelists are egress queues too.
+.It Ar flm_cntxt_id
+context id of a freelist manager. The FLM context id is displayed in the
+egress context dump of a freelist as FLMcontextID.
+.El
+.It Cm filter mode Op Ar match-criteria ...
+Display or set the nexus's filter mode.
+.Ar match-criteria
+is a whitespace separated list of criteria from the table below.
+Each criteria has an associated budget which is also listed in the table.
+The total budget allowed is 36 and attempts to set a filter mode that
+exceeds this will be rejected.
+Every filter must conform to the filter mode -- multiple match criteria
+per filter are allowed but only from among those in the current setting
+of the filter mode.
+The filter mode can only be changed when there are no existing filters.
+Its default value is
+.Cm ipv4 ipv6 sip dip sport dport matchtype proto vlan iport fcoe
+.Pp
+(Note that
+.Ar mask
+defaults to all 1s when not provided explicitly.
+Also note that many of the items being matched are discrete numeric
+values rather than bit fields and should be masked with caution.)
+.TS
+center expand;
+cb cb cb cbw(40m)
+cb c l l.
+Criteria Budget Usage Matches if ...
+_
+ipv4 0 T{
+.Cm type ipv4
+T} T{
+incoming packet is an IPv4 datagram.
+T}
+_
+ipv6 0 T{
+.Cm type ipv6
+T} T{
+incoming packet is an IPv6 datagram.
+T}
+_
+sip 0 T{
+.Cm sip Ar addr Ns Op / Ns Ar mask
+T} T{
+bitwise and of the source address in an incoming IP datagram with
+.Ar mask
+equals
+.Ar addr Ns .
+.Ar addr
+can be an IPv4 or IPv6 address.
+T}
+_
+dip 0 T{
+.Cm dip Ar addr Ns Op / Ns Ar mask
+T} T{
+bitwise and of the destination address in an incoming IP datagram with
+.Ar mask
+equals
+.Ar addr Ns .
+.Ar addr
+can be an IPv4 or IPv6 address.
+T}
+_
+sport 0 T{
+.Cm sport Ar port Ns Op : Ns Ar mask
+T} T{
+bitwise and of the source port in an incoming TCP or UDP datagram with
+.Ar mask
+equals
+.Ar port Ns .
+T}
+_
+dport 0 T{
+.Cm dport Ar port Ns Op : Ns Ar mask
+T} T{
+bitwise and of the destination port in an incoming TCP or UDP datagram with
+.Ar mask
+equals
+.Ar port Ns .
+T}
+_
+fcoe 1 T{
+.Cm fcoe Brq 0 | 1
+T} T{
+incoming frame is Fibre Channel over Ethernet(1) or not(0).
+T}
+_
+iport 3 T{
+.Cm iport Ar val Ns Op : Ns Ar mask
+T} T{
+bitwise and of the ingress port with
+.Ar mask
+equals
+.Ar val Ns .
+The ingress port is a 3 bit number that identifies the port on which a
+frame arrived.
+Physical ports are numbered 0-3 and 4-7 are internal loopback paths
+within the chip.
+Note that ingress port is not a bit field so it is not always possible
+to match an arbitrary subset of ingress ports with a single filter rule.
+T}
+_
+ovlan 17 T{
+.Cm ovlan Ar tag Ns Op : Ns Ar mask
+T} T{
+bitwise and of the 16-bit outer VLAN tag of an incoming frame with
+.Ar mask
+equals
+.Ar tag Ns .
+T}
+_
+vlan 17 T{
+.Cm vlan Ar tag Ns Op : Ns Ar mask
+T} T{
+bitwise and of the 16-bit VLAN tag of an incoming QinQ frame with
+.Ar mask
+equals
+.Ar tag Ns .
+The inner VLAN tag is used if the incoming frame is QinQ.
+T}
+_
+tos 8 T{
+.Cm tos Ar val Ns Op : Ns Ar mask
+T} T{
+bitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an
+incoming packet with
+.Ar mask
+equals
+.Ar val Ns .
+T}
+_
+proto 8 T{
+.Cm proto Ar ipproto Ns Op : Ns Ar mask
+T} T{
+bitwise and of the 8-bit IP protocol in an incoming packet with
+.Ar mask
+equals
+.Ar ipproto Ns .
+T}
+_
+ethtype 16 T{
+.Cm ethtype Ar type Ns Op : Ns Ar mask
+T} T{
+bitwise and of the 16-bit Ethernet type field of an incoming frame with
+.Ar mask
+equals
+.Ar type Ns .
+T}
+_
+macidx 9 T{
+.Cm macidx Ar idx Ns Op : Ns Ar mask
+T} T{
+bitwise and of the MAC Address Match Index of an incoming frame with
+.Ar mask
+equals
+.Ar idx Ns .
+The MAC Address Match Index refers to an entry in the MPS TCAM or in the
+MPS hash. See
+.Cm matchtype
+for more information.
+T}
+_
+matchtype 3 T{
+.Cm matchtype Ar type Ns Op : Ns Ar mask
+T} T{
+bitwise and of the Match Type of an incoming frame with
+.Ar mask
+equals
+.Ar idx Ns .
+Match Type is one of the following:
+.Bl -tag -width "n" -compact
+.It 0
+destination MAC in incoming frame is a unicast L2 address that is
+programmed in the MPS TCAM.
+.Cm macidx
+can be used to match the index (and thus the MAC address) of the match
+in the TCAM.
+.It 1
+destination MAC in incoming frame is a unicast L2 address that "hit" a
+hash entry in the MPS hash table.
+.Cm macidx
+can be used to match the index of the entry in the MPS hash table.
+.It 2
+destination MAC in incoming frame is a multicast L2 address that is
+programmed in the MPS TCAM.
+.Cm macidx
+can be used to match the index (and thus the MAC address) of the match
+in the TCAM.
+.It 3
+destination MAC in incoming frame is a multicast L2 address that "hit"
+an entry in the MPS hash table.
+.It 4
+interface on which incoming frame was received is in promiscuous mode
+and the destination MAC in the frame is not a broadcast address, and
+does not match in the MPS TCAM or the MPS hash either. (The frame would
+have been discarded if the interface wasn't in promiscuous mode.)
+.It 5
+interface on which incoming frame was received is in promiscuous mode
+and the destination MAC in the frame is not a broadcast address; it
+wasn't looked up in the MPS TCAM or the MPS hash because the chip is
+configured to give precedence to promiscuous mode classification.
+.It 6
+destination MAC in incoming frame is a broadcast address.
+.It 7
+Not documented. Do not use.
+.El
+T}
+_
+frag 1 T{
+.Cm frag Brq 0 | 1
+T} T{
+incoming frame is part of a fragmented IP datagram(1) or not(0).
+T}
+.TE
+.It Cm filter Ar idx Ar filter-specification
+Program a filter at the index specified by
+.Ar idx Ns .
+.Ar filter-specification
+consists of one or more matches to try against an incoming frame and an
+action to perform when all matches succeed.
+.It Cm filter Ar idx Cm delete
+Delete filter that is at the given index.
+.It Cm filter Cm list
+List all filters programmed into the hardware.
+.It Cm i2c Ar port_id devaddr addr Op Ar len
+.It Cm loadfw Ar fw-image.bin
+Install the firmware contained in
+.Ar fw-image.bin
+to the card.
+.It Cm memdump Ar addr len
+Display
+.Ar len
+bytes of data of the card's memory starting at
+.Ar addr Ns .
+The card's memory map is available in
+.Va dev.t4nex.%d.misc.meminfo Ns .
+.It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
+.It Cm regdump Op Ar register-block ...
+Display contents of device registers. One or more
+.Ar register-block
+can be specified to limit the registers displayed.
+The default is to display registers for all blocks.
+Registers with read side effects are not read during a
+.Cm regdump
+operation.
+.Ar register-block
+can be
+.Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw
+.Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns .
+.It Cm sched-class config Op Ar param Ar value
+Configure optional feature capabilities for the TX scheduler.
+.Bl -ohang -offset indent
+.It Sy type Ar scheduler-type
+Use packet for the packet scheduler.
+.It Sy minmax Ar value
+A non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode.
+.Pp
+NOTE: Many (most) of the parameters and constraints are adapter-specific
+- for instance the number of channels and classes which are available
+whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations.
+.El
+.It Cm sched-class params Op Ar param Ar value
+Configure parameters for a scheduling class.
+.Bl -ohang -offset indent
+.It Sy type Ar scheduler-type
+Use packet for packet scheduler.
+.It Sy level Ar scheduler-hierarchy-level
+The "level" within the scheduling hierarchy which is being programed:
+.Pp
+.Bl -tag -width "cl-wrr" -compact -offset indent
+.It Sy cl-rl
+Class Rate Limiting.
+.Pp
+.It Sy cl-wrr
+Class Weighted Round Robin.
+.Pp
+.It Sy cl-wrr
+Channel Rate Limiting.
+.El
+.It Sy mode Ar scheduler-mode
+The mode in which the scheduling class is going to operate:
+.Pp
+.Bl -tag -width "class" -compact -offset indent
+.It Sy class
+All of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints.
+.Pp
+.It Sy flow
+Each of the "flows" bound to the scheduling class will be held to the scheduling constraints.
+.El
+.Pp
+E.g. if the scheduling class has a TX bandwidth of 10Mb/s, in
+.Cm class
+mode, all of the "flows" bound to the class would be limited to an
+aggregate bandwidth of 10Mb/s; but in
+.Cm flow
+mode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s.
+.It Sy rate-unit Ar scheduler-rate-unit
+The units of the scheduler rate constraints:
+.Pp
+.Bl -tag -width "bits" -compact -offset indent
+.It Sy bits
+bit rate in Kb/s.
+.Pp
+.It Sy pkts
+packets/s.
+.El
+.It Sy rate-mode Ar scheduler-rate-mode
+The mode of the scheduler rate constraints:
+.Pp
+.Bl -tag -width "relative" -compact -offset indent
+.It Sy relative
+percent of port rate.
+.Pp
+.It Sy absolute
+Kb/s.
+.El
+.It Sy channel Ar scheduler-channel-index
+The scheduling channel to which the scheduling class will be bound.
+.It Sy class Ar scheduler-class-index
+The scheduling class being programmed.
+.It Sy min-rate Ar minimum-rate
+The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access.
+.It Sy max-rate Ar maximum-rate
+The maximum rate for a rate-limiting scheduling class hierarchy.
+.It Sy weight Ar round-robin-weight
+The weight to be used for a weighted-round-robin scheduling hierarchy.
+.It Sy pkt-size Ar average-packet-size
+The average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy.
+.Pp
+NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available,
+whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations.
+.El
+.It Cm sched-queue Ar port queue class
+Bind the indicated port's NIC TX
+.Ar queue
+to the specified TX Scheduler
+.Ar class.
+If the TX
+.Ar queue
+is
+.Cm all, *
+or any negative value, the binding will apply to
+all of the TX queues associated with the
+.Ar interface.
+If the class is
+.Cm unbind, clear
+or any negative value, the TX queue(s) will be unbound from
+any current TX Scheduler Class binding.
+.It Cm stdio
+Switch to interactive mode.
+.It Cm tcb Ar tid
+Display contents of the hardware TCB (TCP Control Block) for the
+connection identfied by
+.Ar tid Ns .
+.El
+.Sh FILES
+/sys/dev/cxgbe/t4_ioctl.h
+.Sh AUTHORS
+This manual page was written by
+.An Navdeep Parhar Aq np@FreeBSD.org .
diff --git a/tools/tools/cxgbtool/cxgbtool.c b/tools/tools/cxgbtool/cxgbtool.c
index f73f1a4..8eaaf28 100644
--- a/tools/tools/cxgbtool/cxgbtool.c
+++ b/tools/tools/cxgbtool/cxgbtool.c
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <arpa/inet.h>
#include <net/if.h>
-#include <net/if_var.h>
#include <net/if_types.h>
#include <sys/endian.h>
diff --git a/tools/tools/ether_reflect/ether_reflect.1 b/tools/tools/ether_reflect/ether_reflect.1
index e6539b1..421136b 100644
--- a/tools/tools/ether_reflect/ether_reflect.1
+++ b/tools/tools/ether_reflect/ether_reflect.1
@@ -91,10 +91,10 @@ are seen on ineterface em0. The timeout is 1 millisecond.
Rewrite the destination address in each packet to 00:00:00:aa:bb:cc
before reflecting the packet.
.Sh SEE ALSO
-.Xr ifconfig 8 ,
.Xr tcpdump 1 ,
+.Xr bpf 2 ,
.Xr pcap 4 ,
-.Xr bpf 2 .
+.Xr ifconfig 8
.Sh HISTORY
The
.Nm
diff --git a/tools/tools/iwn/iwnstats/iwn_ioctl.c b/tools/tools/iwn/iwnstats/iwn_ioctl.c
index 13c6153..97b2a91 100644
--- a/tools/tools/iwn/iwnstats/iwn_ioctl.c
+++ b/tools/tools/iwn/iwnstats/iwn_ioctl.c
@@ -38,7 +38,6 @@
#include <sys/socket.h>
#include <net/if.h>
#include <net/if_media.h>
-#include <net/if_var.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/tools/makeroot/makeroot.8 b/tools/tools/makeroot/makeroot.8
index 379187c..0ba3fdc 100644
--- a/tools/tools/makeroot/makeroot.8
+++ b/tools/tools/makeroot/makeroot.8
@@ -41,6 +41,7 @@
.Op Fl e Ar extras-manifest
.Op Fl f Ar filelist
.Op Fl k Ar keydir Op Fl K Ar user
+.Op Fl l Ar label
.Op Fl p Ar master.passwd Op Fl g Ar group
.Op Fl s Ar size
.Ar image-file
@@ -94,6 +95,8 @@ If no
.Fl K
argument is supplied then the files will be installed in the root user's
directory.
+.It Fl l Ar label
+Set the file system volume label.
.It Fl p Ar master.passwd Op Fl g Ar group
Install an alternate
.Ar master.passwd
diff --git a/tools/tools/makeroot/makeroot.sh b/tools/tools/makeroot/makeroot.sh
index 1ef376b..a1e6697 100755
--- a/tools/tools/makeroot/makeroot.sh
+++ b/tools/tools/makeroot/makeroot.sh
@@ -75,7 +75,7 @@ KEYDIR=
KEYUSERS=
PASSWD=
-while getopts "B:de:f:g:K:k:p:s:" opt; do
+while getopts "B:de:f:g:K:k:l:p:s:" opt; do
case "$opt" in
B) BFLAG="-B ${OPTARG}" ;;
d) DEBUG=1 ;;
@@ -84,6 +84,7 @@ while getopts "B:de:f:g:K:k:p:s:" opt; do
g) GROUP="${OPTARG}" ;;
K) KEYUSERS="${KEYUSERS} ${OPTARG}" ;;
k) KEYDIR="${OPTARG}" ;;
+ l) LABEL="${OPTARG}" ;;
p) PASSWD="${OPTARG}" ;;
s) SIZE="${OPTARG}" ;;
*) usage ;;
@@ -165,13 +166,15 @@ if [ -n "${FILELIST}" ]; then
awk '
!/ type=/ { file = $1 }
/ type=/ { if ($1 == file) {print} }' >> ${manifest}
-else
+elif [ -n "${EXTRAS}" ]; then
# Start with all the files in BSDROOT/METALOG except those in
# one of the EXTRAS manifests.
grep -h type=file ${EXTRAS} | cut -d' ' -f1 | \
sort -u ${BSDROOT}/METALOG - | awk '
!/ type=/ { file = $1 }
/ type=/ { if ($1 != file) {print} }' >> ${manifest}
+else
+ sort -u ${BSDROOT}/METALOG >> ${manifest}
fi
# For each extras file, add contents keys relative to the directory the
@@ -228,9 +231,12 @@ if [ -n "${KEYDIR}" ]; then
done
fi
+if [ -n "${LABEL}" ]; then
+LABELFLAG="-o label=${LABEL}"
+fi
if [ -n "${SIZE}" ]; then
SIZEFLAG="-s ${SIZE}"
fi
cd ${BSDROOT}; makefs ${DUPFLAG} -N ${DBDIR} ${SIZEFLAG} ${BFLAG} \
- -t ffs -f 256 ${IMGFILE} ${manifest}
+ -t ffs ${LABELFLAG} -f 256 ${IMGFILE} ${manifest}
diff --git a/tools/tools/mwl/mwlstats/Makefile b/tools/tools/mwl/mwlstats/Makefile
index 4a3c5d3..69382b8 100644
--- a/tools/tools/mwl/mwlstats/Makefile
+++ b/tools/tools/mwl/mwlstats/Makefile
@@ -5,8 +5,8 @@ BINDIR= /usr/local/bin
MAN=
SRCS= main.c mwlstats.c
-USEPRIVATELIB=
-LDADD=-lbsdstat
+LIBADD= bsdstat
+CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/
.include <bsd.prog.mk>
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
new file mode 100755
index 0000000..a556e1b
--- /dev/null
+++ b/tools/tools/nanobsd/defaults.sh
@@ -0,0 +1,983 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Poul-Henning Kamp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+set -e
+
+#######################################################################
+#
+# Setup default values for all controlling variables.
+# These values can be overridden from the config file(s)
+#
+#######################################################################
+
+# Name of this NanoBSD build. (Used to construct workdir names)
+NANO_NAME=full
+
+# Source tree directory
+NANO_SRC=/usr/src
+
+# Where nanobsd additional files live under the source tree
+NANO_TOOLS=tools/tools/nanobsd
+
+# Where cust_pkg() finds packages to install
+NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg
+NANO_PACKAGE_LIST="*"
+
+# where package metadata gets placed
+NANO_PKG_META_BASE=/var/db
+
+# Object tree directory
+# default is subdir of /usr/obj
+#NANO_OBJ=""
+
+# The directory to put the final images
+# default is ${NANO_OBJ}
+#NANO_DISKIMGDIR=""
+
+# Make & parallel Make
+NANO_MAKE="make"
+NANO_PMAKE="make -j 3"
+
+# The default name for any image we create.
+NANO_IMGNAME="_.disk.full"
+
+# Options to put in make.conf during buildworld only
+CONF_BUILD=' '
+
+# Options to put in make.conf during installworld only
+CONF_INSTALL=' '
+
+# Options to put in make.conf during both build- & installworld.
+CONF_WORLD=' '
+
+# Kernel config file to use
+NANO_KERNEL=GENERIC
+
+# Kernel modules to install. If empty, no modules are installed.
+# Use "default" to install all built modules.
+NANO_MODULES=
+
+# Customize commands.
+NANO_CUSTOMIZE=""
+
+# Late customize commands.
+NANO_LATE_CUSTOMIZE=""
+
+# Newfs paramters to use
+NANO_NEWFS="-b 4096 -f 512 -i 8192 -U"
+
+# The drive name of the media at runtime
+NANO_DRIVE=ad0
+
+# Target media size in 512 bytes sectors
+NANO_MEDIASIZE=2000000
+
+# Number of code images on media (1 or 2)
+NANO_IMAGES=2
+
+# 0 -> Leave second image all zeroes so it compresses better.
+# 1 -> Initialize second image with a copy of the first
+NANO_INIT_IMG2=1
+
+# Size of code file system in 512 bytes sectors
+# If zero, size will be as large as possible.
+NANO_CODESIZE=0
+
+# Size of configuration file system in 512 bytes sectors
+# Cannot be zero.
+NANO_CONFSIZE=2048
+
+# Size of data file system in 512 bytes sectors
+# If zero: no partition configured.
+# If negative: max size possible
+NANO_DATASIZE=0
+
+# Size of the /etc ramdisk in 512 bytes sectors
+NANO_RAM_ETCSIZE=10240
+
+# Size of the /tmp+/var ramdisk in 512 bytes sectors
+NANO_RAM_TMPVARSIZE=10240
+
+# Media geometry, only relevant if bios doesn't understand LBA.
+NANO_SECTS=63
+NANO_HEADS=16
+
+# boot0 flags/options and configuration
+NANO_BOOT0CFG="-o packet -s 1 -m 3"
+NANO_BOOTLOADER="boot/boot0sio"
+
+# boot2 flags/options
+# default force serial console
+NANO_BOOT2CFG="-h"
+
+# Backing type of md(4) device
+# Can be "file" or "swap"
+NANO_MD_BACKING="file"
+
+# for swap type md(4) backing, write out the mbr only
+NANO_IMAGE_MBRONLY=true
+
+# Progress Print level
+PPLEVEL=3
+
+# Set NANO_LABEL to non-blank to form the basis for using /dev/ufs/label
+# in preference to /dev/${NANO_DRIVE}
+# Root partition will be ${NANO_LABEL}s{1,2}
+# /cfg partition will be ${NANO_LABEL}s3
+# /data partition will be ${NANO_LABEL}s4
+NANO_LABEL=""
+
+#######################################################################
+# Architecture to build. Corresponds to TARGET_ARCH in a buildworld.
+# Unfortunately, there's no way to set TARGET at this time, and it
+# conflates the two, so architectures where TARGET != TARGET_ARCH do
+# not work. This defaults to the arch of the current machine.
+
+NANO_ARCH=`uname -p`
+
+# Directory to populate /cfg from
+NANO_CFGDIR=""
+
+# Directory to populate /data from
+NANO_DATADIR=""
+
+# src.conf to use when building the image. Defaults to /dev/null for the sake
+# of determinism.
+SRCCONF=${SRCCONF:=/dev/null}
+
+#######################################################################
+#
+# The functions which do the real work.
+# Can be overridden from the config file(s)
+#
+#######################################################################
+
+# rm doesn't know -x prior to FreeBSD 10, so cope with a variety of build
+# hosts for now.
+nano_rm ( ) {
+ case $(uname -r) in
+ 7*|8*|9*) rm $* ;;
+ *) rm -x $* ;;
+ esac
+}
+
+# run in the world chroot, errors fatal
+CR()
+{
+ chroot ${NANO_WORLDDIR} /bin/sh -exc "$*"
+}
+
+# run in the world chroot, errors not fatal
+CR0()
+{
+ chroot ${NANO_WORLDDIR} /bin/sh -c "$*" || true
+}
+
+nano_cleanup ( ) (
+ if [ $? -ne 0 ]; then
+ echo "Error encountered. Check for errors in last log file." 1>&2
+ fi
+ exit $?
+)
+
+clean_build ( ) (
+ pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})"
+
+ if ! nano_rm -rf ${MAKEOBJDIRPREFIX}/ > /dev/null 2>&1 ; then
+ chflags -R noschg ${MAKEOBJDIRPREFIX}/
+ nano_rm -r ${MAKEOBJDIRPREFIX}/
+ fi
+)
+
+make_conf_build ( ) (
+ pprint 2 "Construct build make.conf ($NANO_MAKE_CONF_BUILD)"
+
+ mkdir -p ${MAKEOBJDIRPREFIX}
+ printenv > ${MAKEOBJDIRPREFIX}/_.env
+
+ echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_BUILD}
+ echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD}
+)
+
+build_world ( ) (
+ pprint 2 "run buildworld"
+ pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw"
+
+ cd ${NANO_SRC}
+ env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \
+ SRCCONF=${SRCCONF} \
+ __MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \
+ > ${MAKEOBJDIRPREFIX}/_.bw 2>&1
+)
+
+build_kernel ( ) (
+ local extra
+
+ pprint 2 "build kernel ($NANO_KERNEL)"
+ pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk"
+
+ (
+ if [ -f ${NANO_KERNEL} ] ; then
+ kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'"
+ kernconf=$(basename ${NANO_KERNEL})
+ else
+ kernconf=${NANO_KERNEL}
+ fi
+
+ cd ${NANO_SRC};
+ # unset these just in case to avoid compiler complaints
+ # when cross-building
+ unset TARGET_CPUTYPE
+ # Note: We intentionally build all modules, not only the ones in
+ # NANO_MODULES so the built world can be reused by multiple images.
+ eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \
+ SRCCONF='${SRCCONF}' \
+ __MAKE_CONF='${NANO_MAKE_CONF_BUILD}' \
+ ${kernconfdir_arg} KERNCONF=${kernconf}"
+ ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1
+)
+
+clean_world ( ) (
+ if [ "${NANO_OBJ}" != "${MAKEOBJDIRPREFIX}" ]; then
+ pprint 2 "Clean and create object directory (${NANO_OBJ})"
+ if ! nano_rm -rf ${NANO_OBJ}/ > /dev/null 2>&1 ; then
+ chflags -R noschg ${NANO_OBJ}
+ nano_rm -r ${NANO_OBJ}/
+ fi
+ mkdir -p ${NANO_OBJ} ${NANO_WORLDDIR}
+ printenv > ${NANO_OBJ}/_.env
+ else
+ pprint 2 "Clean and create world directory (${NANO_WORLDDIR})"
+ if ! nano_rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then
+ chflags -R noschg ${NANO_WORLDDIR}
+ nano_rm -rf ${NANO_WORLDDIR}/
+ fi
+ mkdir -p ${NANO_WORLDDIR}
+ fi
+)
+
+make_conf_install ( ) (
+ pprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTALL)"
+
+ echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_INSTALL}
+ echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF_INSTALL}
+)
+
+install_world ( ) (
+ pprint 2 "installworld"
+ pprint 3 "log: ${NANO_OBJ}/_.iw"
+
+ cd ${NANO_SRC}
+ env TARGET_ARCH=${NANO_ARCH} \
+ ${NANO_MAKE} SRCCONF=${SRCCONF} \
+ __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \
+ DESTDIR=${NANO_WORLDDIR} \
+ > ${NANO_OBJ}/_.iw 2>&1
+ chflags -R noschg ${NANO_WORLDDIR}
+)
+
+install_etc ( ) (
+
+ pprint 2 "install /etc"
+ pprint 3 "log: ${NANO_OBJ}/_.etc"
+
+ cd ${NANO_SRC}
+ env TARGET_ARCH=${NANO_ARCH} \
+ ${NANO_MAKE} SRCCONF=${SRCCONF} \
+ __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \
+ DESTDIR=${NANO_WORLDDIR} \
+ > ${NANO_OBJ}/_.etc 2>&1
+ # make.conf doesn't get created by default, but some ports need it
+ # so they can spam it.
+ cp /dev/null ${NANO_WORLDDIR}/etc/make.conf
+)
+
+install_kernel ( ) (
+ local extra
+
+ pprint 2 "install kernel ($NANO_KERNEL)"
+ pprint 3 "log: ${NANO_OBJ}/_.ik"
+
+ (
+ if [ -f ${NANO_KERNEL} ] ; then
+ kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'"
+ kernconf=$(basename ${NANO_KERNEL})
+ else
+ kernconf=${NANO_KERNEL}
+ fi
+
+ # Install all built modules if NANO_MODULES=default,
+ # else install only listed modules (none if NANO_MODULES is empty).
+ if [ "${NANO_MODULES}" != "default" ]; then
+ modules_override_arg="MODULES_OVERRIDE='${NANO_MODULES}'"
+ fi
+
+ cd ${NANO_SRC}
+ eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \
+ DESTDIR='${NANO_WORLDDIR}' \
+ SRCCONF='${SRCCONF}' \
+ __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \
+ ${kernconfdir_arg} KERNCONF=${kernconf} \
+ ${modules_override_arg}"
+ ) > ${NANO_OBJ}/_.ik 2>&1
+)
+
+native_xtools ( ) (
+ print 2 "Installing the optimized native build tools for cross env"
+ pprint 3 "log: ${NANO_OBJ}/_.native_xtools"
+
+ cd ${NANO_SRC}
+ env TARGET_ARCH=${NANO_ARCH} \
+ ${NANO_MAKE} SRCCONF=${SRCCONF} \
+ __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \
+ DESTDIR=${NANO_WORLDDIR} \
+ > ${NANO_OBJ}/_.native_xtools 2>&1
+)
+
+run_customize() (
+
+ pprint 2 "run customize scripts"
+ for c in $NANO_CUSTOMIZE
+ do
+ pprint 2 "customize \"$c\""
+ pprint 3 "log: ${NANO_OBJ}/_.cust.$c"
+ pprint 4 "`type $c`"
+ ( set -x ; $c ) > ${NANO_OBJ}/_.cust.$c 2>&1
+ done
+)
+
+run_late_customize() (
+
+ pprint 2 "run late customize scripts"
+ for c in $NANO_LATE_CUSTOMIZE
+ do
+ pprint 2 "late customize \"$c\""
+ pprint 3 "log: ${NANO_OBJ}/_.late_cust.$c"
+ pprint 4 "`type $c`"
+ ( set -x ; $c ) > ${NANO_OBJ}/_.late_cust.$c 2>&1
+ done
+)
+
+setup_nanobsd ( ) (
+ pprint 2 "configure nanobsd setup"
+ pprint 3 "log: ${NANO_OBJ}/_.dl"
+
+ (
+ cd ${NANO_WORLDDIR}
+
+ # Move /usr/local/etc to /etc/local so that the /cfg stuff
+ # can stomp on it. Otherwise packages like ipsec-tools which
+ # have hardcoded paths under ${prefix}/etc are not tweakable.
+ if [ -d usr/local/etc ] ; then
+ (
+ mkdir -p etc/local
+ cd usr/local/etc
+ find . -print | cpio -dumpl ../../../etc/local
+ cd ..
+ nano_rm -rf etc
+ ln -s ../../etc/local etc
+ )
+ fi
+
+ for d in var etc
+ do
+ # link /$d under /conf
+ # we use hard links so we have them both places.
+ # the files in /$d will be hidden by the mount.
+ # XXX: configure /$d ramdisk size
+ mkdir -p conf/base/$d conf/default/$d
+ find $d -print | cpio -dumpl conf/base/
+ done
+
+ echo "$NANO_RAM_ETCSIZE" > conf/base/etc/md_size
+ echo "$NANO_RAM_TMPVARSIZE" > conf/base/var/md_size
+
+ # pick up config files from the special partition
+ echo "mount -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount
+
+ # Put /tmp on the /var ramdisk (could be symlink already)
+ nano_rm -rf tmp
+ ln -s var/tmp tmp
+
+ ) > ${NANO_OBJ}/_.dl 2>&1
+)
+
+setup_nanobsd_etc ( ) (
+ pprint 2 "configure nanobsd /etc"
+
+ (
+ cd ${NANO_WORLDDIR}
+
+ # create diskless marker file
+ touch etc/diskless
+
+ # Make root filesystem R/O by default
+ echo "root_rw_mount=NO" >> etc/defaults/rc.conf
+
+ # save config file for scripts
+ echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
+
+ echo "/dev/${NANO_DRIVE}s1a / ufs ro 1 1" > etc/fstab
+ echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab
+ mkdir -p cfg
+ )
+)
+
+prune_usr() (
+
+ # Remove all empty directories in /usr
+ find ${NANO_WORLDDIR}/usr -type d -depth -print |
+ while read d
+ do
+ rmdir $d > /dev/null 2>&1 || true
+ done
+)
+
+newfs_part ( ) (
+ local dev mnt lbl
+ dev=$1
+ mnt=$2
+ lbl=$3
+ echo newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
+ newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
+ mount -o async ${dev} ${mnt}
+)
+
+# Convenient spot to work around any umount issues that your build environment
+# hits by overriding this method.
+nano_umount () (
+ umount ${1}
+)
+
+populate_slice ( ) (
+ local dev dir mnt lbl
+ dev=$1
+ dir=$2
+ mnt=$3
+ lbl=$4
+ echo "Creating ${dev} (mounting on ${mnt})"
+ newfs_part ${dev} ${mnt} ${lbl}
+ if [ -n "${dir}" -a -d "${dir}" ]; then
+ echo "Populating ${lbl} from ${dir}"
+ cd ${dir}
+ find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${mnt}
+ fi
+ df -i ${mnt}
+ nano_umount ${mnt}
+)
+
+populate_cfg_slice ( ) (
+ populate_slice "$1" "$2" "$3" "$4"
+)
+
+populate_data_slice ( ) (
+ populate_slice "$1" "$2" "$3" "$4"
+)
+
+create_diskimage ( ) (
+ pprint 2 "build diskimage"
+ pprint 3 "log: ${NANO_OBJ}/_.di"
+
+ (
+ echo $NANO_MEDIASIZE $NANO_IMAGES \
+ $NANO_SECTS $NANO_HEADS \
+ $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE |
+ awk '
+ {
+ printf "# %s\n", $0
+
+ # size of cylinder in sectors
+ cs = $3 * $4
+
+ # number of full cylinders on media
+ cyl = int ($1 / cs)
+
+ # output fdisk geometry spec, truncate cyls to 1023
+ if (cyl <= 1023)
+ print "g c" cyl " h" $4 " s" $3
+ else
+ print "g c" 1023 " h" $4 " s" $3
+
+ if ($7 > 0) {
+ # size of data partition in full cylinders
+ dsl = int (($7 + cs - 1) / cs)
+ } else {
+ dsl = 0;
+ }
+
+ # size of config partition in full cylinders
+ csl = int (($6 + cs - 1) / cs)
+
+ if ($5 == 0) {
+ # size of image partition(s) in full cylinders
+ isl = int ((cyl - dsl - csl) / $2)
+ } else {
+ isl = int (($5 + cs - 1) / cs)
+ }
+
+ # First image partition start at second track
+ print "p 1 165 " $3, isl * cs - $3
+ c = isl * cs;
+
+ # Second image partition (if any) also starts offset one
+ # track to keep them identical.
+ if ($2 > 1) {
+ print "p 2 165 " $3 + c, isl * cs - $3
+ c += isl * cs;
+ }
+
+ # Config partition starts at cylinder boundary.
+ print "p 3 165 " c, csl * cs
+ c += csl * cs
+
+ # Data partition (if any) starts at cylinder boundary.
+ if ($7 > 0) {
+ print "p 4 165 " c, dsl * cs
+ } else if ($7 < 0 && $1 > c) {
+ print "p 4 165 " c, $1 - c
+ } else if ($1 < c) {
+ print "Disk space overcommitted by", \
+ c - $1, "sectors" > "/dev/stderr"
+ exit 2
+ }
+
+ # Force slice 1 to be marked active. This is necessary
+ # for booting the image from a USB device to work.
+ print "a 1"
+ }
+ ' > ${NANO_OBJ}/_.fdisk
+
+ IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME}
+ MNT=${NANO_OBJ}/_.mnt
+ mkdir -p ${MNT}
+
+ if [ "${NANO_MD_BACKING}" = "swap" ] ; then
+ MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \
+ -y ${NANO_HEADS}`
+ else
+ echo "Creating md backing file..."
+ nano_rm -f ${IMG}
+ dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0
+ MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
+ -y ${NANO_HEADS}`
+ fi
+
+ trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
+
+ fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD}
+ fdisk ${MD}
+ # XXX: params
+ # XXX: pick up cached boot* files, they may not be in image anymore.
+ if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then
+ boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD}
+ fi
+ if [ -f ${NANO_WORLDDIR}/boot/boot ]; then
+ bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1
+ else
+ bsdlabel -w ${MD}s1
+ fi
+ bsdlabel ${MD}s1
+
+ # Create first image
+ populate_slice /dev/${MD}s1a ${NANO_WORLDDIR} ${MNT} "s1a"
+ mount /dev/${MD}s1a ${MNT}
+ echo "Generating mtree..."
+ ( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree
+ ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du
+ nano_umount ${MNT}
+
+ if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then
+ # Duplicate to second image (if present)
+ echo "Duplicating to second image..."
+ dd conv=sparse if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k
+ mount /dev/${MD}s2a ${MNT}
+ for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab
+ do
+ sed -i "" "s=${NANO_DRIVE}s1=${NANO_DRIVE}s2=g" $f
+ done
+ nano_umount ${MNT}
+ # Override the label from the first partition so we
+ # don't confuse glabel with duplicates.
+ if [ ! -z ${NANO_LABEL} ]; then
+ tunefs -L ${NANO_LABEL}"s2a" /dev/${MD}s2a
+ fi
+ fi
+
+ # Create Config slice
+ populate_cfg_slice /dev/${MD}s3 "${NANO_CFGDIR}" ${MNT} "s3"
+
+ # Create Data slice, if any.
+ if [ $NANO_DATASIZE -ne 0 ] ; then
+ populate_data_slice /dev/${MD}s4 "${NANO_DATADIR}" ${MNT} "s4"
+ fi
+
+ if [ "${NANO_MD_BACKING}" = "swap" ] ; then
+ if [ ${NANO_IMAGE_MBRONLY} ]; then
+ echo "Writing out _.disk.mbr..."
+ dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1
+ else
+ echo "Writing out ${NANO_IMGNAME}..."
+ dd if=/dev/${MD} of=${IMG} bs=64k
+ fi
+
+ echo "Writing out ${NANO_IMGNAME}..."
+ dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
+ fi
+
+ if ${do_copyout_partition} ; then
+ echo "Writing out _.disk.image..."
+ dd conv=sparse if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
+ fi
+ mdconfig -d -u $MD
+
+ trap - 1 2 15
+ trap nano_cleanup EXIT
+
+ ) > ${NANO_OBJ}/_.di 2>&1
+)
+
+last_orders () (
+ # Redefine this function with any last orders you may have
+ # after the build completed, for instance to copy the finished
+ # image to a more convenient place:
+ # cp ${NANO_DISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk
+ true
+)
+
+#######################################################################
+#
+# Optional convenience functions.
+#
+#######################################################################
+
+#######################################################################
+# Common Flash device geometries
+#
+
+FlashDevice () {
+ if [ -d ${NANO_TOOLS} ] ; then
+ . ${NANO_TOOLS}/FlashDevice.sub
+ else
+ . ${NANO_SRC}/${NANO_TOOLS}/FlashDevice.sub
+ fi
+ sub_FlashDevice $1 $2
+}
+
+#######################################################################
+# USB device geometries
+#
+# Usage:
+# UsbDevice Generic 1000 # a generic flash key sold as having 1GB
+#
+# This function will set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS for you.
+#
+# Note that the capacity of a flash key is usually advertised in MB or
+# GB, *not* MiB/GiB. As such, the precise number of cylinders available
+# for C/H/S geometry may vary depending on the actual flash geometry.
+#
+# The following generic device layouts are understood:
+# generic An alias for generic-hdd.
+# generic-hdd 255H 63S/T xxxxC with no MBR restrictions.
+# generic-fdd 64H 32S/T xxxxC with no MBR restrictions.
+#
+# The generic-hdd device is preferred for flash devices larger than 1GB.
+#
+
+UsbDevice () {
+ a1=`echo $1 | tr '[:upper:]' '[:lower:]'`
+ case $a1 in
+ generic-fdd)
+ NANO_HEADS=64
+ NANO_SECTS=32
+ NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 ))
+ ;;
+ generic|generic-hdd)
+ NANO_HEADS=255
+ NANO_SECTS=63
+ NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 ))
+ ;;
+ *)
+ echo "Unknown USB flash device"
+ exit 2
+ ;;
+ esac
+}
+
+#######################################################################
+# Setup serial console
+
+cust_comconsole () (
+ # Enable getty on console
+ sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys
+
+ # Disable getty on syscons devices
+ sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' ${NANO_WORLDDIR}/etc/ttys
+
+ # Tell loader to use serial console early.
+ echo "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config
+)
+
+#######################################################################
+# Allow root login via ssh
+
+cust_allow_ssh_root () (
+ sed -i "" -e '/PermitRootLogin/s/.*/PermitRootLogin yes/' \
+ ${NANO_WORLDDIR}/etc/ssh/sshd_config
+)
+
+#######################################################################
+# Install the stuff under ./Files
+
+cust_install_files () (
+ cd ${NANO_TOOLS}/Files
+ find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -Ldumpv ${NANO_WORLDDIR}
+)
+
+#######################################################################
+# Install packages from ${NANO_PACKAGE_DIR}
+
+cust_pkg () (
+
+ # If the package directory doesn't exist, we're done.
+ if [ ! -d ${NANO_PACKAGE_DIR} ]; then
+ echo "DONE 0 packages"
+ return 0
+ fi
+
+ # Copy packages into chroot
+ mkdir -p ${NANO_WORLDDIR}/Pkg ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg
+ (
+ cd ${NANO_PACKAGE_DIR}
+ find ${NANO_PACKAGE_LIST} -print |
+ cpio -Ldumpv ${NANO_WORLDDIR}/Pkg
+ )
+
+ # Count & report how many we have to install
+ todo=`ls ${NANO_WORLDDIR}/Pkg | wc -l`
+ echo "=== TODO: $todo"
+ ls ${NANO_WORLDDIR}/Pkg
+ echo "==="
+ while true
+ do
+ # Record how many we have now
+ have=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l`
+
+ # Attempt to install more packages
+ # ...but no more than 200 at a time due to pkg_add's internal
+ # limitations.
+ CR0 'ls Pkg/*tbz | xargs -n 200 env PKG_DBDIR='${NANO_PKG_META_BASE}'/pkg pkg_add -v -F'
+
+ # See what that got us
+ now=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l`
+ echo "=== NOW $now"
+ ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg
+ echo "==="
+
+
+ if [ $now -eq $todo ] ; then
+ echo "DONE $now packages"
+ break
+ elif [ $now -eq $have ] ; then
+ echo "FAILED: Nothing happened on this pass"
+ exit 2
+ fi
+ done
+ nano_rm -rf ${NANO_WORLDDIR}/Pkg
+)
+
+cust_pkgng () (
+
+ # If the package directory doesn't exist, we're done.
+ if [ ! -d ${NANO_PACKAGE_DIR} ]; then
+ echo "DONE 0 packages"
+ return 0
+ fi
+
+ # Find a pkg-* package
+ for x in `find -s ${NANO_PACKAGE_DIR} -iname 'pkg-*'`; do
+ _NANO_PKG_PACKAGE=`basename "$x"`
+ done
+ if [ -z "${_NANO_PKG_PACKAGE}" -o ! -f "${NANO_PACKAGE_DIR}/${_NANO_PKG_PACKAGE}" ]; then
+ echo "FAILED: need a pkg/ package for bootstrapping"
+ exit 2
+ fi
+
+ # Copy packages into chroot
+ mkdir -p ${NANO_WORLDDIR}/Pkg
+ (
+ cd ${NANO_PACKAGE_DIR}
+ find ${NANO_PACKAGE_LIST} -print |
+ cpio -Ldumpv ${NANO_WORLDDIR}/Pkg
+ )
+
+ #Bootstrap pkg
+ CR env ASSUME_ALWAYS_YES=YES SIGNATURE_TYPE=none /usr/sbin/pkg add /Pkg/${_NANO_PKG_PACKAGE}
+ CR pkg -N >/dev/null 2>&1
+ if [ "$?" -ne "0" ]; then
+ echo "FAILED: pkg bootstrapping faied"
+ exit 2
+ fi
+ nano_rm -f ${NANO_WORLDDIR}/Pkg/pkg-*
+
+ # Count & report how many we have to install
+ todo=`ls ${NANO_WORLDDIR}/Pkg | /usr/bin/wc -l`
+ todo=$(expr $todo + 1) # add one for pkg since it is installed already
+ echo "=== TODO: $todo"
+ ls ${NANO_WORLDDIR}/Pkg
+ echo "==="
+ while true
+ do
+ # Record how many we have now
+ have=$(CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l)
+
+ # Attempt to install more packages
+ CR0 'ls 'Pkg/*txz' | xargs env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg add'
+
+ # See what that got us
+ now=$(CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l)
+ echo "=== NOW $now"
+ CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info
+ echo "==="
+ if [ $now -eq $todo ] ; then
+ echo "DONE $now packages"
+ break
+ elif [ $now -eq $have ] ; then
+ echo "FAILED: Nothing happened on this pass"
+ exit 2
+ fi
+ done
+ nano_rm -rf ${NANO_WORLDDIR}/Pkg
+)
+
+#######################################################################
+# Convenience function:
+# Register all args as customize function.
+
+customize_cmd () {
+ NANO_CUSTOMIZE="$NANO_CUSTOMIZE $*"
+}
+
+#######################################################################
+# Convenience function:
+# Register all args as late customize function to run just before
+# image creation.
+
+late_customize_cmd () {
+ NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $*"
+}
+
+#######################################################################
+#
+# All set up to go...
+#
+#######################################################################
+
+# Progress Print
+# Print $2 at level $1.
+pprint() (
+ if [ "$1" -le $PPLEVEL ]; then
+ runtime=$(( `date +%s` - $NANO_STARTTIME ))
+ printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$2" 1>&3
+ fi
+)
+
+usage () {
+ (
+ echo "Usage: $0 [-bfiKknqvw] [-c config_file]"
+ echo " -b suppress builds (both kernel and world)"
+ echo " -c specify config file"
+ echo " -f suppress code slice extraction"
+ echo " -i suppress disk image build"
+ echo " -K suppress installkernel"
+ echo " -k suppress buildkernel"
+ echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc"
+ echo " -q make output more quiet"
+ echo " -v make output more verbose"
+ echo " -w suppress buildworld"
+ ) 1>&2
+ exit 2
+}
+
+#######################################################################
+# Setup and Export Internal variables
+#
+
+export_var() {
+ var=$1
+ # Lookup value of the variable.
+ eval val=\$$var
+ pprint 3 "Setting variable: $var=\"$val\""
+ export $1
+}
+
+# Call this function to set defaults _after_ parsing options.
+set_defaults_and_export() {
+ test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME}
+ test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ}
+ test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ}
+ NANO_WORLDDIR=${NANO_OBJ}/_.w
+ NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build
+ NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install
+
+ # Override user's NANO_DRIVE if they specified a NANO_LABEL
+ [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE="ufs/${NANO_LABEL}"
+
+ # Set a default NANO_TOOLS to NANO_SRC/NANO_TOOLS if it exists.
+ [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \
+ NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}"
+
+ NANO_STARTTIME=`date +%s`
+ pprint 3 "Exporting NanoBSD variables"
+ export_var MAKEOBJDIRPREFIX
+ export_var NANO_ARCH
+ export_var NANO_CODESIZE
+ export_var NANO_CONFSIZE
+ export_var NANO_CUSTOMIZE
+ export_var NANO_DATASIZE
+ export_var NANO_DRIVE
+ export_var NANO_HEADS
+ export_var NANO_IMAGES
+ export_var NANO_IMGNAME
+ export_var NANO_MAKE
+ export_var NANO_MAKE_CONF_BUILD
+ export_var NANO_MAKE_CONF_INSTALL
+ export_var NANO_MEDIASIZE
+ export_var NANO_NAME
+ export_var NANO_NEWFS
+ export_var NANO_OBJ
+ export_var NANO_PMAKE
+ export_var NANO_SECTS
+ export_var NANO_SRC
+ export_var NANO_TOOLS
+ export_var NANO_WORLDDIR
+ export_var NANO_BOOT0CFG
+ export_var NANO_BOOTLOADER
+ export_var NANO_LABEL
+ export_var NANO_MODULES
+}
diff --git a/tools/tools/nanobsd/fill_pkg.sh b/tools/tools/nanobsd/fill_pkg.sh
index 8ee953e..be240a3 100644
--- a/tools/tools/nanobsd/fill_pkg.sh
+++ b/tools/tools/nanobsd/fill_pkg.sh
@@ -57,8 +57,8 @@ ports_recurse() (
else
(
cd $d
- rd=`make -V RUN_DEPENDS`
- ld=`make -V LIB_DEPENDS`
+ rd=`make -V RUN_DEPENDS ${PORTS_OPTS}`
+ ld=`make -V LIB_DEPENDS ${PORTS_OPTS}`
for x in $rd $ld
do
@@ -84,8 +84,8 @@ done
for i in `cat $PL`
do
p=`(cd $i && make -V PKGNAME)`
- if [ -f $NANO_PKG_DUMP/$p.tbz ] ; then
- ln -s $NANO_PKG_DUMP/$p.tbz $NANO_PACKAGE_DIR
+ if [ -f $NANO_PKG_DUMP/$p.t[bx]z ] ; then
+ ln -s $NANO_PKG_DUMP/$p.t[bx]z $NANO_PACKAGE_DIR
else
echo "Package $p misssing in $NANO_PKG_DUMP" 1>&2
exit 1
diff --git a/tools/tools/nanobsd/gateworks/Files/root/.profile b/tools/tools/nanobsd/gateworks/Files/root/.profile
index 83dc9b0..769e267 100644
--- a/tools/tools/nanobsd/gateworks/Files/root/.profile
+++ b/tools/tools/nanobsd/gateworks/Files/root/.profile
@@ -1,6 +1,6 @@
# $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $
#
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
export PATH
HOME=/root; export HOME
TERM=${TERM:-xterm}; export TERM
diff --git a/tools/tools/nanobsd/gateworks/G2348 b/tools/tools/nanobsd/gateworks/G2348
index cc691ad..aa5ab01 100644
--- a/tools/tools/nanobsd/gateworks/G2348
+++ b/tools/tools/nanobsd/gateworks/G2348
@@ -41,7 +41,7 @@ options FFS #Berkeley Fast Filesystem
#options SOFTUPDATES #Enable FFS soft updates support
#options UFS_ACL #Support for access control lists
#options UFS_DIRHASH #Improve performance on big directories
-options NFSCLIENT #Network Filesystem Client
+options NFSCL #Network Filesystem Client
options NFSLOCKD #Network Lock Manager
options KTRACE #ktrace(1) support
#options SYSVSHM #SYSV-style shared memory
diff --git a/tools/tools/nanobsd/gateworks/G2358 b/tools/tools/nanobsd/gateworks/G2358
index 487b268..a4617e1 100644
--- a/tools/tools/nanobsd/gateworks/G2358
+++ b/tools/tools/nanobsd/gateworks/G2358
@@ -41,7 +41,7 @@ options FFS #Berkeley Fast Filesystem
#options SOFTUPDATES #Enable FFS soft updates support
#options UFS_ACL #Support for access control lists
#options UFS_DIRHASH #Improve performance on big directories
-options NFSCLIENT #Network Filesystem Client
+options NFSCL #New Network Filesystem Client
options NFSLOCKD #Network Lock Manager
options KTRACE #ktrace(1) support
#options SYSVSHM #SYSV-style shared memory
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
index 437085a..776b246 100644..100755
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -29,899 +29,9 @@
set -e
-#######################################################################
-#
-# Setup default values for all controlling variables.
-# These values can be overridden from the config file(s)
-#
-#######################################################################
-
-# Name of this NanoBSD build. (Used to construct workdir names)
-NANO_NAME=full
-
-# Source tree directory
-NANO_SRC=/usr/src
-
-# Where nanobsd additional files live under the source tree
-NANO_TOOLS=tools/tools/nanobsd
-
-# Where cust_pkg() finds packages to install
-NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg
-NANO_PACKAGE_LIST="*"
-
-# where package metadata gets placed
-NANO_PKG_META_BASE=/var/db
-
-# Object tree directory
-# default is subdir of /usr/obj
-#NANO_OBJ=""
-
-# The directory to put the final images
-# default is ${NANO_OBJ}
-#NANO_DISKIMGDIR=""
-
-# Make & parallel Make
-NANO_MAKE="make"
-NANO_PMAKE="make -j 3"
-
-# The default name for any image we create.
-NANO_IMGNAME="_.disk.full"
-
-# Options to put in make.conf during buildworld only
-CONF_BUILD=' '
-
-# Options to put in make.conf during installworld only
-CONF_INSTALL=' '
-
-# Options to put in make.conf during both build- & installworld.
-CONF_WORLD=' '
-
-# Kernel config file to use
-NANO_KERNEL=GENERIC
-
-# Kernel modules to install. If empty, no modules are installed.
-# Use "default" to install all built modules.
-NANO_MODULES=
-
-# Customize commands.
-NANO_CUSTOMIZE=""
-
-# Late customize commands.
-NANO_LATE_CUSTOMIZE=""
-
-# Newfs paramters to use
-NANO_NEWFS="-b 4096 -f 512 -i 8192 -U"
-
-# The drive name of the media at runtime
-NANO_DRIVE=ad0
-
-# Target media size in 512 bytes sectors
-NANO_MEDIASIZE=2000000
-
-# Number of code images on media (1 or 2)
-NANO_IMAGES=2
-
-# 0 -> Leave second image all zeroes so it compresses better.
-# 1 -> Initialize second image with a copy of the first
-NANO_INIT_IMG2=1
-
-# Size of code file system in 512 bytes sectors
-# If zero, size will be as large as possible.
-NANO_CODESIZE=0
-
-# Size of configuration file system in 512 bytes sectors
-# Cannot be zero.
-NANO_CONFSIZE=2048
-
-# Size of data file system in 512 bytes sectors
-# If zero: no partition configured.
-# If negative: max size possible
-NANO_DATASIZE=0
-
-# Size of the /etc ramdisk in 512 bytes sectors
-NANO_RAM_ETCSIZE=10240
-
-# Size of the /tmp+/var ramdisk in 512 bytes sectors
-NANO_RAM_TMPVARSIZE=10240
-
-# Media geometry, only relevant if bios doesn't understand LBA.
-NANO_SECTS=63
-NANO_HEADS=16
-
-# boot0 flags/options and configuration
-NANO_BOOT0CFG="-o packet -s 1 -m 3"
-NANO_BOOTLOADER="boot/boot0sio"
-
-# boot2 flags/options
-# default force serial console
-NANO_BOOT2CFG="-h"
-
-# Backing type of md(4) device
-# Can be "file" or "swap"
-NANO_MD_BACKING="file"
-
-# for swap type md(4) backing, write out the mbr only
-NANO_IMAGE_MBRONLY=true
-
-# Progress Print level
-PPLEVEL=3
-
-# Set NANO_LABEL to non-blank to form the basis for using /dev/ufs/label
-# in preference to /dev/${NANO_DRIVE}
-# Root partition will be ${NANO_LABEL}s{1,2}
-# /cfg partition will be ${NANO_LABEL}s3
-# /data partition will be ${NANO_LABEL}s4
-NANO_LABEL=""
-
-#######################################################################
-# Architecture to build. Corresponds to TARGET_ARCH in a buildworld.
-# Unfortunately, there's no way to set TARGET at this time, and it
-# conflates the two, so architectures where TARGET != TARGET_ARCH do
-# not work. This defaults to the arch of the current machine.
-
-NANO_ARCH=`uname -p`
-
-# Directory to populate /cfg from
-NANO_CFGDIR=""
-
-# Directory to populate /data from
-NANO_DATADIR=""
-
-# src.conf to use when building the image. Defaults to /dev/null for the sake
-# of determinism.
-SRCCONF=${SRCCONF:=/dev/null}
-
-#######################################################################
-#
-# The functions which do the real work.
-# Can be overridden from the config file(s)
-#
-#######################################################################
-
-# rm doesn't know -x prior to FreeBSD 10, so cope with a variety of build
-# hosts for now.
-nano_rm ( ) {
- case $(uname -r) in
- 7*|8*|9*) rm $* ;;
- *) rm -x $* ;;
- esac
-}
-
-# run in the world chroot, errors fatal
-CR()
-{
- chroot ${NANO_WORLDDIR} /bin/sh -exc "$*"
-}
-
-# run in the world chroot, errors not fatal
-CR0()
-{
- chroot ${NANO_WORLDDIR} /bin/sh -c "$*" || true
-}
-
-nano_cleanup ( ) (
- if [ $? -ne 0 ]; then
- echo "Error encountered. Check for errors in last log file." 1>&2
- fi
- exit $?
-)
-
-clean_build ( ) (
- pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})"
-
- if ! nano_rm -rf ${MAKEOBJDIRPREFIX}/ > /dev/null 2>&1 ; then
- chflags -R noschg ${MAKEOBJDIRPREFIX}/
- nano_rm -r ${MAKEOBJDIRPREFIX}/
- fi
- mkdir -p ${MAKEOBJDIRPREFIX}
- printenv > ${MAKEOBJDIRPREFIX}/_.env
-)
-
-make_conf_build ( ) (
- pprint 2 "Construct build make.conf ($NANO_MAKE_CONF_BUILD)"
-
- echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_BUILD}
- echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD}
-)
-
-build_world ( ) (
- pprint 2 "run buildworld"
- pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw"
-
- cd ${NANO_SRC}
- env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \
- SRCCONF=${SRCCONF} \
- __MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \
- > ${MAKEOBJDIRPREFIX}/_.bw 2>&1
-)
-
-build_kernel ( ) (
- local extra
-
- pprint 2 "build kernel ($NANO_KERNEL)"
- pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk"
-
- (
- if [ -f ${NANO_KERNEL} ] ; then
- kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'"
- kernconf=$(basename ${NANO_KERNEL})
- else
- kernconf=${NANO_KERNEL}
- fi
-
- cd ${NANO_SRC};
- # unset these just in case to avoid compiler complaints
- # when cross-building
- unset TARGET_CPUTYPE
- # Note: We intentionally build all modules, not only the ones in
- # NANO_MODULES so the built world can be reused by multiple images.
- eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \
- SRCCONF='${SRCCONF}' \
- __MAKE_CONF='${NANO_MAKE_CONF_BUILD}' \
- ${kernconfdir_arg} KERNCONF=${kernconf}"
- ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1
-)
-
-clean_world ( ) (
- if [ "${NANO_OBJ}" != "${MAKEOBJDIRPREFIX}" ]; then
- pprint 2 "Clean and create object directory (${NANO_OBJ})"
- if ! nano_rm -rf ${NANO_OBJ}/ > /dev/null 2>&1 ; then
- chflags -R noschg ${NANO_OBJ}
- nano_rm -r ${NANO_OBJ}/
- fi
- mkdir -p ${NANO_OBJ} ${NANO_WORLDDIR}
- printenv > ${NANO_OBJ}/_.env
- else
- pprint 2 "Clean and create world directory (${NANO_WORLDDIR})"
- if ! nano_rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then
- chflags -R noschg ${NANO_WORLDDIR}
- nano_rm -rf ${NANO_WORLDDIR}/
- fi
- mkdir -p ${NANO_WORLDDIR}
- fi
-)
-
-make_conf_install ( ) (
- pprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTALL)"
-
- echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_INSTALL}
- echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF_INSTALL}
-)
-
-install_world ( ) (
- pprint 2 "installworld"
- pprint 3 "log: ${NANO_OBJ}/_.iw"
-
- cd ${NANO_SRC}
- env TARGET_ARCH=${NANO_ARCH} \
- ${NANO_MAKE} SRCCONF=${SRCCONF} \
- __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \
- DESTDIR=${NANO_WORLDDIR} \
- > ${NANO_OBJ}/_.iw 2>&1
- chflags -R noschg ${NANO_WORLDDIR}
-)
-
-install_etc ( ) (
-
- pprint 2 "install /etc"
- pprint 3 "log: ${NANO_OBJ}/_.etc"
-
- cd ${NANO_SRC}
- env TARGET_ARCH=${NANO_ARCH} \
- ${NANO_MAKE} SRCCONF=${SRCCONF} \
- __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \
- DESTDIR=${NANO_WORLDDIR} \
- > ${NANO_OBJ}/_.etc 2>&1
- # make.conf doesn't get created by default, but some ports need it
- # so they can spam it.
- cp /dev/null ${NANO_WORLDDIR}/etc/make.conf
-)
-
-install_kernel ( ) (
- local extra
-
- pprint 2 "install kernel ($NANO_KERNEL)"
- pprint 3 "log: ${NANO_OBJ}/_.ik"
-
- (
- if [ -f ${NANO_KERNEL} ] ; then
- kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'"
- kernconf=$(basename ${NANO_KERNEL})
- else
- kernconf=${NANO_KERNEL}
- fi
-
- # Install all built modules if NANO_MODULES=default,
- # else install only listed modules (none if NANO_MODULES is empty).
- if [ "${NANO_MODULES}" != "default" ]; then
- modules_override_arg="MODULES_OVERRIDE='${NANO_MODULES}'"
- fi
-
- cd ${NANO_SRC}
- eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \
- DESTDIR='${NANO_WORLDDIR}' \
- SRCCONF='${SRCCONF}' \
- __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \
- ${kernconfdir_arg} KERNCONF=${kernconf} \
- ${modules_override_arg}"
- ) > ${NANO_OBJ}/_.ik 2>&1
-)
-
-native_xtools ( ) (
- print 2 "Installing the optimized native build tools for cross env"
- pprint 3 "log: ${NANO_OBJ}/_.native_xtools"
-
- cd ${NANO_SRC}
- env TARGET_ARCH=${NANO_ARCH} \
- ${NANO_MAKE} SRCCONF=${SRCCONF} \
- __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \
- DESTDIR=${NANO_WORLDDIR} \
- > ${NANO_OBJ}/_.native_xtools 2>&1
-)
-
-run_customize() (
-
- pprint 2 "run customize scripts"
- for c in $NANO_CUSTOMIZE
- do
- pprint 2 "customize \"$c\""
- pprint 3 "log: ${NANO_OBJ}/_.cust.$c"
- pprint 4 "`type $c`"
- ( set -x ; $c ) > ${NANO_OBJ}/_.cust.$c 2>&1
- done
-)
-
-run_late_customize() (
-
- pprint 2 "run late customize scripts"
- for c in $NANO_LATE_CUSTOMIZE
- do
- pprint 2 "late customize \"$c\""
- pprint 3 "log: ${NANO_OBJ}/_.late_cust.$c"
- pprint 4 "`type $c`"
- ( set -x ; $c ) > ${NANO_OBJ}/_.late_cust.$c 2>&1
- done
-)
-
-setup_nanobsd ( ) (
- pprint 2 "configure nanobsd setup"
- pprint 3 "log: ${NANO_OBJ}/_.dl"
-
- (
- cd ${NANO_WORLDDIR}
-
- # Move /usr/local/etc to /etc/local so that the /cfg stuff
- # can stomp on it. Otherwise packages like ipsec-tools which
- # have hardcoded paths under ${prefix}/etc are not tweakable.
- if [ -d usr/local/etc ] ; then
- (
- mkdir -p etc/local
- cd usr/local/etc
- find . -print | cpio -dumpl ../../../etc/local
- cd ..
- nano_rm -rf etc
- ln -s ../../etc/local etc
- )
- fi
-
- for d in var etc
- do
- # link /$d under /conf
- # we use hard links so we have them both places.
- # the files in /$d will be hidden by the mount.
- # XXX: configure /$d ramdisk size
- mkdir -p conf/base/$d conf/default/$d
- find $d -print | cpio -dumpl conf/base/
- done
-
- echo "$NANO_RAM_ETCSIZE" > conf/base/etc/md_size
- echo "$NANO_RAM_TMPVARSIZE" > conf/base/var/md_size
-
- # pick up config files from the special partition
- echo "mount -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount
-
- # Put /tmp on the /var ramdisk (could be symlink already)
- test -d tmp && rmdir tmp || nano_rm -f tmp
- ln -s var/tmp tmp
-
- ) > ${NANO_OBJ}/_.dl 2>&1
-)
-
-setup_nanobsd_etc ( ) (
- pprint 2 "configure nanobsd /etc"
-
- (
- cd ${NANO_WORLDDIR}
-
- # create diskless marker file
- touch etc/diskless
-
- # Make root filesystem R/O by default
- echo "root_rw_mount=NO" >> etc/defaults/rc.conf
-
- # save config file for scripts
- echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
-
- echo "/dev/${NANO_DRIVE}s1a / ufs ro 1 1" > etc/fstab
- echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab
- mkdir -p cfg
- )
-)
-
-prune_usr() (
-
- # Remove all empty directories in /usr
- find ${NANO_WORLDDIR}/usr -type d -depth -print |
- while read d
- do
- rmdir $d > /dev/null 2>&1 || true
- done
-)
-
-newfs_part ( ) (
- local dev mnt lbl
- dev=$1
- mnt=$2
- lbl=$3
- echo newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
- newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
- mount -o async ${dev} ${mnt}
-)
-
-# Convenient spot to work around any umount issues that your build environment
-# hits by overriding this method.
-nano_umount () (
- umount ${1}
-)
-
-populate_slice ( ) (
- local dev dir mnt lbl
- dev=$1
- dir=$2
- mnt=$3
- lbl=$4
- echo "Creating ${dev} (mounting on ${mnt})"
- newfs_part ${dev} ${mnt} ${lbl}
- if [ -n "${dir}" -a -d "${dir}" ]; then
- echo "Populating ${lbl} from ${dir}"
- cd ${dir}
- find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${mnt}
- fi
- df -i ${mnt}
- nano_umount ${mnt}
-)
-
-populate_cfg_slice ( ) (
- populate_slice "$1" "$2" "$3" "$4"
-)
-
-populate_data_slice ( ) (
- populate_slice "$1" "$2" "$3" "$4"
-)
-
-create_diskimage ( ) (
- pprint 2 "build diskimage"
- pprint 3 "log: ${NANO_OBJ}/_.di"
-
- (
- echo $NANO_MEDIASIZE $NANO_IMAGES \
- $NANO_SECTS $NANO_HEADS \
- $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE |
- awk '
- {
- printf "# %s\n", $0
-
- # size of cylinder in sectors
- cs = $3 * $4
-
- # number of full cylinders on media
- cyl = int ($1 / cs)
-
- # output fdisk geometry spec, truncate cyls to 1023
- if (cyl <= 1023)
- print "g c" cyl " h" $4 " s" $3
- else
- print "g c" 1023 " h" $4 " s" $3
-
- if ($7 > 0) {
- # size of data partition in full cylinders
- dsl = int (($7 + cs - 1) / cs)
- } else {
- dsl = 0;
- }
-
- # size of config partition in full cylinders
- csl = int (($6 + cs - 1) / cs)
-
- if ($5 == 0) {
- # size of image partition(s) in full cylinders
- isl = int ((cyl - dsl - csl) / $2)
- } else {
- isl = int (($5 + cs - 1) / cs)
- }
-
- # First image partition start at second track
- print "p 1 165 " $3, isl * cs - $3
- c = isl * cs;
-
- # Second image partition (if any) also starts offset one
- # track to keep them identical.
- if ($2 > 1) {
- print "p 2 165 " $3 + c, isl * cs - $3
- c += isl * cs;
- }
-
- # Config partition starts at cylinder boundary.
- print "p 3 165 " c, csl * cs
- c += csl * cs
-
- # Data partition (if any) starts at cylinder boundary.
- if ($7 > 0) {
- print "p 4 165 " c, dsl * cs
- } else if ($7 < 0 && $1 > c) {
- print "p 4 165 " c, $1 - c
- } else if ($1 < c) {
- print "Disk space overcommitted by", \
- c - $1, "sectors" > "/dev/stderr"
- exit 2
- }
-
- # Force slice 1 to be marked active. This is necessary
- # for booting the image from a USB device to work.
- print "a 1"
- }
- ' > ${NANO_OBJ}/_.fdisk
-
- IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME}
- MNT=${NANO_OBJ}/_.mnt
- mkdir -p ${MNT}
-
- if [ "${NANO_MD_BACKING}" = "swap" ] ; then
- MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \
- -y ${NANO_HEADS}`
- else
- echo "Creating md backing file..."
- nano_rm -f ${IMG}
- dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0
- MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
- -y ${NANO_HEADS}`
- fi
-
- trap "echo 'Running exit trap code' ; df -i ${MNT} ; nano_umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT
-
- fdisk -i -f ${NANO_OBJ}/_.fdisk ${MD}
- fdisk ${MD}
- # XXX: params
- # XXX: pick up cached boot* files, they may not be in image anymore.
- if [ -f ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ]; then
- boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_BOOT0CFG} ${MD}
- fi
- if [ -f ${NANO_WORLDDIR}/boot/boot ]; then
- bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1
- else
- bsdlabel -w ${MD}s1
- fi
- bsdlabel ${MD}s1
-
- # Create first image
- populate_slice /dev/${MD}s1a ${NANO_WORLDDIR} ${MNT} "s1a"
- mount /dev/${MD}s1a ${MNT}
- echo "Generating mtree..."
- ( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree
- ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du
- nano_umount ${MNT}
-
- if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then
- # Duplicate to second image (if present)
- echo "Duplicating to second image..."
- dd conv=sparse if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k
- mount /dev/${MD}s2a ${MNT}
- for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab
- do
- sed -i "" "s=${NANO_DRIVE}s1=${NANO_DRIVE}s2=g" $f
- done
- nano_umount ${MNT}
- # Override the label from the first partition so we
- # don't confuse glabel with duplicates.
- if [ ! -z ${NANO_LABEL} ]; then
- tunefs -L ${NANO_LABEL}"s2a" /dev/${MD}s2a
- fi
- fi
-
- # Create Config slice
- populate_cfg_slice /dev/${MD}s3 "${NANO_CFGDIR}" ${MNT} "s3"
-
- # Create Data slice, if any.
- if [ $NANO_DATASIZE -ne 0 ] ; then
- populate_data_slice /dev/${MD}s4 "${NANO_DATADIR}" ${MNT} "s4"
- fi
-
- if [ "${NANO_MD_BACKING}" = "swap" ] ; then
- if [ ${NANO_IMAGE_MBRONLY} ]; then
- echo "Writing out _.disk.mbr..."
- dd if=/dev/${MD} of=${NANO_DISKIMGDIR}/_.disk.mbr bs=512 count=1
- else
- echo "Writing out ${NANO_IMGNAME}..."
- dd if=/dev/${MD} of=${IMG} bs=64k
- fi
-
- echo "Writing out ${NANO_IMGNAME}..."
- dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
- fi
-
- if ${do_copyout_partition} ; then
- echo "Writing out _.disk.image..."
- dd conv=sparse if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
- fi
- mdconfig -d -u $MD
-
- trap - 1 2 15
- trap nano_cleanup EXIT
-
- ) > ${NANO_OBJ}/_.di 2>&1
-)
-
-last_orders () (
- # Redefine this function with any last orders you may have
- # after the build completed, for instance to copy the finished
- # image to a more convenient place:
- # cp ${NANO_DISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk
- true
-)
-
-#######################################################################
-#
-# Optional convenience functions.
-#
-#######################################################################
-
-#######################################################################
-# Common Flash device geometries
-#
-
-FlashDevice () {
- if [ -d ${NANO_TOOLS} ] ; then
- . ${NANO_TOOLS}/FlashDevice.sub
- else
- . ${NANO_SRC}/${NANO_TOOLS}/FlashDevice.sub
- fi
- sub_FlashDevice $1 $2
-}
-
-#######################################################################
-# USB device geometries
-#
-# Usage:
-# UsbDevice Generic 1000 # a generic flash key sold as having 1GB
-#
-# This function will set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS for you.
-#
-# Note that the capacity of a flash key is usually advertised in MB or
-# GB, *not* MiB/GiB. As such, the precise number of cylinders available
-# for C/H/S geometry may vary depending on the actual flash geometry.
-#
-# The following generic device layouts are understood:
-# generic An alias for generic-hdd.
-# generic-hdd 255H 63S/T xxxxC with no MBR restrictions.
-# generic-fdd 64H 32S/T xxxxC with no MBR restrictions.
-#
-# The generic-hdd device is preferred for flash devices larger than 1GB.
-#
-
-UsbDevice () {
- a1=`echo $1 | tr '[:upper:]' '[:lower:]'`
- case $a1 in
- generic-fdd)
- NANO_HEADS=64
- NANO_SECTS=32
- NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 ))
- ;;
- generic|generic-hdd)
- NANO_HEADS=255
- NANO_SECTS=63
- NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 ))
- ;;
- *)
- echo "Unknown USB flash device"
- exit 2
- ;;
- esac
-}
-
-#######################################################################
-# Setup serial console
-
-cust_comconsole () (
- # Enable getty on console
- sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys
-
- # Disable getty on syscons devices
- sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' ${NANO_WORLDDIR}/etc/ttys
-
- # Tell loader to use serial console early.
- echo "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config
-)
-
-#######################################################################
-# Allow root login via ssh
-
-cust_allow_ssh_root () (
- sed -i "" -e '/PermitRootLogin/s/.*/PermitRootLogin yes/' \
- ${NANO_WORLDDIR}/etc/ssh/sshd_config
-)
-
-#######################################################################
-# Install the stuff under ./Files
-
-cust_install_files () (
- cd ${NANO_TOOLS}/Files
- find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -Ldumpv ${NANO_WORLDDIR}
-)
-
-#######################################################################
-# Install packages from ${NANO_PACKAGE_DIR}
-
-cust_pkg () (
-
- # If the package directory doesn't exist, we're done.
- if [ ! -d ${NANO_PACKAGE_DIR} ]; then
- echo "DONE 0 packages"
- return 0
- fi
-
- # Copy packages into chroot
- mkdir -p ${NANO_WORLDDIR}/Pkg ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg
- (
- cd ${NANO_PACKAGE_DIR}
- find ${NANO_PACKAGE_LIST} -print |
- cpio -Ldumpv ${NANO_WORLDDIR}/Pkg
- )
-
- # Count & report how many we have to install
- todo=`ls ${NANO_WORLDDIR}/Pkg | wc -l`
- echo "=== TODO: $todo"
- ls ${NANO_WORLDDIR}/Pkg
- echo "==="
- while true
- do
- # Record how many we have now
- have=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l`
-
- # Attempt to install more packages
- # ...but no more than 200 at a time due to pkg_add's internal
- # limitations.
- CR0 'ls Pkg/*tbz | xargs -n 200 env PKG_DBDIR='${NANO_PKG_META_BASE}'/pkg pkg_add -v -F'
-
- # See what that got us
- now=`ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg | wc -l`
- echo "=== NOW $now"
- ls ${NANO_WORLDDIR}/${NANO_PKG_META_BASE}/pkg
- echo "==="
-
-
- if [ $now -eq $todo ] ; then
- echo "DONE $now packages"
- break
- elif [ $now -eq $have ] ; then
- echo "FAILED: Nothing happened on this pass"
- exit 2
- fi
- done
- nano_rm -rf ${NANO_WORLDDIR}/Pkg
-)
-
-cust_pkgng () (
-
- # If the package directory doesn't exist, we're done.
- if [ ! -d ${NANO_PACKAGE_DIR} ]; then
- echo "DONE 0 packages"
- return 0
- fi
-
- # Find a pkg-* package
- for x in `find -s ${NANO_PACKAGE_DIR} -iname 'pkg-*'`; do
- _NANO_PKG_PACKAGE=`basename "$x"`
- done
- if [ -z "${_NANO_PKG_PACKAGE}" -o ! -f "${NANO_PACKAGE_DIR}/${_NANO_PKG_PACKAGE}" ]; then
- echo "FAILED: need a pkg/ package for bootstrapping"
- exit 2
- fi
-
- # Copy packages into chroot
- mkdir -p ${NANO_WORLDDIR}/Pkg
- (
- cd ${NANO_PACKAGE_DIR}
- find ${NANO_PACKAGE_LIST} -print |
- cpio -Ldumpv ${NANO_WORLDDIR}/Pkg
- )
-
- #Bootstrap pkg
- CR env ASSUME_ALWAYS_YES=YES SIGNATURE_TYPE=none /usr/sbin/pkg add /Pkg/${_NANO_PKG_PACKAGE}
- CR pkg -N >/dev/null 2>&1
- if [ "$?" -ne "0" ]; then
- echo "FAILED: pkg bootstrapping faied"
- exit 2
- fi
- nano_rm -f ${NANO_WORLDDIR}/Pkg/pkg-*
-
- # Count & report how many we have to install
- todo=`ls ${NANO_WORLDDIR}/Pkg | /usr/bin/wc -l`
- todo=$(expr $todo + 1) # add one for pkg since it is installed already
- echo "=== TODO: $todo"
- ls ${NANO_WORLDDIR}/Pkg
- echo "==="
- while true
- do
- # Record how many we have now
- have=$(CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l)
-
- # Attempt to install more packages
- CR0 'ls 'Pkg/*txz' | xargs env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg add'
-
- # See what that got us
- now=$(CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info | /usr/bin/wc -l)
- echo "=== NOW $now"
- CR env ASSUME_ALWAYS_YES=YES /usr/sbin/pkg info
- echo "==="
- if [ $now -eq $todo ] ; then
- echo "DONE $now packages"
- break
- elif [ $now -eq $have ] ; then
- echo "FAILED: Nothing happened on this pass"
- exit 2
- fi
- done
- nano_rm -rf ${NANO_WORLDDIR}/Pkg
-)
-
-#######################################################################
-# Convenience function:
-# Register all args as customize function.
-
-customize_cmd () {
- NANO_CUSTOMIZE="$NANO_CUSTOMIZE $*"
-}
-
-#######################################################################
-# Convenience function:
-# Register all args as late customize function to run just before
-# image creation.
-
-late_customize_cmd () {
- NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $*"
-}
-
-#######################################################################
-#
-# All set up to go...
-#
-#######################################################################
-
-# Progress Print
-# Print $2 at level $1.
-pprint() (
- if [ "$1" -le $PPLEVEL ]; then
- runtime=$(( `date +%s` - $NANO_STARTTIME ))
- printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$2" 1>&3
- fi
-)
-
-usage () {
- (
- echo "Usage: $0 [-bfiKknqvw] [-c config_file]"
- echo " -K suppress installkernel"
- echo " -b suppress builds (both kernel and world)"
- echo " -c specify config file"
- echo " -f suppress code slice extraction"
- echo " -i suppress disk image build"
- echo " -k suppress buildkernel"
- echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc"
- echo " -q make output more quiet"
- echo " -v make output more verbose"
- echo " -w suppress buildworld"
- ) 1>&2
- exit 2
-}
+nanobsd_sh=`realpath $0`
+topdir=`dirname ${nanobsd_sh}`
+. "${topdir}/defaults.sh"
#######################################################################
# Parse arguments
@@ -1011,74 +121,22 @@ if [ $# -gt 0 ] ; then
usage
fi
-trap nano_cleanup EXIT
-
#######################################################################
-# Setup and Export Internal variables
-#
-test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME}
-test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ}
-test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ}
+# And then it is as simple as that...
-NANO_WORLDDIR=${NANO_OBJ}/_.w
-NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build
-NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install
+# File descriptor 3 is used for logging output, see pprint
+exec 3>&1
+set_defaults_and_export
-if [ -d ${NANO_TOOLS} ] ; then
- true
-elif [ -d ${NANO_SRC}/${NANO_TOOLS} ] ; then
- NANO_TOOLS=${NANO_SRC}/${NANO_TOOLS}
-else
+if [ ! -d "${NANO_TOOLS}" ]; then
echo "NANO_TOOLS directory does not exist" 1>&2
exit 1
fi
-if $do_clean ; then
- true
-else
- NANO_MAKE="${NANO_MAKE} -DNO_CLEAN"
+if ! $do_clean; then
NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN"
fi
-# Override user's NANO_DRIVE if they specified a NANO_LABEL
-if [ ! -z "${NANO_LABEL}" ]; then
- NANO_DRIVE=ufs/${NANO_LABEL}
-fi
-
-export MAKEOBJDIRPREFIX
-
-export NANO_ARCH
-export NANO_CODESIZE
-export NANO_CONFSIZE
-export NANO_CUSTOMIZE
-export NANO_DATASIZE
-export NANO_DRIVE
-export NANO_HEADS
-export NANO_IMAGES
-export NANO_IMGNAME
-export NANO_MAKE
-export NANO_MAKE_CONF_BUILD
-export NANO_MAKE_CONF_INSTALL
-export NANO_MEDIASIZE
-export NANO_NAME
-export NANO_NEWFS
-export NANO_OBJ
-export NANO_PMAKE
-export NANO_SECTS
-export NANO_SRC
-export NANO_TOOLS
-export NANO_WORLDDIR
-export NANO_BOOT0CFG
-export NANO_BOOTLOADER
-export NANO_LABEL
-
-#######################################################################
-# And then it is as simple as that...
-
-# File descriptor 3 is used for logging output, see pprint
-exec 3>&1
-
-NANO_STARTTIME=`date +%s`
pprint 1 "NanoBSD image ${NANO_NAME} build starting"
if $do_world ; then
diff --git a/tools/tools/nanobsd/pcengines/ALIX_DSK b/tools/tools/nanobsd/pcengines/ALIX_DSK
index 1d750e5..b46f3ee3 100644
--- a/tools/tools/nanobsd/pcengines/ALIX_DSK
+++ b/tools/tools/nanobsd/pcengines/ALIX_DSK
@@ -14,7 +14,7 @@ options FFS
options SOFTUPDATES
options UFS_ACL
options UFS_DIRHASH
-options NFSCLIENT
+options NFSCL # Network Filesystem Client
options NFSLOCKD
options MSDOSFS
options CD9660
@@ -26,7 +26,9 @@ options COMPAT_43TTY
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options COMPAT_FREEBSD6 # Compatible with FreeBSD6
-options COMPAT_FREEBSD7
+options COMPAT_FREEBSD7 # Compatible with FreeBSD7
+options COMPAT_FREEBSD9 # Compatible with FreeBSD9
+options COMPAT_FREEBSD10 # Compatible with FreeBSD10
options SCSI_DELAY=5000
options SYSVSHM
options SYSVMSG
diff --git a/tools/tools/nanobsd/pcengines/ALIX_NFS b/tools/tools/nanobsd/pcengines/ALIX_NFS
index 3c0f0da..6555ed5 100644
--- a/tools/tools/nanobsd/pcengines/ALIX_NFS
+++ b/tools/tools/nanobsd/pcengines/ALIX_NFS
@@ -14,7 +14,7 @@ options FFS
options SOFTUPDATES
options UFS_ACL
options UFS_DIRHASH
-options NFSCLIENT
+options NFSCL # Network Filesystem Client
options NFSLOCKD
options MSDOSFS
options CD9660
@@ -23,7 +23,12 @@ options PSEUDOFS
options GEOM_PART_GPT
options GEOM_LABEL
options COMPAT_43TTY
-options COMPAT_FREEBSD7
+options COMPAT_FREEBSD4 # Compatible with FreeBSD4
+options COMPAT_FREEBSD5 # Compatible with FreeBSD5
+options COMPAT_FREEBSD6 # Compatible with FreeBSD6
+options COMPAT_FREEBSD7 # Compatible with FreeBSD7
+options COMPAT_FREEBSD9 # Compatible with FreeBSD9
+options COMPAT_FREEBSD10 # Compatible with FreeBSD10
options SCSI_DELAY=5000
options SYSVSHM
options SYSVMSG
diff --git a/tools/tools/nanobsd/pcengines/Files/root/.cshrc b/tools/tools/nanobsd/pcengines/Files/root/.cshrc
index 36df9c6..49151c5 100644
--- a/tools/tools/nanobsd/pcengines/Files/root/.cshrc
+++ b/tools/tools/nanobsd/pcengines/Files/root/.cshrc
@@ -14,7 +14,7 @@ alias ll ls -lA
# A righteous umask
umask 22
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
setenv EDITOR vi
setenv PAGER more
diff --git a/tools/tools/nanobsd/pcengines/Files/root/.login b/tools/tools/nanobsd/pcengines/Files/root/.login
index 3032ef9..196a640 100644
--- a/tools/tools/nanobsd/pcengines/Files/root/.login
+++ b/tools/tools/nanobsd/pcengines/Files/root/.login
@@ -6,4 +6,4 @@
#
# Uncomment to display a random cookie each login:
-# [ -x /usr/games/fortune ] && /usr/games/fortune -s
+# [ -x /usr/bin/fortune ] && /usr/bin/fortune -s
diff --git a/tools/tools/nanobsd/pcengines/common.conf b/tools/tools/nanobsd/pcengines/common.conf
index 53e359d..e1179bd 100644
--- a/tools/tools/nanobsd/pcengines/common.conf
+++ b/tools/tools/nanobsd/pcengines/common.conf
@@ -29,6 +29,7 @@ CONF_WORLD='
#TARGET_ARCH=i386
CFLAGS=-O -pipe
WITHOUT_ACPI=
+WITHOUT_TESTS=
MODULES_OVERRIDE=netgraph rc4
BOOT_PXELDR_PROBE_KEYBOARD=1
BOOT_PXELDR_ALWAYS_SERIAL=1
diff --git a/tools/tools/nanobsd/rescue/Files/root/.cshrc b/tools/tools/nanobsd/rescue/Files/root/.cshrc
index 5e6d31d..8098c19 100644
--- a/tools/tools/nanobsd/rescue/Files/root/.cshrc
+++ b/tools/tools/nanobsd/rescue/Files/root/.cshrc
@@ -11,7 +11,7 @@
a lm 'll | more'
a m more
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin)
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin)
setenv MANPATH "/usr/share/man:/usr/X11R6/man:/usr/local/man"
setenv PAGER more
diff --git a/tools/tools/nanobsd/rescue/build.sh b/tools/tools/nanobsd/rescue/build.sh
index 4c109ff..7d2ed80 100755
--- a/tools/tools/nanobsd/rescue/build.sh
+++ b/tools/tools/nanobsd/rescue/build.sh
@@ -23,20 +23,23 @@ fi
sh ../nanobsd.sh $* -c ${CFG}
+if [ \! -d /usr/obj/Rescue ]; then
+ mkdir -p /usr/obj/Rescue
+fi
F32="/usr/obj/Rescue/rescue_${today}_x32"
D32="/usr/obj/nanobsd.rescue_i386"
if [ -f "${D32}/_.disk.full" ]; then
- mv "${D32}/_.disk.full" "${F32}.img"
+ cp "${D32}/_.disk.full" "${F32}.img"
fi
if [ -f "${D32}/_.disk.iso" ]; then
- mv "${D32}/_.disk.iso" "${F32}.iso"
+ cp "${D32}/_.disk.iso" "${F32}.iso"
fi
F64="/usr/obj/Rescue/rescue_${today}_x64"
D64="/usr/obj/nanobsd.rescue_amd64"
if [ -f "${D64}/_.disk.full" ]; then
- mv "${D64}/_.disk.full" "${F64}.img"
+ cp "${D64}/_.disk.full" "${F64}.img"
fi
if [ -f "${D64}/_.disk.iso" ]; then
- mv "${D64}/_.disk.iso" "${F64}.iso"
+ cp "${D64}/_.disk.iso" "${F64}.iso"
fi
diff --git a/tools/tools/nanobsd/rescue/common b/tools/tools/nanobsd/rescue/common
index 3fd06c8..908455e 100644
--- a/tools/tools/nanobsd/rescue/common
+++ b/tools/tools/nanobsd/rescue/common
@@ -31,9 +31,19 @@ CONF_INSTALL='
CONF_WORLD='
#TARGET_ARCH=i386
CFLAGS=-O -pipe
+WITHOUT_TESTS=YES
ALL_MODULES=YES
'
+# Functions
+toLower() {
+ echo $1 | tr "[:upper:]" "[:lower:]"
+}
+
+toUpper() {
+ echo $1 | tr "[:lower:]" "[:upper:]"
+}
+
#customize_cmd cust_comconsole
customize_cmd cust_allow_ssh_root
customize_cmd cust_install_files
@@ -93,16 +103,22 @@ last_orders () (
pprint 2 "last orders"
(
cd ${NANO_WORLDDIR}
- echo "/dev/iso9660/${NANO_LABEL} / cd9660 ro,noatime 0 0" > etc/fstab
+ #makefs converts labels to uppercase anyways
+ BIGLABEL=`toUpper "${NANO_LABEL}"`
+ echo "/dev/iso9660/${BIGLABEL} / cd9660 ro,noatime 0 0" > etc/fstab
echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab
echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab
# echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab
rm -f conf/default/etc/remount
touch conf/default/etc/.keepme
touch conf/default/var/.keepme
+ mkdir bootpool
+ mkdir mnt/a
+ mkdir mnt/b
+ mkdir mnt/c
cd ..
makefs -t cd9660 -o rockridge \
- -o label="${NANO_LABEL}" -o publisher="RMX" \
+ -o label="${BIGLABEL}" -o publisher="RMX" \
-o bootimage="i386;_.w/boot/cdboot" -o no-emul-boot _.disk.iso _.w/
)
)
diff --git a/tools/tools/net80211/wlanstats/Makefile b/tools/tools/net80211/wlanstats/Makefile
index 65d6468..2d23932 100644
--- a/tools/tools/net80211/wlanstats/Makefile
+++ b/tools/tools/net80211/wlanstats/Makefile
@@ -5,8 +5,8 @@
PROG= wlanstats
BINDIR= /usr/local/bin
MAN=
-USEPRIVATELIB= bsdstat
-LDADD= ${LDBSDSTAT}
+LIBADD= bsdstat
+CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/
SRCS= wlanstats.c main.c
diff --git a/tools/tools/netmap/pkt-gen.c b/tools/tools/netmap/pkt-gen.c
index 6063f04..6d9bee6 100644
--- a/tools/tools/netmap/pkt-gen.c
+++ b/tools/tools/netmap/pkt-gen.c
@@ -183,6 +183,8 @@ struct glob_arg {
#define OPT_DUMP 64 /* dump rx/tx traffic */
#define OPT_MONITOR_TX 128
#define OPT_MONITOR_RX 256
+#define OPT_RANDOM_SRC 512
+#define OPT_RANDOM_DST 1024
int dev_type;
#ifndef NO_PCAP
pcap_t *p;
@@ -567,32 +569,44 @@ update_addresses(struct pkt *pkt, struct glob_arg *g)
struct udphdr *udp = &pkt->udp;
do {
- p = ntohs(udp->uh_sport);
- if (p < g->src_ip.port1) { /* just inc, no wrap */
- udp->uh_sport = htons(p + 1);
- break;
- }
- udp->uh_sport = htons(g->src_ip.port0);
+ /* XXX for now it doesn't handle non-random src, random dst */
+ if (g->options & OPT_RANDOM_SRC) {
+ udp->uh_sport = random();
+ ip->ip_src.s_addr = random();
+ } else {
+ p = ntohs(udp->uh_sport);
+ if (p < g->src_ip.port1) { /* just inc, no wrap */
+ udp->uh_sport = htons(p + 1);
+ break;
+ }
+ udp->uh_sport = htons(g->src_ip.port0);
- a = ntohl(ip->ip_src.s_addr);
- if (a < g->src_ip.end) { /* just inc, no wrap */
- ip->ip_src.s_addr = htonl(a + 1);
- break;
- }
- ip->ip_src.s_addr = htonl(g->src_ip.start);
+ a = ntohl(ip->ip_src.s_addr);
+ if (a < g->src_ip.end) { /* just inc, no wrap */
+ ip->ip_src.s_addr = htonl(a + 1);
+ break;
+ }
+ ip->ip_src.s_addr = htonl(g->src_ip.start);
- udp->uh_sport = htons(g->src_ip.port0);
- p = ntohs(udp->uh_dport);
- if (p < g->dst_ip.port1) { /* just inc, no wrap */
- udp->uh_dport = htons(p + 1);
- break;
+ udp->uh_sport = htons(g->src_ip.port0);
}
- udp->uh_dport = htons(g->dst_ip.port0);
- a = ntohl(ip->ip_dst.s_addr);
- if (a < g->dst_ip.end) { /* just inc, no wrap */
- ip->ip_dst.s_addr = htonl(a + 1);
- break;
+ if (g->options & OPT_RANDOM_DST) {
+ udp->uh_dport = random();
+ ip->ip_dst.s_addr = random();
+ } else {
+ p = ntohs(udp->uh_dport);
+ if (p < g->dst_ip.port1) { /* just inc, no wrap */
+ udp->uh_dport = htons(p + 1);
+ break;
+ }
+ udp->uh_dport = htons(g->dst_ip.port0);
+
+ a = ntohl(ip->ip_dst.s_addr);
+ if (a < g->dst_ip.end) { /* just inc, no wrap */
+ ip->ip_dst.s_addr = htonl(a + 1);
+ break;
+ }
}
ip->ip_dst.s_addr = htonl(g->dst_ip.start);
} while (0);
@@ -1394,7 +1408,9 @@ usage(void)
"\t-R rate in packets per second\n"
"\t-X dump payload\n"
"\t-H len add empty virtio-net-header with size 'len'\n"
- "\t-P file load packet from pcap file"
+ "\t-P file load packet from pcap file\n"
+ "\t-z use random IPv4 src address/port\n"
+ "\t-Z use random IPv4 dst address/port\n"
"",
cmd);
@@ -1667,7 +1683,7 @@ main(int arc, char **argv)
g.virt_header = 0;
while ( (ch = getopt(arc, argv,
- "a:f:F:n:i:Il:d:s:D:S:b:c:o:p:T:w:WvR:XC:H:e:m:P:")) != -1) {
+ "a:f:F:n:i:Il:d:s:D:S:b:c:o:p:T:w:WvR:XC:H:e:m:P:zZ")) != -1) {
struct sf *fn;
switch(ch) {
@@ -1813,11 +1829,16 @@ main(int arc, char **argv)
case 'P':
g.packet_file = strdup(optarg);
break;
+ case 'z':
+ g.options |= OPT_RANDOM_SRC;
+ break;
+ case 'Z':
+ g.options |= OPT_RANDOM_DST;
+ break;
}
-
}
- if (g.ifname == NULL) {
+ if (strlen(g.ifname) <=0 ) {
D("missing ifname");
usage();
}
diff --git a/tools/tools/npe/npestats/Makefile b/tools/tools/npe/npestats/Makefile
index a4a404c..740d359 100644
--- a/tools/tools/npe/npestats/Makefile
+++ b/tools/tools/npe/npestats/Makefile
@@ -4,7 +4,7 @@ PROG= npestats
SRCS= main.c npestats.c
BINDIR= /usr/local/bin
MAN=
-USEPRIVATELIB=
-LDADD= -lbsdstat
+LIBADD= bsdstat
+CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/
.include <bsd.prog.mk>
diff --git a/tools/regression/aio/kqueue/Makefile b/tools/tools/qrndtest/Makefile
index 00e24d6..7414144 100644
--- a/tools/regression/aio/kqueue/Makefile
+++ b/tools/tools/qrndtest/Makefile
@@ -1,6 +1,11 @@
+#
# $FreeBSD$
+#
+
+PROG = qrndtest
+
+SRCS = r.c
-PROG= aio_kqueue
MAN=
.include <bsd.prog.mk>
diff --git a/tools/tools/qrndtest/README b/tools/tools/qrndtest/README
new file mode 100644
index 0000000..48f7a6f
--- /dev/null
+++ b/tools/tools/qrndtest/README
@@ -0,0 +1,4 @@
+This is a really quick random testing that I wrote for adrian.
+
+If you want a real randomness tester, look at dieharder that has a much
+larger battery of tests and will tell you if your PRNG is good or not.
diff --git a/tools/tools/qrndtest/r.c b/tools/tools/qrndtest/r.c
new file mode 100644
index 0000000..edfafa7
--- /dev/null
+++ b/tools/tools/qrndtest/r.c
@@ -0,0 +1,81 @@
+/*-
+ * Copyright 2015 John-Mark Gurney.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
+
+typedef uint32_t (*rndfun_t)();
+
+uint32_t
+randomwrap()
+{
+ return random();
+}
+
+struct {
+ const char *name;
+ rndfun_t rndfun;
+} rndfuns[] = {
+ { "random", randomwrap },
+ { "arc4random", arc4random },
+ { NULL, NULL },
+};
+
+int
+main(int argc, char *argv[])
+{
+ uint64_t vals[4] = {};
+ uint64_t avg;
+ unsigned int i;
+ rndfun_t f;
+
+ if (argc == 1)
+ f = rndfuns[0].rndfun;
+ else {
+ for (i = 0; rndfuns[i].name != NULL; i++) {
+ if (strcasecmp(rndfuns[i].name, argv[1]) == 0)
+ break;
+ }
+ if (rndfuns[i].name == NULL)
+ return 1;
+ f = rndfuns[i].rndfun;
+ }
+
+ for (;;) {
+ vals[f() % 4]++;
+ if (((i++) % (4*1024*1024)) == 0) {
+ avg = vals[0] + vals[1] + vals[2] + vals[3];
+ avg /= 4;
+ printf("%d: %ld %ld %ld %ld\n", i, vals[0] - avg, vals[1] - avg, vals[2] - avg, vals[3] - avg);
+ }
+ }
+ return 0;
+}
diff --git a/tools/tools/shlib-compat/shlib-compat.py b/tools/tools/shlib-compat/shlib-compat.py
index 726c53f..ca6f036 100755
--- a/tools/tools/shlib-compat/shlib-compat.py
+++ b/tools/tools/shlib-compat/shlib-compat.py
@@ -60,6 +60,14 @@ class Config(object):
origfile = FileConfig()
newfile = FileConfig()
+ exclude_sym_default = [
+ '^__bss_start$',
+ '^_edata$',
+ '^_end$',
+ '^_fini$',
+ '^_init$',
+ ]
+
@classmethod
def init(cls):
cls.version_filter = StrFilter()
@@ -338,15 +346,17 @@ class BaseTypeDef(Def):
def _pp(self, pp):
if self.encoding in self.inttypes:
sign = '' if self.encoding == 'DW_ATE_signed' else 'u'
- bits = int(self.byte_size) * 8
+ bits = int(self.byte_size, 0) * 8
return '%sint%s_t' % (sign, bits)
- elif self.encoding == 'DW_ATE_signed_char' and int(self.byte_size) == 1:
+ elif self.encoding == 'DW_ATE_signed_char' and int(self.byte_size, 0) == 1:
return 'char';
+ elif self.encoding == 'DW_ATE_boolean' and int(self.byte_size, 0) == 1:
+ return 'bool';
elif self.encoding == 'DW_ATE_float':
- return self._mapval(self.byte_size, {
- '16': 'long double',
- '8': 'double',
- '4': 'float',
+ return self._mapval(int(self.byte_size, 0), {
+ 16: 'long double',
+ 8: 'double',
+ 4: 'float',
})
raise NotImplementedError('Invalid encoding: %s' % self)
@@ -374,6 +384,11 @@ class VolatileTypeDef(AnonymousDef):
def _pp(self, pp):
return 'volatile ' + self.type._pp(pp)
+class RestrictTypeDef(AnonymousDef):
+ _is_alias = True
+ def _pp(self, pp):
+ return 'restrict ' + self.type._pp(pp)
+
class ArrayDef(AnonymousDef):
def _pp(self, pp):
t = pp.run(self.type)
@@ -411,6 +426,11 @@ class ParameterDef(Def):
t = pp.run(self.type)
return "%s %s" % (t, self._name_opt())
+class VariableDef(Def):
+ def _pp(self, pp):
+ t = pp.run(self.type)
+ return "%s %s" % (t, self._name_opt())
+
# TODO
class StructForwardDef(Def):
pass
@@ -485,6 +505,10 @@ class Dwarf(object):
result = self._build_optarg_type(raw)
return FunctionDef(raw.id, raw.name, params=params, result=result)
+ def build_variable(self, raw):
+ type = self._build_optarg_type(raw)
+ return VariableDef(raw.id, raw.optname, type=type)
+
def build_subroutine_type(self, raw):
params = [ self.build(x) for x in raw.nested ]
result = self._build_optarg_type(raw)
@@ -547,6 +571,10 @@ class Dwarf(object):
type = self._build_optarg_type(raw)
return VolatileTypeDef(raw.id, type=type)
+ def build_restrict_type(self, raw):
+ type = self._build_optarg_type(raw)
+ return RestrictTypeDef(raw.id, type=type)
+
def build_enumeration_type(self, raw):
# TODO handle DW_TAG_enumerator ???
return EnumerationTypeDef(raw.id, name=raw.optname,
@@ -574,7 +602,7 @@ class Dwarf(object):
return int(id)
except ValueError:
if (id.startswith('<') and id.endswith('>')):
- return int(id[1:-1])
+ return int(id[1:-1], 0)
else:
raise ValueError("Invalid dwarf id: %s" % id)
@@ -782,7 +810,7 @@ class DwarfdumpParser(Parser):
class Tag(object):
def __init__(self, unit, data):
self.unit = unit
- self.id = int(data['id'])
+ self.id = int(data['id'], 0)
self.level = int(data['level'])
self.tag = data['tag']
self.args = {}
@@ -816,7 +844,7 @@ class DwarfdumpParser(Parser):
def __repr__(self):
return "Tag(%d, %d, %s)" % (self.level, self.id, self.tag)
- re_header = re.compile('<(?P<level>\d+)><(?P<id>\d+\+*\d*)><(?P<tag>\w+)>')
+ re_header = re.compile('<(?P<level>\d+)><(?P<id>[0xX0-9a-fA-F]+(?:\+(0[xX])?[0-9a-fA-F]+)?)><(?P<tag>\w+)>')
re_argname = re.compile('(?P<arg>\w+)<')
re_argunknown = re.compile('<Unknown AT value \w+><[^<>]+>')
@@ -827,6 +855,10 @@ class DwarfdumpParser(Parser):
'DW_TAG_variable',
])
+ external_tags = set([
+ 'DW_TAG_variable',
+ ])
+
def __init__(self, libfile):
Parser.__init__(self, "%s -di %s" % (Config.dwarfdump, libfile))
self.current_unit = None
@@ -888,9 +920,19 @@ class DwarfdumpParser(Parser):
while args:
args = self.parse_arg(tag, args)
tag.unit.tags[tag.id] = tag
- if tag.args.has_key('DW_AT_low_pc') and \
- tag.tag not in DwarfdumpParser.skip_tags:
- offset = int(tag.args['DW_AT_low_pc'], 16)
+ def parse_offset(tag):
+ if tag.args.has_key('DW_AT_low_pc'):
+ return int(tag.args['DW_AT_low_pc'], 16)
+ elif tag.args.has_key('DW_AT_location'):
+ location = tag.args['DW_AT_location']
+ if location.startswith('DW_OP_addr'):
+ return int(location.replace('DW_OP_addr', ''), 16)
+ return None
+ offset = parse_offset(tag)
+ if offset is not None and \
+ (tag.tag not in DwarfdumpParser.skip_tags or \
+ (tag.args.has_key('DW_AT_external') and \
+ tag.tag in DwarfdumpParser.external_tags)):
if self.offsetmap.has_key(offset):
raise ValueError("Dwarf dump parse error: " +
"symbol is aleady defined at offset 0x%x" % offset)
@@ -963,10 +1005,15 @@ def cmp_symbols(commonver):
names.sort()
for symname in names:
sym = ver.symbols[symname]
- match = sym.origsym.definition == sym.newsym.definition
+ missing = sym.origsym.definition is None or sym.newsym.definition is None
+ match = not missing and sym.origsym.definition == sym.newsym.definition
if not match:
App.result_code = 1
if Config.verbose >= 1 or not match:
+ if missing:
+ print '%s: missing definition' % \
+ (sym.origsym.name_ver,)
+ continue
print '%s: definitions %smatch' % \
(sym.origsym.name_ver, "" if match else "mis")
if Config.dump or (not match and not Config.no_dump):
@@ -1035,10 +1082,16 @@ if __name__ == '__main__':
help="result output file for original library", metavar="ORIGFILE")
parser.add_option('--out-new', action='store',
help="result output file for new library", metavar="NEWFILE")
+ parser.add_option('--dwarfdump', action='store',
+ help="path to dwarfdump executable", metavar="DWARFDUMP")
+ parser.add_option('--objdump', action='store',
+ help="path to objdump executable", metavar="OBJDUMP")
parser.add_option('--exclude-ver', action='append', metavar="RE")
parser.add_option('--include-ver', action='append', metavar="RE")
parser.add_option('--exclude-sym', action='append', metavar="RE")
parser.add_option('--include-sym', action='append', metavar="RE")
+ parser.add_option('--no-exclude-sym-default', action='store_true',
+ help="don't exclude special symbols like _init, _end, __bss_start")
for opt in ['alias', 'cached', 'symbol']:
parser.add_option("--w-" + opt,
action="store_true", dest="w_" + opt)
@@ -1049,6 +1102,10 @@ if __name__ == '__main__':
if len(args) != 2:
parser.print_help()
sys.exit(-1)
+ if opts.dwarfdump:
+ Config.dwarfdump = opts.dwarfdump
+ if opts.objdump:
+ Config.objdump = opts.objdump
if opts.out_orig:
Config.origfile.init(opts.out_orig)
if opts.out_new:
@@ -1071,6 +1128,8 @@ if __name__ == '__main__':
opt = getattr(opts, a + k)
if opt:
getattr(v, a).extend(opt)
+ if not opts.no_exclude_sym_default:
+ Config.symbol_filter.exclude.extend(Config.exclude_sym_default)
Config.version_filter.compile()
Config.symbol_filter.compile()
for w in ['w_alias', 'w_cached', 'w_symbol']:
diff --git a/tools/tools/shlib-compat/test/Makefile.inc b/tools/tools/shlib-compat/test/Makefile.inc
index 14aaef6..e1a0719a 100644
--- a/tools/tools/shlib-compat/test/Makefile.inc
+++ b/tools/tools/shlib-compat/test/Makefile.inc
@@ -11,3 +11,5 @@ DEBUG_FLAGS?= -g
VERSION_DEF= ${.CURDIR}/../Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
+
+MK_DEBUG_FILES= yes
diff --git a/tools/tools/shlib-compat/test/regress.sh b/tools/tools/shlib-compat/test/regress.sh
index e113cce..0789fa8 100755
--- a/tools/tools/shlib-compat/test/regress.sh
+++ b/tools/tools/shlib-compat/test/regress.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# $FreeBSD$
-run() { ../shlib-compat.py --no-dump -vv libtest$1/libtest$1.so.0.debug libtest$2/libtest$2.so.0.debug; }
+run() { ../shlib-compat.py --no-dump -vv libtest$1/libtest$1.so.0.full libtest$2/libtest$2.so.0.full; }
echo 1..9
REGRESSION_START($1)
REGRESSION_TEST(`1-1', `run 1 1')
diff --git a/tools/tools/sysbuild/sysbuild.sh b/tools/tools/sysbuild/sysbuild.sh
index 1a32c60..d95b8df 100644
--- a/tools/tools/sysbuild/sysbuild.sh
+++ b/tools/tools/sysbuild/sysbuild.sh
@@ -219,6 +219,10 @@ ports_build() (
ports_recurse . $PORTS_WE_WANT
+ if [ "x${PKG_DIR}" != "x" ] ; then
+ mkdir -p ${PKG_DIR}
+ fi
+
# Now build & install them
for p in `cat /tmp/_.plist`
do
@@ -226,15 +230,12 @@ ports_build() (
t=`echo $p | sed 's,/usr/ports/,,'`
pn=`cd $p && make package-name`
- if [ "x$p" == "x/usr/ports/ports-mgmt/pkg" -o \
- "x$p" == "x/freebsd/ports/ports-mgmt/pkg" ] ; then
+ if [ "x`basename $p`" == "xpkg" ] ; then
log_it "Very Special: $t ($pn)"
(
cd $p
- make clean ${PORTS_OPTS}
- make all ${PORTS_OPTS}
- make install ${PORTS_OPTS}
+ make clean all install ${PORTS_OPTS}
) > _.$b 2>&1 < /dev/null
continue
fi
diff --git a/tools/tools/tscdrift/tscdrift.c b/tools/tools/tscdrift/tscdrift.c
index c607e48..13e754e 100644
--- a/tools/tools/tscdrift/tscdrift.c
+++ b/tools/tools/tscdrift/tscdrift.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2014 Advanced Computing Technologies LLC
+ * Copyright (c) 2014 Hudson River Trading LLC
* Written by: John H. Baldwin <jhb@FreeBSD.org>
* All rights reserved.
*
diff --git a/tools/tools/usbtest/Makefile b/tools/tools/usbtest/Makefile
index 1cc0c83..c674498 100644
--- a/tools/tools/usbtest/Makefile
+++ b/tools/tools/usbtest/Makefile
@@ -30,11 +30,13 @@ SRCS+= usbtest.c
SRCS+= usb_msc_test.c
SRCS+= usb_modem_test.c
SRCS+= usb_control_ep_test.c
+SYSDIR?= ${.CURDIR}/../../../sys
+DPADD+= ${LIBUSB}
LDADD+= -lusb
WARNS= 3
-CFLAGS+= -I ${.CURDIR}/../../../sys/dev/usb/gadget
+CFLAGS+= -I${SYSDIR}/dev/usb/gadget
.include <bsd.prog.mk>
diff --git a/tools/tools/vimage/vimage.8 b/tools/tools/vimage/vimage.8
index 306bf83..3ceb069 100644
--- a/tools/tools/vimage/vimage.8
+++ b/tools/tools/vimage/vimage.8
@@ -178,8 +178,8 @@ The
.Nm
command exits 0 on success, and >0 if an error occurs.
.Sh SEE ALSO
-.Xr jail 8
-.Xr jexec 8
+.Xr jail 8 ,
+.Xr jexec 8 ,
.Xr jls 8
.Sh HISTORY
Network stack virtualization framework first appeared as a patchset
OpenPOWER on IntegriCloud