From e05c6840a1464552cb7462d76fbae2a9e3bc86d0 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 27 Apr 2016 16:29:03 +0000 Subject: 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 --- lib/libdevctl/devctl.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/libdevctl/devctl.c') 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)); +} -- cgit v1.1