summaryrefslogtreecommitdiffstats
path: root/lib/libdevctl/devctl.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-04-27 16:29:03 +0000
committerjhb <jhb@FreeBSD.org>2016-04-27 16:29:03 +0000
commite05c6840a1464552cb7462d76fbae2a9e3bc86d0 (patch)
tree57198594e0baf051edc63655c2d1254c1a033442 /lib/libdevctl/devctl.c
parentfe28ec8024a7da09961b3b7d4dc1e205b1b35bb1 (diff)
downloadFreeBSD-src-e05c6840a1464552cb7462d76fbae2a9e3bc86d0.zip
FreeBSD-src-e05c6840a1464552cb7462d76fbae2a9e3bc86d0.tar.gz
Add a new rescan method to the bus interface.
The BUS_RESCAN() method rescans a single bus device checking for devices that have been added or removed from the bus. A new 'rescan' command is added to devctl(8) to trigger a rescan. Differential Revision: https://reviews.freebsd.org/D6016
Diffstat (limited to 'lib/libdevctl/devctl.c')
-rw-r--r--lib/libdevctl/devctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libdevctl/devctl.c b/lib/libdevctl/devctl.c
index 7be431e..33c891b 100644
--- a/lib/libdevctl/devctl.c
+++ b/lib/libdevctl/devctl.c
@@ -122,3 +122,10 @@ devctl_set_driver(const char *device, const char *driver, bool force)
req.dr_flags |= DEVF_SET_DRIVER_DETACH;
return (devctl_request(DEV_SET_DRIVER, &req));
}
+
+int
+devctl_rescan(const char *device)
+{
+
+ return (devctl_simple_request(DEV_RESCAN, device, 0));
+}
OpenPOWER on IntegriCloud