xref: /titanic_50/usr/src/man/man1m/modload.1m (revision 174bc6499d233e329ecd3d98a880a7b07df16bfa)
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]
MODLOAD 1M "Dec 1, 1993"
NAME
modload - load a kernel module
SYNOPSIS

modload [-p] [-e exec_file] filename
DESCRIPTION

The modload command loads the loadable module filename into the running system.

filename is an object file produced by ld -r. If filename is an absolute pathname then the file specified by that absolute path is loaded. If filename does not begin with a slash (/), then the path to load filename is relative to the current directory unless the -p option is specified.

The kernel's modpath variable can be set using the /etc/system file. The default value of the kernel's modpath variable is set to the path where the operating system was loaded. Typically this is /kernel /usr/kernel.

For example, the following command looks for ./drv/foo:

example# modload drv/foo

The following command looks for /kernel/drv/foo and then /usr/kernel/drv/foo:

example# modload -p drv/foo
OPTIONS

The following options are supported: -e exec_file

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 modinfo(1M)

-p

Use the kernel's internal modpath variable as the search path for the module.

SEE ALSO

ld(1), add_drv(1M), kernel(1M), modinfo(1M), modunload(1M), system(4), attributes(5), modldrv(9S), modlinkage(9S), modlstrmod(9S), module_info(9S)

NOTES

Use add_drv(1M) to add device drivers, not modload. See for procedures on adding device drivers.