Module Name: src
Committed By: pgoyette
Date: Sat Aug 7 22:21:31 UTC 2010
Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile module.9
Log Message:
Add documentation for module_find_section()
To generate a diff of this commit:
cvs rdiff -u -r1.1492 -r1.1493 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.338 -r1.339 src/share/man/man9/Makefile
cvs rdiff -u -r1.7 -r1.8 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/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1492 src/distrib/sets/lists/comp/mi:1.1493
--- src/distrib/sets/lists/comp/mi:1.1492 Sat Aug 7 18:12:45 2010
+++ src/distrib/sets/lists/comp/mi Sat Aug 7 22:21:30 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1492 2010/08/07 18:12:45 wiz Exp $
+# $NetBSD: mi,v 1.1493 2010/08/07 22:21:30 pgoyette Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -9376,6 +9376,7 @@
./usr/share/man/cat9/microuptime.0 comp-sys-catman .cat
./usr/share/man/cat9/module.0 comp-sys-catman .cat
./usr/share/man/cat9/module_autoload.0 comp-sys-catman .cat
+./usr/share/man/cat9/module_find_section.0 comp-sys-catman .cat
./usr/share/man/cat9/module_hold.0 comp-sys-catman .cat
./usr/share/man/cat9/module_init_class.0 comp-sys-catman .cat
./usr/share/man/cat9/module_load.0 comp-sys-catman .cat
@@ -15173,6 +15174,7 @@
./usr/share/man/html9/microuptime.html comp-sys-htmlman html
./usr/share/man/html9/module.html comp-sys-htmlman html
./usr/share/man/html9/module_autoload.html comp-sys-htmlman html
+./usr/share/man/html9/module_find_section.html comp-sys-htmlman html
./usr/share/man/html9/module_hold.html comp-sys-htmlman html
./usr/share/man/html9/module_init_class.html comp-sys-htmlman html
./usr/share/man/html9/module_load.html comp-sys-htmlman html
@@ -21131,6 +21133,7 @@
./usr/share/man/man9/microuptime.9 comp-sys-man .man
./usr/share/man/man9/module.9 comp-sys-man .man
./usr/share/man/man9/module_autoload.9 comp-sys-man .man
+./usr/share/man/cat9/module_find_section.9 comp-sys-man .man
./usr/share/man/man9/module_hold.9 comp-sys-man .man
./usr/share/man/man9/module_init_class.9 comp-sys-man .man
./usr/share/man/man9/module_load.9 comp-sys-man .man
Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.338 src/share/man/man9/Makefile:1.339
--- src/share/man/man9/Makefile:1.338 Sat Jul 31 03:14:05 2010
+++ src/share/man/man9/Makefile Sat Aug 7 22:21:30 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.338 2010/07/31 03:14:05 pgoyette Exp $
+# $NetBSD: Makefile,v 1.339 2010/08/07 22:21:30 pgoyette Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -435,6 +435,7 @@
microuptime.9 nanouptime.9 \
microuptime.9 getnanouptime.9
MLINKS+=module.9 module_autoload.9 \
+ module.9 module_find_section.9 \
module.9 module_hold.9 \
module.9 module_init_class.9 \
module.9 module_load.9 \
Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.7 src/share/man/man9/module.9:1.8
--- src/share/man/man9/module.9:1.7 Wed Aug 4 18:52:49 2010
+++ src/share/man/man9/module.9 Sat Aug 7 22:21:30 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: module.9,v 1.7 2010/08/04 18:52:49 wiz Exp $
+.\" $NetBSD: module.9,v 1.8 2010/08/07 22:21: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 August 4, 2010
+.Dd August 7, 2010
.Dt MODULE 9
.Os
.Sh NAME
@@ -37,7 +37,8 @@
.Nm module_unload ,
.Nm module_init_class ,
.Nm module_hold ,
-.Nm module_rele
+.Nm module_rele ,
+.Nm module_find_section
.Nd kernel module loader
.Sh SYNOPSIS
.In sys/module.h
@@ -55,6 +56,8 @@
.Fn module_hold "const char *name"
.Ft void
.Fn module_rele "const char *"
+.Ft int
+.Fn module_find_section "const char *" "void **" "size_t *"
.Sh DESCRIPTION
Modules are sections of code that can be independently linked and selectively
loaded into or unloaded from a running kernel.
@@ -282,6 +285,14 @@
A module cannot be unloaded if its reference count is non-zero.
.It Fn module_rele "name"
Decrement the reference count of a module.
+.It Fn module_find_section "name" "addr" "size"
+Find the start address and size of linker section
+.Ar name
+within a module.
+The miniroot module uses this routine to find the address and size of the
+embedded filesystem image.
+This routine can only examine the linker data for the module that is
+currently being initialized; it cannot examine data for any other module.
.El
.Sh LOCK PROTOCOL
The