Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ modload(1M) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kernel(1M)

ld(1)

modunload(1M)

modinfo(1M)

system(4)

modldrv(9S)

modlstrmod(9S)

modlinkage(9S)

module_info(9S)

modload(1M)

NAME

modload − load a kernel module

SYNOPSIS

modload [ −p ] [ −e exec_file ] filename

AVAILABILITY

SUNWcsu

DESCRIPTION

modload 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 ’/’ 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 plus /usr/modules.  Typically this is /kernel /usr/modules.  Hence if you type:

example# modload drv/foo

Then the kernel will look for ./drv/foo. 

If you type:

example# modload −p drv/foo

Then the kernel will look for /kernel/drv/foo and then /usr/modules/drv/foo. 

OPTIONS

−p Use the kernel’s internal modpath variable as the search path for the module. 

−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).  There are two additional arguments that are module specific.  For loadable drivers, the second and third arguments are the block major and character major numbers respectively.  For loadable system calls the second argument is the system call number.  For loadable exec classes the second argument is the index into the execsw table.  For loadable filesystems the second argument is the index into the vfssw table.  For loadable streams modules the second argument is the index into the fmodsw table.  For loadable scheduling classes the second argument is the index into the class array.  Minus one is passed for an argument that does not apply.  For instance, a driver which only supports a character interface would have −1 passed as argument number 2, the block major number. 

ERRORS

ENOENT The module named by filename could not be found or there was some error in the initialization routine of the module. 

SEE ALSO

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

SunOS 5.1  —  Last change: 14 Sep 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026