diff options
author | grehan <grehan@FreeBSD.org> | 2013-07-19 03:27:04 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2013-07-19 03:27:04 +0000 |
commit | 749888363db1320e1cc3818fcd71e411c3a955ca (patch) | |
tree | e4dd80ba19e005ead5dfb35b03225d5fb4926884 /tools | |
parent | c8195f5331ccad33ad4e265362523f51b96abd5c (diff) | |
parent | 61d6ee86f76db7ef69b0748be4d4b6e14ffc7109 (diff) | |
download | FreeBSD-src-749888363db1320e1cc3818fcd71e411c3a955ca.zip FreeBSD-src-749888363db1320e1cc3818fcd71e411c3a955ca.tar.gz |
IFC @ r253461
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build/mk/OptionalObsoleteFiles.inc | 2 | ||||
-rw-r--r-- | tools/build/options/WITHOUT_ARM_EABI | 2 | ||||
-rw-r--r-- | tools/build/options/WITH_ARM_EABI | 2 | ||||
-rw-r--r-- | tools/build/options/WITH_PKGTOOLS (renamed from tools/build/options/WITHOUT_PKGTOOLS) | 2 | ||||
-rwxr-xr-x | tools/build/options/makeman | 1 | ||||
-rw-r--r-- | tools/regression/aio/aiop/aiop.c | 3 | ||||
-rw-r--r-- | tools/regression/bin/sh/execution/int-cmd1.0 | 3 | ||||
-rw-r--r-- | tools/regression/lib/libc/gen/test-fpclassify.c | 1 | ||||
-rw-r--r-- | tools/regression/lib/libc/gen/test-ftw.c | 2 | ||||
-rw-r--r-- | tools/regression/priv/Makefile | 2 | ||||
-rw-r--r-- | tools/regression/pthread/cv_cancel1/cv_cancel1.c | 1 | ||||
-rw-r--r-- | tools/regression/sbin/dhclient/Makefile | 1 | ||||
-rw-r--r-- | tools/tools/crypto/ipsecstats.c | 54 | ||||
-rw-r--r-- | tools/tools/zfsboottest/zfsboottest.c | 7 | ||||
-rwxr-xr-x | tools/tools/zfsboottest/zfsboottest.sh | 18 |
15 files changed, 48 insertions, 53 deletions
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 9c6dbae..35d71e2 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -206,7 +206,9 @@ OLD_FILES+=usr/share/man/man8/auditd.8.gz .if ${MK_AUTHPF} == no OLD_FILES+=usr/sbin/authpf +OLD_FILES+=usr/sbin/authpf-noip OLD_FILES+=usr/share/man/man8/authpf.8.gz +OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz .endif .if ${MK_BIND} == no diff --git a/tools/build/options/WITHOUT_ARM_EABI b/tools/build/options/WITHOUT_ARM_EABI new file mode 100644 index 0000000..58e8348 --- /dev/null +++ b/tools/build/options/WITHOUT_ARM_EABI @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set the ARM ABI to OABI. diff --git a/tools/build/options/WITH_ARM_EABI b/tools/build/options/WITH_ARM_EABI deleted file mode 100644 index dba6e5f..0000000 --- a/tools/build/options/WITH_ARM_EABI +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Set the ARM ABI to EABI. diff --git a/tools/build/options/WITHOUT_PKGTOOLS b/tools/build/options/WITH_PKGTOOLS index a1c7c56..0c09224 100644 --- a/tools/build/options/WITHOUT_PKGTOOLS +++ b/tools/build/options/WITH_PKGTOOLS @@ -1,4 +1,4 @@ .\" $FreeBSD$ -Set to not build +Set to build .Xr pkg_add 8 and related programs. diff --git a/tools/build/options/makeman b/tools/build/options/makeman index f65c16c..cb4d946 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -3,6 +3,7 @@ # This file is in the public domain. set -o errexit +LC_ALL=C ident='$FreeBSD$' diff --git a/tools/regression/aio/aiop/aiop.c b/tools/regression/aio/aiop/aiop.c index 31a977e..3e64dbe 100644 --- a/tools/regression/aio/aiop/aiop.c +++ b/tools/regression/aio/aiop/aiop.c @@ -39,6 +39,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -186,7 +187,7 @@ main(int argc, char *argv[]) perror("unknown file type\n"); exit(1); } - printf("File: %s; File size %qd bytes\n", fn, file_size); + 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 *)); diff --git a/tools/regression/bin/sh/execution/int-cmd1.0 b/tools/regression/bin/sh/execution/int-cmd1.0 new file mode 100644 index 0000000..a1f097b --- /dev/null +++ b/tools/regression/bin/sh/execution/int-cmd1.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ + +! echo echo bad | $SH -ic 'fi' 2>/dev/null diff --git a/tools/regression/lib/libc/gen/test-fpclassify.c b/tools/regression/lib/libc/gen/test-fpclassify.c index 8431fe8..799c134 100644 --- a/tools/regression/lib/libc/gen/test-fpclassify.c +++ b/tools/regression/lib/libc/gen/test-fpclassify.c @@ -28,6 +28,7 @@ #include <assert.h> #include <math.h> +#include <stdio.h> #include <stdlib.h> int diff --git a/tools/regression/lib/libc/gen/test-ftw.c b/tools/regression/lib/libc/gen/test-ftw.c index adb0a17..209f033 100644 --- a/tools/regression/lib/libc/gen/test-ftw.c +++ b/tools/regression/lib/libc/gen/test-ftw.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include <sys/wait.h> #include <assert.h> +#include <err.h> #include <errno.h> #include <fcntl.h> #include <ftw.h> @@ -41,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include <stdlib.h> #include <string.h> #include <spawn.h> +#include <unistd.h> extern char **environ; diff --git a/tools/regression/priv/Makefile b/tools/regression/priv/Makefile index 663d68d..9ed28a7 100644 --- a/tools/regression/priv/Makefile +++ b/tools/regression/priv/Makefile @@ -45,7 +45,7 @@ SRCS= main.c \ priv_vm_mlock.c \ priv_vm_munlock.c -NO_MAN= +MAN= WARNS?= 3 DPADD+= ${LIBIPSEC} diff --git a/tools/regression/pthread/cv_cancel1/cv_cancel1.c b/tools/regression/pthread/cv_cancel1/cv_cancel1.c index cacad44..2ae94c5 100644 --- a/tools/regression/pthread/cv_cancel1/cv_cancel1.c +++ b/tools/regression/pthread/cv_cancel1/cv_cancel1.c @@ -28,6 +28,7 @@ */ #include <pthread.h> #include <stdio.h> +#include <unistd.h> #define NLOOPS 10 diff --git a/tools/regression/sbin/dhclient/Makefile b/tools/regression/sbin/dhclient/Makefile index 7de3791..a9c876e 100644 --- a/tools/regression/sbin/dhclient/Makefile +++ b/tools/regression/sbin/dhclient/Makefile @@ -11,6 +11,7 @@ LDADD= -lutil PROG= option-domain-search +NO_MAN= WARNS?= 2 .include <bsd.prog.mk> diff --git a/tools/tools/crypto/ipsecstats.c b/tools/tools/crypto/ipsecstats.c index 6ecc1f4..7da16e5 100644 --- a/tools/tools/crypto/ipsecstats.c +++ b/tools/tools/crypto/ipsecstats.c @@ -82,7 +82,7 @@ algname(int a, const struct alg algs[], int nalgs) int main(int argc, char *argv[]) { -#define STAT(x,fmt) if (x) printf(fmt "\n", x) +#define STAT(x,fmt) if (x) printf(fmt "\n", (uintmax_t)x) struct ipsecstat ips; struct ahstat ahs; struct espstat esps; @@ -99,8 +99,7 @@ main(int argc, char *argv[]) if (sysctlbyname("net.inet.esp.stats", &esps, &slen, NULL, NULL) < 0) err(1, "net.inet.esp.stats"); -#define AHSTAT(x,fmt) if (x) printf("ah " fmt ": %u\n", x) -#define AHSTAT64(x,fmt) if (x) printf("ah " fmt ": %llu\n", x) +#define AHSTAT(x,fmt) if (x) printf("ah " fmt ": %ju\n", (uintmax_t)x) AHSTAT(ahs.ahs_input, "input packets processed"); AHSTAT(ahs.ahs_output, "output packets processed"); AHSTAT(ahs.ahs_hdrops, "headers too short"); @@ -120,17 +119,15 @@ main(int argc, char *argv[]) AHSTAT(ahs.ahs_tunnel, "tunnel sanity check failures"); for (i = 0; i < AH_ALG_MAX; i++) if (ahs.ahs_hist[i]) - printf("ah packets with %s: %u\n" + printf("ah packets with %s: %ju\n" , algname(i, aalgs, N(aalgs)) - , ahs.ahs_hist[i] + , (uintmax_t)ahs.ahs_hist[i] ); - AHSTAT64(ahs.ahs_ibytes, "bytes received"); - AHSTAT64(ahs.ahs_obytes, "bytes transmitted"); -#undef AHSTAT64 + AHSTAT(ahs.ahs_ibytes, "bytes received"); + AHSTAT(ahs.ahs_obytes, "bytes transmitted"); #undef AHSTAT -#define ESPSTAT(x,fmt) if (x) printf("esp " fmt ": %u\n", x) -#define ESPSTAT64(x,fmt) if (x) printf("esp " fmt ": %llu\n", x) +#define ESPSTAT(x,fmt) if (x) printf("esp " fmt ": %ju\n", (uintmax_t)x) ESPSTAT(esps.esps_input, "input packets processed"); ESPSTAT(esps.esps_output, "output packets processed"); ESPSTAT(esps.esps_hdrops, "headers too short"); @@ -151,29 +148,30 @@ main(int argc, char *argv[]) ESPSTAT(esps.esps_tunnel, "tunnel sanity check failures"); for (i = 0; i < ESP_ALG_MAX; i++) if (esps.esps_hist[i]) - printf("esp packets with %s: %u\n" + printf("esp packets with %s: %ju\n" , algname(i, espalgs, N(espalgs)) - , esps.esps_hist[i] + , (uintmax_t)esps.esps_hist[i] ); - ESPSTAT64(esps.esps_ibytes, "bytes received"); - ESPSTAT64(esps.esps_obytes, "bytes transmitted"); -#undef ESPSTAT64 + ESPSTAT(esps.esps_ibytes, "bytes received"); + ESPSTAT(esps.esps_obytes, "bytes transmitted"); #undef ESPSTAT printf("\n"); if (ips.ips_in_polvio+ips.ips_out_polvio) - printf("policy violations: input %u output %u\n", - ips.ips_in_polvio, ips.ips_out_polvio); - STAT(ips.ips_out_nosa, "no SA found %u (output)"); - STAT(ips.ips_out_nomem, "no memory available %u (output)"); - STAT(ips.ips_out_noroute, "no route available %u (output)"); - STAT(ips.ips_out_inval, "generic error %u (output)"); - STAT(ips.ips_out_bundlesa, "bundled SA processed %u (output)"); - printf("m_clone processing: %u mbufs + %u clusters coalesced\n", - ips.ips_mbcoalesced, ips.ips_clcoalesced); - printf("m_clone processing: %u clusters copied\n", ips.ips_clcopied); - printf("m_makespace: %u mbufs inserted\n", ips.ips_mbinserted); - printf("header position [front/middle/end]: %u/%u/%u\n", - ips.ips_input_front, ips.ips_input_middle, ips.ips_input_end); + printf("policy violations: input %ju output %ju\n", + (uintmax_t)ips.ips_in_polvio, + (uintmax_t)ips.ips_out_polvio); + STAT(ips.ips_out_nosa, "no SA found %ju (output)"); + STAT(ips.ips_out_nomem, "no memory available %ju (output)"); + STAT(ips.ips_out_noroute, "no route available %ju (output)"); + STAT(ips.ips_out_inval, "generic error %ju (output)"); + STAT(ips.ips_out_bundlesa, "bundled SA processed %ju (output)"); + printf("m_clone processing: %ju mbufs + %ju clusters coalesced\n", + (uintmax_t)ips.ips_mbcoalesced, (uintmax_t)ips.ips_clcoalesced); + STAT(ips.ips_clcopied, "m_clone processing: %ju clusters copied\n"); + STAT(ips.ips_mbinserted, "m_makespace: %ju mbufs inserted\n"); + printf("header position [front/middle/end]: %ju/%ju/%ju\n", + (uintmax_t)ips.ips_input_front, (uintmax_t)ips.ips_input_middle, + (uintmax_t)ips.ips_input_end); return 0; } diff --git a/tools/tools/zfsboottest/zfsboottest.c b/tools/tools/zfsboottest/zfsboottest.c index 3058046..29e9a48 100644 --- a/tools/tools/zfsboottest/zfsboottest.c +++ b/tools/tools/zfsboottest/zfsboottest.c @@ -52,6 +52,7 @@ pager_output(const char *line) #define ZFS_TEST #define printf(...) fprintf(stderr, __VA_ARGS__) +#include "libzfs.h" #include "zfsimpl.c" #undef printf @@ -134,7 +135,6 @@ main(int argc, char** argv) close(fd[i - 1]); } } - spa_all_status(); spa = STAILQ_FIRST(&zfs_pools); if (spa == NULL) { @@ -147,7 +147,10 @@ main(int argc, char** argv) exit(1); } + spa_all_status(); + #if 0 + uint64_t rootobj; if (zfs_get_root(spa, &rootobj)) { fprintf(stderr, "can't get root\n"); exit(1); @@ -158,8 +161,8 @@ main(int argc, char** argv) if (zfs_mount(spa, 0, &zfsmnt)) { fprintf(stderr, "can't mount\n"); exit(1); - } #endif + } printf("\n"); for (++i, failures = 0; i < argc; i++) { diff --git a/tools/tools/zfsboottest/zfsboottest.sh b/tools/tools/zfsboottest/zfsboottest.sh index 1707e3f..1aea755 100755 --- a/tools/tools/zfsboottest/zfsboottest.sh +++ b/tools/tools/zfsboottest/zfsboottest.sh @@ -54,11 +54,6 @@ bootfs=`zpool get bootfs "${pool}" | tail -1 | awk '{print $3}'` if [ "${bootfs}" = "-" ]; then bootfs="${pool}" fi -# Dataset's mountpoint property should be set to 'legacy'. -if [ "`zfs get -H -o value mountpoint ${bootfs}`" != "legacy" ]; then - echo "The \"mountpoint\" property of dataset \"${bootfs}\" should be set to \"legacy\"." >&2 - exit 1 -fi mountpoint=`df -t zfs "${bootfs}" 2>/dev/null | tail -1 | awk '{print $6}'` if [ -z "${mountpoint}" ]; then echo "The \"${bootfs}\" dataset is not mounted." >&2 @@ -68,19 +63,6 @@ if [ ! -d "${mountpoint}${startdir}" ]; then echo "The \"${mountpoint}${startdir}\" directory doesn't exist." >&2 exit 1 fi -# To be able to mount root ZFS file system we need either /etc/fstab entry -# or vfs.root.mountfrom variable set in /boot/loader.conf. -egrep -q '^'"${bootfs}"'[[:space:]]+/[[:space:]]+zfs[[:space:]]+' "${mountpoint}/etc/fstab" 2>/dev/null -if [ $? -ne 0 ]; then - egrep -q 'vfs.root.mountfrom="?'"zfs:${bootfs}"'"?[[:space:]]*$' "${mountpoint}/boot/loader.conf" 2>/dev/null - if [ $? -ne 0 ]; then - echo "To be able to boot from \"${bootfs}\", you need to declare" >&2 - echo "\"${bootfs}\" as being root file system in ${mountpoint}/etc/fstab" >&2 - echo "or add \"vfs.root.mountfrom\" variable set to \"zfs:${bootfs}\" to" >&2 - echo "${mountpoint}/boot/loader.conf." >&2 - exit 1 - fi -fi vdevs="" for vdev in `zpool status "${pool}" | grep ONLINE | awk '{print $1}'`; do vdev="/dev/${vdev#/dev/}" |