aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/devctl/devctl.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-04-27 16:29:03 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-04-27 16:29:03 +0000
commita907c6914c5879870b2597a63253cea0a5b7bdb8 (patch)
tree57198594e0baf051edc63655c2d1254c1a033442 /usr.sbin/devctl/devctl.c
parent167e63e3948c9ee374152b5ce2a270e805d22801 (diff)
Notes
Diffstat (limited to 'usr.sbin/devctl/devctl.c')
-rw-r--r--usr.sbin/devctl/devctl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/devctl/devctl.c b/usr.sbin/devctl/devctl.c
index 076c6503885e..545224b502d1 100644
--- a/usr.sbin/devctl/devctl.c
+++ b/usr.sbin/devctl/devctl.c
@@ -259,6 +259,18 @@ set_driver(int ac, char **av)
}
DEVCTL_COMMAND(set, driver, set_driver);
+static int
+rescan(int ac, char **av)
+{
+
+ if (ac != 2)
+ usage();
+ if (devctl_rescan(av[1]) < 0)
+ err(1, "Failed to rescan %s", av[1]);
+ return (0);
+}
+DEVCTL_COMMAND(top, rescan, rescan);
+
int
main(int ac, char *av[])
{