From 88eb5c506d00e446dcfeb0f84b36d5132a8d9f6b Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 27 Apr 2016 16:33:17 +0000 Subject: Add 'devctl delete' that calls device_delete_child(). 'devctl delete' can be used to delete a device that is no longer present. As an anti-foot-shooting measure, 'delete' will not delete a device unless it's parent bus says it is no longer present. This can be overridden by passing the force ('-f') flag. Note that this command should be used with care. If a device is deleted that is actually present it can't be resurrected unless the parent bus device's driver supports rescans. Differential Revision: https://reviews.freebsd.org/D6019 --- lib/libdevctl/devctl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libdevctl/devctl.h') diff --git a/lib/libdevctl/devctl.h b/lib/libdevctl/devctl.h index 40c64c126dda..670ca1a114f5 100644 --- a/lib/libdevctl/devctl.h +++ b/lib/libdevctl/devctl.h @@ -39,5 +39,6 @@ int devctl_suspend(const char *device); int devctl_resume(const char *device); int devctl_set_driver(const char *device, const char *driver, bool force); int devctl_rescan(const char *device); +int devctl_delete(const char *device, bool force); #endif /* !__DEVCTL_H__ */ -- cgit v1.3