'\" te .\" Copyright (c) 1993, Sun Microsystems, Inc. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH MODLOAD 8 "Dec 1, 1993" .SH NAME modload \- load a kernel module .SH SYNOPSIS .LP .nf \fBmodload\fR [\fB-p\fR] [\fB-e\fR \fIexec_file\fR] \fIfilename\fR .fi .SH DESCRIPTION .sp .LP The \fBmodload\fR command loads the loadable module \fIfilename\fR into the running system. .sp .LP \fIfilename\fR is an object file produced by \fBld \fR\fB-r\fR. If \fIfilename\fR is an absolute pathname then the file specified by that absolute path is loaded. If \fIfilename\fR does not begin with a slash (\fB/\fR), then the path to load \fIfilename\fR is relative to the current directory unless the \fB-p\fR option is specified. .sp .LP The kernel's \fBmodpath\fR variable can be set using the \fB/etc/system\fR file. The default value of the kernel's \fBmodpath\fR variable is set to the path where the operating system was loaded. Typically this is \fB/kernel /usr/kernel\fR. .sp .LP For example, the following command looks for \fB\&./drv/foo\fR: .sp .in +2 .nf example# \fBmodload drv/foo\fR .fi .in -2 .sp .sp .LP The following command looks for \fB/kernel/drv/foo\fR and then \fB/usr/kernel/drv/foo\fR: .sp .in +2 .nf example# \fBmodload -p drv/foo\fR .fi .in -2 .sp .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-e\fR\fI exec_file\fR\fR .ad .RS 16n Specify the name of a shell script or executable image file that is executed after the module is successfully loaded. The first argument passed is the module ID (in decimal). The other argument is module specific. The module specific information is: the block and character major numbers for drivers, the system call number for system calls, or, for other module types, the index into the appropriate kernel table. See \fBmodinfo\fR(8) .RE .sp .ne 2 .na \fB\fB-p\fR\fR .ad .RS 16n Use the kernel's internal modpath variable as the search path for the module. .RE .SH SEE ALSO .sp .LP .BR ld (1), .BR system (5), .BR attributes (7), .BR add_drv (8), .BR kernel (8), .BR modinfo (8), .BR modunload (8), .BR modldrv (9S), .BR modlinkage (9S), .BR modlstrmod (9S), .BR module_info (9S) .sp .LP \fI\fR .SH NOTES .sp .LP Use \fBadd_drv\fR(8) to add device drivers, not \fBmodload\fR. See \fI\fR for procedures on adding device drivers.