Module Name:    src
Committed By:   pgoyette
Date:           Sat Dec 16 12:40:30 UTC 2017

Modified Files:
        src/share/man/man9: module.9

Log Message:
Document the arguments to the MODULE() macro


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man9/module.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.38 src/share/man/man9/module.9:1.39
--- src/share/man/man9/module.9:1.38	Sun Oct  4 22:51:19 2015
+++ src/share/man/man9/module.9	Sat Dec 16 12:40:30 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.38 2015/10/04 22:51:19 pgoyette Exp $
+.\"	$NetBSD: module.9,v 1.39 2017/12/16 12:40:30 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 October 5, 2015
+.Dd December 16, 2017
 .Dt MODULE 9
 .Os
 .Sh NAME
@@ -100,6 +100,46 @@ The
 macro creates and initializes a
 .Vt modinfo_t
 structure.
+The
+.Fa class
+argument identifies the class of module, and must be one of the following:
+.Bl -tag -width XXX -offset indent
+.It Dv MODULE_CLASS_VFS
+The module provide a virtual file system - see
+.Xr vfs 9
+.It Dv MODULE_CLASS_DRIVER
+The module is a device driver - see
+.Xr driver 9
+.It Dv MODULE_CLASS_EXEC
+The module provides an alternate execution environment - see the various
+.Dv COMPAT_xxx
+options in
+.Xr options 9
+.It Dv MODULE_CLASS_SECMODEL
+The module provides a security model - see
+.Xr secmodel 9
+.It Dv MODULE_CLASS_BUFQ
+The module provides a buffer queue strategy - see
+.Xr bufq 9
+.It Dv MODULE_CLASS_MISC
+The module provides miscellaneous kernel services
+.El
+.Pp
+The
+.Fa name
+argument provides the name of the module.
+Loaded modules, including those that are built-in to the kernel, must all
+have unique names.
+.Pp
+The
+.Fa required
+argument contains a comma-separated list of module names that are required
+by this module.
+The list must not contain any white-space.
+When a module is loaded, all of its required modules are auto-loaded and
+initialized before the module itself is loaded.
+Loading of required modules is a recursive operation.
+.Pp
 In addition to the explicit arguments, the
 .Fn MODULE
 macro creates a reference to the module's

Reply via email to