]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add 'devctl delete' that calls device_delete_child().
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 27 Apr 2016 16:33:17 +0000 (16:33 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 27 Apr 2016 16:33:17 +0000 (16:33 +0000)
commit88eb5c506d00e446dcfeb0f84b36d5132a8d9f6b
tree9d890003db3954532ce3e8f39ed0184a8e9983dc
parent3d0338a09278a0cc38785321f102de9775c57ed3
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.3
lib/libdevctl/devctl.c
lib/libdevctl/devctl.h
sys/kern/subr_bus.c
sys/sys/bus.h
usr.sbin/devctl/devctl.8
usr.sbin/devctl/devctl.c