| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: module.9,v 1.1 2010/07/31 03:14:05 pgoyette Exp $ | | 1 | .\" $NetBSD: module.9,v 1.2 2010/07/31 03:43:00 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 |
| @@ -76,27 +76,27 @@ The | | | @@ -76,27 +76,27 @@ The |
76 | .Fn MODULE | | 76 | .Fn MODULE |
77 | macro creates and initializes a | | 77 | macro creates and initializes a |
78 | .Vt modinfo_t | | 78 | .Vt modinfo_t |
79 | structure. | | 79 | structure. |
80 | The __link_set mechanism is used to enable the | | 80 | The __link_set mechanism is used to enable the |
81 | .Nm | | 81 | .Nm |
82 | subsystem to local the structure. | | 82 | subsystem to local the structure. |
83 | .It Fn module_load "name" "flags" "props" "class" | | 83 | .It Fn module_load "name" "flags" "props" "class" |
84 | .Pp | | 84 | .Pp |
85 | Loads a module, links it into the running kernel, and calls the module's | | 85 | Loads a module, links it into the running kernel, and calls the module's |
86 | .Fn modcmd | | 86 | .Fn modcmd |
87 | routine with an argument of MODULE_CMD_INIT. | | 87 | routine with an argument of MODULE_CMD_INIT. |
88 | If the specified module requires other modules, they are loaded first; if | | 88 | If the specified module requires other modules, they are loaded first; if |
89 | any required modules cannot be loaded or their | | 89 | any required module cannot be loaded or if any of their |
90 | .Fn modcmd | | 90 | .Fn modcmd |
91 | control routines returns a non-zero status, loading of this module will fail. | | 91 | control routines returns a non-zero status, loading of this module will fail. |
92 | .Pp | | 92 | .Pp |
93 | The loader will look first for a built-in module with the specified | | 93 | The loader will look first for a built-in module with the specified |
94 | .Fa name | | 94 | .Fa name |
95 | that has not been disabled (see | | 95 | that has not been disabled (see |
96 | .Fn module_unload | | 96 | .Fn module_unload |
97 | below). | | 97 | below). |
98 | If a built-in module with that | | 98 | If a built-in module with that |
99 | .Fa name | | 99 | .Fa name |
100 | is not found, the list of modules prepared by the boot loader is searched. | | 100 | is not found, the list of modules prepared by the boot loader is searched. |
101 | If the named module is still not found, an attempt is made to locate the | | 101 | If the named module is still not found, an attempt is made to locate the |
102 | module within the file system. | | 102 | module within the file system. |