From 5fa29797910346fc0c54829bd979856e83b9b7ea Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 23 Aug 2018 05:05:47 +0000 Subject: Create devctl freeze/thaw. This adds it to devctl, libdevctl, defines the two IOCTLs and implements the kernel bits. causes any new drivers that are added via kldload to be deferred until a 'thaw' comes in. These do not stack: it is an error to freeze while frozen, or thaw while thawed. Differential Revision: https://reviews.freebsd.org/D16735 --- lib/libdevctl/devctl.3 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/libdevctl/devctl.3') diff --git a/lib/libdevctl/devctl.3 b/lib/libdevctl/devctl.3 index a4fe0620ac3f..8749515ecd74 100644 --- a/lib/libdevctl/devctl.3 +++ b/lib/libdevctl/devctl.3 @@ -36,10 +36,12 @@ .Nm devctl_detach , .Nm devctl_disable , .Nm devctl_enable , +.Nm devctl_freeze , .Nm devctl_rescan , .Nm devctl_resume , .Nm devctl_set_driver , -.Nm devctl_suspend +.Nm devctl_suspend , +.Nm devctl_thaw .Nd device control library .Sh LIBRARY .Lb libdevctl @@ -58,6 +60,8 @@ .Ft int .Fn devctl_enable "const char *device" .Ft int +.Fn devctl_freeze "void" +.Ft int .Fn devctl_rescan "const char *device" .Ft int .Fn devctl_resume "const char *device" @@ -65,6 +69,8 @@ .Fn devctl_set_driver "const char *device" "const char *driver" "bool force" .Ft int .Fn devctl_suspend "const char *device" +.Ft int +.Fn devctl_thaw "void" .Sh DESCRIPTION The .Nm @@ -189,6 +195,16 @@ The .Fn devctl_rescan function rescans a bus device checking for devices that have been added or removed. +.Pp +The +.Fn devctl_freeze +function freezes probe and attach processing initiated in response to +drivers being loaded. +.Pp +The +.Fn devctl_thaw +function resumes (thaws the freeze) probe and attach processing +initiated in response to drivers being loaded. .Sh RETURN VALUES .Rv -std devctl_attach devctl_clear_driver devctl_delete devctl_detach \ devctl_disable devctl_enable devctl_suspend devctl_rescan devctl_resume \ -- cgit v1.3