Sat Mar 10 11:34:19 2018 UTC ()
We'll use an array of individual aliases, rather than a single, comma-
separated list.  This saves us parsing the list each time through.


(pgoyette)
diff -r1.42.2.1 -r1.42.2.2 src/share/man/man9/module.9

cvs diff -r1.42.2.1 -r1.42.2.2 src/share/man/man9/module.9 (expand / switch to unified diff)

--- src/share/man/man9/module.9 2018/03/10 10:51:27 1.42.2.1
+++ src/share/man/man9/module.9 2018/03/10 11:34:19 1.42.2.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: module.9,v 1.42.2.1 2018/03/10 10:51:27 pgoyette Exp $ 1.\" $NetBSD: module.9,v 1.42.2.2 2018/03/10 11:34:19 pgoyette Exp $
2.\" 2.\"
3.\" Copyright (c) 2010 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Andrew Doran. 7.\" by Andrew Doran.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -192,30 +192,30 @@ For the @@ -192,30 +192,30 @@ For the
192command, the 192command, the
193.Fa data 193.Fa data
194argument is used to pass a pointer to the module's 194argument is used to pass a pointer to the module's
195.Xr prop_dictionary 3 . 195.Xr prop_dictionary 3 .
196For the 196For the
197.Dv MODULE_CMD_STAT 197.Dv MODULE_CMD_STAT
198command, the 198command, the
199.Fa data 199.Fa data
200argument points to a buffer where the status information should be placed. 200argument points to a buffer where the status information should be placed.
201For the 201For the
202.Dv MODULE_CMD_GETALIASES 202.Dv MODULE_CMD_GETALIASES
203command, the 203command, the
204.Fa data 204.Fa data
205argument points to a variable of type 205argument points to an array of type
206.Vt const char * ; 206.Vt const char *[] ;
207the module's command routine should store the address of a quoted string 207the module's command routine should store the addresses of each alias
208containing a comma-separated list of alias names. 208name for the module.
209.Pp 209.Pp
210The __link_set mechanism is used to enable the 210The __link_set mechanism is used to enable the
211.Nm 211.Nm
212subsystem to locate the 212subsystem to locate the
213.Vt modinfo_t 213.Vt modinfo_t
214structure. 214structure.
215.It Fn module_load "name" "flags" "props" "class" 215.It Fn module_load "name" "flags" "props" "class"
216Load a module, link it into the running kernel, and call the module's 216Load a module, link it into the running kernel, and call the module's
217.Fn modcmd 217.Fn modcmd
218routine with a 218routine with a
219.Fa cmd 219.Fa cmd
220argument of 220argument of
221.Dv MODULE_CMD_INIT . 221.Dv MODULE_CMD_INIT .