CVS commit: [pgoyette-compat] src/share/man/man9

2018-03-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Mar 16 11:52:54 UTC 2018

Modified Files:
src/share/man/man9 [pgoyette-compat]: module.9

Log Message:
Typo - missing 's'


To generate a diff of this commit:
cvs rdiff -u -r1.42.2.5 -r1.42.2.6 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.42.2.5 src/share/man/man9/module.9:1.42.2.6
--- src/share/man/man9/module.9:1.42.2.5	Thu Mar 15 10:00:47 2018
+++ src/share/man/man9/module.9	Fri Mar 16 11:52:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.42.2.5 2018/03/15 10:00:47 pgoyette Exp $
+.\"	$NetBSD: module.9,v 1.42.2.6 2018/03/16 11:52:53 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -166,7 +166,7 @@ For example,
 	MODULE_WITH_ALIASES(MODULE_CLASS_MISC, pets, NULL, _pets);
 .Ed
 .Pp
-If there are no required modules or aliases, these argument should be
+If there are no required modules or aliases, these arguments should be
 specified as
 .Dv NULL .
 .Pp



CVS commit: [pgoyette-compat] src/share/man/man9

2018-03-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar 15 10:00:47 UTC 2018

Modified Files:
src/share/man/man9 [pgoyette-compat]: module.9

Log Message:
Spell the macro name correctly:  MODULE_WITH_ALIASES vs MODULE_WITH_ALIAS


To generate a diff of this commit:
cvs rdiff -u -r1.42.2.4 -r1.42.2.5 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.42.2.4 src/share/man/man9/module.9:1.42.2.5
--- src/share/man/man9/module.9:1.42.2.4	Wed Mar 14 02:47:41 2018
+++ src/share/man/man9/module.9	Thu Mar 15 10:00:47 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.42.2.4 2018/03/14 02:47:41 pgoyette Exp $
+.\"	$NetBSD: module.9,v 1.42.2.5 2018/03/15 10:00:47 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -43,7 +43,7 @@
 .Sh SYNOPSIS
 .In sys/module.h
 .Fn MODULE "class" "name" "required"
-.Fn MODULE_WITH_ALIAS "class" "name" "required" "aliases"
+.Fn MODULE_WITH_ALIASES "class" "name" "required" "aliases"
 .Ft int
 .Fn module_load "const char *name" "int flags" "prop_dictionary_t props" \
 "modclass_t class"



CVS commit: [pgoyette-compat] src/share/man/man9

2018-03-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Mar 14 02:47:42 UTC 2018

Modified Files:
src/share/man/man9 [pgoyette-compat]: module.9

Log Message:
Update to describe module aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.42.2.3 -r1.42.2.4 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.42.2.3 src/share/man/man9/module.9:1.42.2.4
--- src/share/man/man9/module.9:1.42.2.3	Sun Mar 11 00:44:32 2018
+++ src/share/man/man9/module.9	Wed Mar 14 02:47:41 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.42.2.3 2018/03/11 00:44:32 pgoyette Exp $
+.\"	$NetBSD: module.9,v 1.42.2.4 2018/03/14 02:47:41 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 December 16, 2017
+.Dd March 14, 2018
 .Dt MODULE 9
 .Os
 .Sh NAME
@@ -43,6 +43,7 @@
 .Sh SYNOPSIS
 .In sys/module.h
 .Fn MODULE "class" "name" "required"
+.Fn MODULE_WITH_ALIAS "class" "name" "required" "aliases"
 .Ft int
 .Fn module_load "const char *name" "int flags" "prop_dictionary_t props" \
 "modclass_t class"
@@ -95,9 +96,12 @@ The module subsystem is protected by the
 .Sh FUNCTIONS
 .Bl -tag -width abcd
 .It Fn MODULE "class" "name" "required"
+.It Fn MODULE_WITH_ALIASES "class" "name" "required" "aliases"
 The
 .Fn MODULE
-macro creates and initializes a
+and
+.Fn MODULE_WITH_ALIASES
+macros create and initialize a
 .Vt modinfo_t
 structure.
 The
@@ -140,7 +144,30 @@ When a module is loaded, all of its requ
 initialized before the module itself is loaded.
 Loading of required modules is a recursive operation.
 .Pp
-If there are no required modules, this argument should be specified as
+The
+.Fa aliases
+argument is a pointer to a NULL-terminated constant array of constant
+strings.
+Each string in the array is an alternate name (i.e., an alias) of the
+module.
+Module names and aliases must all be unique; a module cannot be loaded
+if its name or any of its aliases matches the name or an alias of any
+already-loaded module.
+(Module names are displayed by the
+.Xr modstat 8
+utility, with an
+.Dv A
+in the flags column.)
+.Pp
+For example,
+.Bd -literal
+	const char * const my_pets[] = { "dog", "cat", "bird", NULL };
+
+	MODULE_WITH_ALIASES(MODULE_CLASS_MISC, pets, NULL, _pets);
+.Ed
+.Pp
+If there are no required modules or aliases, these argument should be
+specified as
 .Dv NULL .
 .Pp
 In addition to the explicit arguments, the



CVS commit: [pgoyette-compat] src/share/man/man9

2018-03-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 10 11:34:19 UTC 2018

Modified Files:
src/share/man/man9 [pgoyette-compat]: module.9

Log Message:
We'll use an array of individual aliases, rather than a single, comma-
separated list.  This saves us parsing the list each time through.


To generate a diff of this commit:
cvs rdiff -u -r1.42.2.1 -r1.42.2.2 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.42.2.1 src/share/man/man9/module.9:1.42.2.2
--- src/share/man/man9/module.9:1.42.2.1	Sat Mar 10 10:51:27 2018
+++ src/share/man/man9/module.9	Sat Mar 10 11:34:19 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.42.2.1 2018/03/10 10:51:27 pgoyette Exp $
+.\"	$NetBSD: module.9,v 1.42.2.2 2018/03/10 11:34:19 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -202,10 +202,10 @@ For the
 .Dv MODULE_CMD_GETALIASES
 command, the
 .Fa data
-argument points to a variable of type
-.Vt const char * ;
-the module's command routine should store the address of a quoted string
-containing a comma-separated list of alias names.
+argument points to an array of type
+.Vt const char *[] ;
+the module's command routine should store the addresses of each alias
+name for the module.
 .Pp
 The __link_set mechanism is used to enable the
 .Nm



CVS commit: [pgoyette-compat] src/share/man/man9

2018-03-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Mar 10 10:51:27 UTC 2018

Modified Files:
src/share/man/man9 [pgoyette-compat]: module.9

Log Message:
Document the MODULE_CMD_GETALIASES command


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.42.2.1 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.42 src/share/man/man9/module.9:1.42.2.1
--- src/share/man/man9/module.9:1.42	Wed Dec 20 10:01:38 2017
+++ src/share/man/man9/module.9	Sat Mar 10 10:51:27 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.42 2017/12/20 10:01:38 wiz Exp $
+.\"	$NetBSD: module.9,v 1.42.2.1 2018/03/10 10:51:27 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -170,6 +170,9 @@ Perform module-specific clean-up before 
 Notify the module that it is about to be unloaded.
 .It Dv MODULE_CMD_STAT
 Request the module to provide status information (not currently implemented).
+.It Dv MODULE_CMD_GETALIASES
+Request the module to provide a list of its alias names (typically used
+for included modules).
 .El
 .Pp
 All modules'
@@ -195,6 +198,14 @@ For the
 command, the
 .Fa data
 argument points to a buffer where the status information should be placed.
+For the
+.Dv MODULE_CMD_GETALIASES
+command, the
+.Fa data
+argument points to a variable of type
+.Vt const char * ;
+the module's command routine should store the address of a quoted string
+containing a comma-separated list of alias names.
 .Pp
 The __link_set mechanism is used to enable the
 .Nm