aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc43
-rw-r--r--tools/build/options/WITHOUT_GDB_LIBEXEC5
-rw-r--r--tools/build/options/WITH_GDB_LIBEXEC10
-rw-r--r--tools/regression/geom_gpt/Makefile10
-rw-r--r--tools/regression/geom_gpt/gctl_test.t (renamed from tools/regression/geom_gpt/gctl.t)87
-rw-r--r--tools/regression/geom_gpt/gctl_test_helper.c (renamed from tools/regression/geom_gpt/test.c)28
-rw-r--r--tools/tools/net80211/scripts/setup.wdsmain7
-rw-r--r--tools/tools/net80211/wlanwds/wlanwds.c10
-rw-r--r--tools/tools/umastat/umastat.c1
9 files changed, 118 insertions, 83 deletions
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 5c47735bf24f..11d248339419 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -66,7 +66,6 @@ OLD_FILES+=usr/sbin/hlfsd
OLD_FILES+=usr/sbin/mk-amd-map
OLD_FILES+=usr/sbin/wire-test
OLD_FILES+=usr/share/examples/etc/amd.map
-OLD_FILES+=usr/share/info/am-utils.info.gz
OLD_FILES+=usr/share/man/man1/pawd.1.gz
OLD_FILES+=usr/share/man/man5/amd.conf.5.gz
OLD_FILES+=usr/share/man/man8/amd.8.gz
@@ -103,13 +102,7 @@ OLD_FILES+=usr/share/man/man8/atrun.8.gz
.endif
.if ${MK_ATM} == no
-OLD_FILES+=etc/rc.d/atm1
-OLD_FILES+=etc/rc.d/atm2
-OLD_FILES+=etc/rc.d/atm3
-OLD_FILES+=rescue/atmconfig
-OLD_FILES+=sbin/atmconfig
OLD_FILES+=usr/bin/sscop
-OLD_FILES+=usr/include/bsnmp/snmp_atm.h
OLD_FILES+=usr/include/netnatm/addr.h
OLD_FILES+=usr/include/netnatm/api/atmapi.h
OLD_FILES+=usr/include/netnatm/api/ccatm.h
@@ -137,30 +130,19 @@ OLD_FILES+=usr/lib/libngatm.a
OLD_FILES+=usr/lib/libngatm.so
OLD_LIBS+=usr/lib/libngatm.so.4
OLD_FILES+=usr/lib/libngatm_p.a
-OLD_FILES+=usr/lib/snmp_atm.so
-OLD_LIBS+=usr/lib/snmp_atm.so.6
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
OLD_FILES+=usr/lib32/libngatm.a
OLD_FILES+=usr/lib32/libngatm.so
OLD_LIBS+=usr/lib32/libngatm.so.4
OLD_FILES+=usr/lib32/libngatm_p.a
.endif
-OLD_FILES+=usr/share/doc/atm/atmconfig.help
-OLD_FILES+=usr/share/doc/atm/atmconfig_device.help
-OLD_DIRS+=usr/share/doc/atm
OLD_FILES+=usr/share/man/man1/sscop.1.gz
OLD_FILES+=usr/share/man/man3/libngatm.3.gz
-OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz
OLD_FILES+=usr/share/man/man3/uniaddr.3.gz
OLD_FILES+=usr/share/man/man3/unifunc.3.gz
OLD_FILES+=usr/share/man/man3/unimsg.3.gz
OLD_FILES+=usr/share/man/man3/unisap.3.gz
OLD_FILES+=usr/share/man/man3/unistruct.3.gz
-OLD_FILES+=usr/share/man/man8/atmconfig.8.gz
-OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def
-OLD_FILES+=usr/share/snmp/defs/atm_tree.def
-OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt
-OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt
.endif
.if ${MK_AUDIT} == no
@@ -732,7 +714,6 @@ 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
@@ -746,8 +727,6 @@ 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
@@ -871,7 +850,6 @@ OLD_FILES+=usr/share/man/man3/snmp_trace.3.gz
OLD_FILES+=usr/share/man/man3/snmp_value_copy.3.gz
OLD_FILES+=usr/share/man/man3/snmp_value_free.3.gz
OLD_FILES+=usr/share/man/man3/snmp_value_parse.3.gz
-OLD_FILES+=usr/share/man/man3/tree.3.gz
OLD_FILES+=usr/share/man/man3/tree_size.3.gz
# usr.sbin/bsnmpd/bsnmpd
OLD_FILES+=usr/share/man/man3/FIND_OBJECT_INT.3.gz
@@ -931,7 +909,6 @@ OLD_FILES+=usr/share/man/man3/reqid_base.3.gz
OLD_FILES+=usr/share/man/man3/reqid_istype.3.gz
OLD_FILES+=usr/share/man/man3/reqid_next.3.gz
OLD_FILES+=usr/share/man/man3/reqid_type.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
@@ -987,8 +964,6 @@ OLD_FILES+=usr/share/man/man3/usm_flush_users.3.gz
OLD_FILES+=usr/share/man/man3/usm_next_user.3.gz
OLD_FILES+=usr/share/man/man3/usm_new_user.3.gz
OLD_FILES+=usr/share/man/man3/usm_user.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
@@ -2421,11 +2396,6 @@ OLD_LIBS+=usr/lib32/libgomp.so.1
OLD_FILES+=usr/lib32/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
@@ -2439,19 +2409,21 @@ OLD_FILES+=usr/bin/gcov
OLD_FILES+=usr/share/man/man1/gcov.1.gz
.endif
-.if ${MK_GDB} == no
+.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == yes
OLD_FILES+=usr/bin/gdb
OLD_FILES+=usr/bin/gdbserver
OLD_FILES+=usr/bin/gdbtui
OLD_FILES+=usr/bin/kgdb
-OLD_FILES+=usr/share/info/gdb.info.gz
-OLD_FILES+=usr/share/info/gdbint.info.gz
-OLD_FILES+=usr/share/info/stabs.info.gz
OLD_FILES+=usr/share/man/man1/gdb.1.gz
OLD_FILES+=usr/share/man/man1/gdbserver.1.gz
OLD_FILES+=usr/share/man/man1/kgdb.1.gz
.endif
+.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == no
+OLD_FILES+=usr/libexec/gdb
+OLD_FILES+=usr/libexec/kgdb
+.endif
+
.if ${MK_GPIO} == no
OLD_FILES+=usr/include/libgpio.h
OLD_FILES+=usr/lib/libgpio.a
@@ -2929,7 +2901,6 @@ OLD_FILES+=usr/share/groff_font/devutf8/R
OLD_FILES+=usr/share/groff_font/devutf8/S
OLD_DIRS+=usr/share/groff_font/devutf8
OLD_DIRS+=usr/share/groff_font
-OLD_FILES+=usr/share/info/groff.info.gz
OLD_FILES+=usr/share/man/man1/addftinfo.1.gz
OLD_FILES+=usr/share/man/man1/afmtodit.1.gz
OLD_FILES+=usr/share/man/man1/eqn.1.gz
@@ -3737,7 +3708,6 @@ OLD_FILES+=usr/libexec/kpasswdd
OLD_FILES+=usr/sbin/kstash
OLD_FILES+=usr/sbin/ktutil
OLD_FILES+=usr/sbin/iprop-log
-OLD_FILES+=usr/share/info/heimdal.info.gz
OLD_FILES+=usr/share/man/man1/kdestroy.1.gz
OLD_FILES+=usr/share/man/man1/kf.1.gz
OLD_FILES+=usr/share/man/man1/kinit.1.gz
@@ -9405,7 +9375,6 @@ 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/man4/zyd.4.gz
diff --git a/tools/build/options/WITHOUT_GDB_LIBEXEC b/tools/build/options/WITHOUT_GDB_LIBEXEC
new file mode 100644
index 000000000000..4fbe30cb846e
--- /dev/null
+++ b/tools/build/options/WITHOUT_GDB_LIBEXEC
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to install
+.Xr gdb 1
+into
+.Pa /usr/bin .
diff --git a/tools/build/options/WITH_GDB_LIBEXEC b/tools/build/options/WITH_GDB_LIBEXEC
new file mode 100644
index 000000000000..7ba0bf1d9508
--- /dev/null
+++ b/tools/build/options/WITH_GDB_LIBEXEC
@@ -0,0 +1,10 @@
+.\" $FreeBSD$
+Set to install
+.Xr gdb 1
+into
+.Pa /usr/libexec .
+This permits
+.Xr gdb 1
+to be used as a fallback for
+.Xr crashinfo 8
+if a newer version is not installed.
diff --git a/tools/regression/geom_gpt/Makefile b/tools/regression/geom_gpt/Makefile
new file mode 100644
index 000000000000..92d1f020c916
--- /dev/null
+++ b/tools/regression/geom_gpt/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+PROG= gctl_test_helper
+MAN=
+
+LIBADD+= geom
+
+WARNS?= 6
+
+.include <bsd.prog.mk>
diff --git a/tools/regression/geom_gpt/gctl.t b/tools/regression/geom_gpt/gctl_test.t
index f99e6d8586fb..38469843c7b9 100644
--- a/tools/regression/geom_gpt/gctl.t
+++ b/tools/regression/geom_gpt/gctl_test.t
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
#
# Copyright (c) 2005, 2006 Marcel Moolenaar
# All rights reserved.
@@ -26,13 +26,13 @@
#
# $FreeBSD$
-my $srcdir = `dirname $0`;
-chomp $srcdir;
+use strict;
+use warnings;
+
+use File::Basename;
-my $cmd = "/tmp/gctl-$$";
-my $out = "$cmd.out";
my $disk = "/tmp/disk-$$";
-my $mntpt = "/tmp/mount-$$";
+my $mntpt_prefix = "/tmp/mount-$$";
my %steps = (
"000" => "gctl",
@@ -70,9 +70,9 @@ my %steps = (
"054" => "conf",
"060" => "gctl verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1",
"061" => "mount %dev%p1",
- "062" => "gctl verb=remove geom=%dev% entry=1",
+ "062" => "gctl verb=delete geom=%dev% entry=1",
"063" => "umount %dev%p1",
- "064" => "gctl verb=remove geom=%dev% entry=1",
+ "064" => "gctl verb=delete geom=%dev% entry=1",
"065" => "conf",
"100" => "mdcfg destroy",
"110" => "mdcfg create corrupted",
@@ -132,20 +132,23 @@ if (exists $ENV{'TEST_VERBOSE'}) {
}
# Compile the driver...
-my $st = system("cc -o $cmd -g $srcdir/test.c -lgeom");
+my $st = system("make obj && make all");
if ($st != 0) {
print "1..0 # SKIP error compiling test.c\n";
exit 0;
}
+chomp(my $cmd = `make '-V\${.OBJDIR}/\${PROG}'`);
+
+my $out = basename($cmd) . ".out";
# Make sure we have permission to use gctl...
if (`$cmd` =~ "^FAIL Permission denied") {
- print "1..0 # SKIP not enough permission\n";
+ print "1..0 # SKIP insufficient permissions\n";
unlink $cmd;
exit 0;
}
-$count = keys (%steps);
+my $count = keys (%steps);
print "1..$count\n";
my $nr = 1;
@@ -158,29 +161,43 @@ foreach my $key (sort keys %steps) {
$res =~ s/%dev%/$dev/g;
if ($action =~ "^gctl") {
+ my $errmsg = "";
system("$cmd $verbose $args | tee $out 2>&1");
- $st = `tail -1 $out`;
- if ($st =~ "^$res") {
- print "ok $nr \# gctl($key)\n";
- } else {
- print "not ok $nr \# gctl($key) - $st\n";
+ chomp($st = `tail -1 $out`);
+ if ($st ne $res) {
+ $errmsg = "\"$st\" (actual) != \"$res\" (expected)\n";
}
+ printf("%sok $nr \# gctl($key)%s\n",
+ ($errmsg eq "" ? "" : "not "),
+ ($errmsg eq "" ? "" : " - $errmsg"));
unlink $out;
} elsif ($action =~ "^mdcfg") {
+ my $errmsg = "";
if ($args =~ "^create") {
- system("dd if=/dev/zero of=$disk count=1024 2>&1");
- if ($args =~ "corrupted") {
- system("gpt create -p $disk");
+ # NOTE: `count=1024` affects $key => {"025" "054", "065"}.
+ if (system("dd if=/dev/zero of=$disk count=1024 2>&1") == 0) {
+ chomp($dev = `mdconfig -a -t vnode -f $disk`);
+ if ($? == 0) {
+ if (system("gpart create -s GPT $dev") != 0) {
+ $errmsg = "gpart create failed";
+ }
+ } else {
+ $errmsg = "mdconfig -a failed";
+ }
+ } else {
+ $errmsg = "dd failed";
}
- $dev = `mdconfig -a -t vnode -f $disk`;
- chomp $dev;
} elsif ($args =~ "^destroy") {
$dev =~ s/md/-u /g;
- system("mdconfig -d $dev");
+ if (system("mdconfig -d $dev") != 0) {
+ $errmsg = "mdconfig -d failed";
+ }
unlink $disk;
$dev = "n/a";
}
- print "ok $nr \# mdcfg($key)\n";
+ printf("%sok $nr # mdcfg($key)%s\n",
+ ($errmsg eq "" ? "" : "not "),
+ ($errmsg eq "" ? "" : " - $errmsg"));
} elsif ($action =~ "^conf") {
system("sysctl -b kern.geom.conftxt | grep -a $dev | sed -e s:$disk:DISK:g -e s:$dev:DEV:g | sort | md5 -p | tee $out 2>&1");
$st = `tail -1 $out`;
@@ -191,17 +208,23 @@ foreach my $key (sort keys %steps) {
}
unlink $out;
} elsif ($action =~ "^mount") {
- system("mkdir $mntpt-$args");
- system("newfs $args");
- system("mount -t ufs /dev/$args $mntpt-$args");
- print "ok $nr \# mount($key)\n";
+ my $errmsg = "";
+ mkdir("$mntpt_prefix-$args");
+ if (system("newfs /dev/$args") == 0) {
+ if (system("mount /dev/$args $mntpt_prefix-$args") != 0) {
+ $errmsg = "mount failed";
+ }
+ } else {
+ $errmsg = "newfs failed";
+ }
+ printf("%sok $nr # mount($key)%s\n",
+ ($errmsg eq "" ? "" : "not "),
+ ($errmsg eq "" ? "" : " - $errmsg"));
} elsif ($action =~ "^umount") {
- system("umount $mntpt-$args");
- system("rmdir $mntpt-$args");
- print "ok $nr \# umount($key)\n";
+ system("umount $mntpt_prefix-$args");
+ system("rmdir $mntpt_prefix-$args");
+ print "ok $nr \# umount($key)\n";
}
$nr += 1;
}
-
-unlink $cmd;
exit 0;
diff --git a/tools/regression/geom_gpt/test.c b/tools/regression/geom_gpt/gctl_test_helper.c
index d750d30e8d55..48440d037a9f 100644
--- a/tools/regression/geom_gpt/test.c
+++ b/tools/regression/geom_gpt/gctl_test_helper.c
@@ -28,13 +28,15 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <assert.h>
+#include <err.h>
#include <errno.h>
-#include <libgeom.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <libgeom.h>
struct retval {
struct retval *retval;
@@ -42,11 +44,11 @@ struct retval {
char *value;
};
-struct retval *retval;
-int verbose;
+static struct retval *retval;
+static int verbose;
static void
-usage()
+usage(void)
{
fprintf(stdout, "usage: %s [-v] param[:len][=value] ...\n",
getprogname());
@@ -105,16 +107,18 @@ parse(char *arg, char **param, char **value, int *len)
return (0);
}
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
{
struct retval *rv;
struct gctl_req *req;
char *param, *value;
const char *s;
- int c, len;
+ int c, len, parse_retval;
req = gctl_get_handle();
- gctl_ro_param(req, "class", -1, "GPT");
+ assert(req != NULL);
+ gctl_ro_param(req, "class", -1, "PART");
while ((c = getopt(argc, argv, "v")) != -1) {
switch (c) {
@@ -129,10 +133,12 @@ int main(int argc, char *argv[])
}
}
- while (optind < argc) {
- if (!parse(argv[optind++], &param, &value, &len)) {
+ for (; optind < argc; optind++) {
+ parse_retval = parse(argv[optind], &param, &value, &len);
+ if (parse_retval == 0) {
if (len > 0) {
rv = malloc(sizeof(struct retval));
+ assert(rv != NULL);
rv->param = param;
rv->value = value;
rv->retval = retval;
@@ -140,7 +146,9 @@ int main(int argc, char *argv[])
gctl_rw_param(req, param, len, value);
} else
gctl_ro_param(req, param, -1, value);
- }
+ } else
+ warnc(parse_retval, "failed to parse argument (%s)",
+ argv[optind]);
}
if (verbose)
diff --git a/tools/tools/net80211/scripts/setup.wdsmain b/tools/tools/net80211/scripts/setup.wdsmain
index 6747b66c33ab..6123d83f73f9 100644
--- a/tools/tools/net80211/scripts/setup.wdsmain
+++ b/tools/tools/net80211/scripts/setup.wdsmain
@@ -8,6 +8,13 @@
# created). The WDSUP script is invoked for each wds vap that
# gets created--to add the vap to a bridge.
#
+# Notes!
+#
+# * If the main AP VAP is running with encryption, the plumbed up
+# WDS VAP needs to have privacy enabled (wepmode mixed, for example)
+# otherwise frames transmitted from the WDS AP to the WDS STA
+# will not be encrypted.
+#
# $FreeBSD$
#
PATH=.:$PATH
diff --git a/tools/tools/net80211/wlanwds/wlanwds.c b/tools/tools/net80211/wlanwds/wlanwds.c
index 1bae345ae41c..177f92a6d2ac 100644
--- a/tools/tools/net80211/wlanwds/wlanwds.c
+++ b/tools/tools/net80211/wlanwds/wlanwds.c
@@ -96,7 +96,7 @@ static int wds_vap_destroy(const char *ifname);
static void
usage(const char *progname)
{
- fprintf(stderr, "usage: %s [-fjtv] [-P pidfile] [-s <set_scriptname>] [ifnet0 ... | any]\n",
+ fprintf(stderr, "usage: %s [-efjtv] [-P pidfile] [-s <set_scriptname>] [ifnet0 ... | any]\n",
progname);
exit(-1);
}
@@ -108,10 +108,14 @@ main(int argc, char *argv[])
const char *pidfile = NULL;
int s, c, logmask, bg = 1;
char msg[2048];
+ int log_stderr = 0;
logmask = LOG_UPTO(LOG_INFO);
- while ((c = getopt(argc, argv, "fjP:s:tv")) != -1)
+ while ((c = getopt(argc, argv, "efjP:s:tv")) != -1)
switch (c) {
+ case 'e':
+ log_stderr = LOG_PERROR;
+ break;
case 'f':
bg = 0;
break;
@@ -155,7 +159,7 @@ main(int argc, char *argv[])
if (bg && daemon(0, 0) < 0)
err(EX_OSERR, "daemon");
- openlog("wlanwds", LOG_PID | LOG_CONS, LOG_DAEMON);
+ openlog("wlanwds", log_stderr | LOG_PID | LOG_CONS, LOG_DAEMON);
setlogmask(logmask);
for (;;) {
diff --git a/tools/tools/umastat/umastat.c b/tools/tools/umastat/umastat.c
index 4fdc391d36e4..16a0b9d2c97c 100644
--- a/tools/tools/umastat/umastat.c
+++ b/tools/tools/umastat/umastat.c
@@ -129,7 +129,6 @@ static const struct flaginfo {
{ UMA_ZONE_VM, "vm" },
{ UMA_ZONE_HASH, "hash" },
{ UMA_ZONE_SECONDARY, "secondary" },
- { UMA_ZONE_REFCNT, "refcnt" },
{ UMA_ZONE_MAXBUCKET, "maxbucket" },
{ UMA_ZONE_CACHESPREAD, "cachespread" },
{ UMA_ZONE_VTOSLAB, "vtoslab" },