Filling in a few more gaps.

This commit is contained in:
pgoyette 2010-08-08 14:26:22 +00:00
parent 23f2eb7327
commit f792e9e485
1 changed files with 32 additions and 15 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: module.9,v 1.8 2010/08/07 22:21:30 pgoyette Exp $
.\" $NetBSD: module.9,v 1.9 2010/08/08 14:26:22 pgoyette Exp $
.\"
.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 7, 2010
.Dd August 8, 2010
.Dt MODULE 9
.Os
.Sh NAME
@ -131,7 +131,7 @@ For the
.Dv MODULE_CMD_INIT
command, the
.Fa data
argument is used to pass the module's
argument is used to pass a pointer to the module's
.Xr prop_dictionary 3 .
For the
.Dv MODULE_CMD_STAT
@ -141,7 +141,9 @@ argument points to a buffer where the status information should be placed.
.Pp
The __link_set mechanism is used to enable the
.Nm
subsystem to locate the structure.
subsystem to locate the
.Vt modinfo_t
structure.
.It Fn module_load "name" "flags" "props" "class"
Load a module, link it into the running kernel, and call the module's
.Fn modcmd
@ -173,11 +175,11 @@ The
argument can include:
.Bl -tag -width MODCTL_LOAD_FORCE -offset indent
.It Dv MODCTL_NO_PROP
.\"
.\" XXX: Document this.
.\"
When loading a module from the file-system, do not attempt to locate a
corresponding prop_dictionary file.
.It Dv MODCTL_LOAD_FORCE
Force loading of disabled built-in modules.
Force loading of disabled built-in modules and modules built for a
different version of the operating system.
.El
.Pp
The
@ -186,21 +188,33 @@ argument points to an externalized property list which is passed to the
module's
.Fn modcmd
routine.
If a module is being loaded from the file-system, and the
.Dv MODCTL_NO_PROP
flag is not set, the system searches for a file with the same name as the
module file, but with the suffix ".prop".
If this file is found, the prop_dictionary it contains is loaded and
passed to the module's
.Fn modcmd
routine.
.Pp
The
.Fa class
argument can be any of:
.Pp
.\"
.\" XXX: Document these.
.\"
.Bl -tag -width MODCTL_LOAD_FORCE -offset indent -compact
.Bl -tag -width MODULE_CLASS_SECMODEL -offset indent -compact
.It Dv MODULE_CLASS_ANY
.It Dv MODULE_CLASS_MISC
.It Dv MODULE_CLASS_VFS
.It Dv MODULE_CLASS_DRIVER
Device driver
.It Dv MODULE_CLASS_EXEC
.It Dv MODULE_CLASS_SECMODEL
Executable image handler
.It Dv MODULE_CLASS_MISC
Miscellaneous module
.It Dv MODULE_CLASS_SECMODEL
Security model (see
.Xr secmodel 9
for more details)
.It Dv MODULE_CLASS_VFS
Virtual file system
.El
.Pp
If the class is not
@ -208,6 +222,9 @@ If the class is not
the class of the module being loaded
must match the requested
.Fa class .
Except when verifying a module's class when it is being loaded, module
classes are transparent to the module subsystem.
They are provided only for the benefit of the subsystem's clients.
.Pp
The
.Fn module_load