xref: /illumos-gate/usr/src/man/man8/modunload.8 (revision 6dde88b51419b99fe0aab8e56184c693945826b8)
te
Copyright (c) 2005, 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]
MODUNLOAD 8 "Nov 19, 2001"
NAME
modunload - unload a module
SYNOPSIS

modunload -i module_id [-e exec_file]
DESCRIPTION

modunload unloads a loadable module from the running system. The module_id is the ID of the module as shown by modinfo(8). If ID is 0, all modules that were autoloaded which are unloadable, are unloaded. Modules loaded by modload(8) are not affected.

OPTIONS

The following options are supported: -e exec_file

Specify the name of a shell script or executable image file to be executed before the module is unloaded. The first argument passed is the module id (in decimal). There are two additional arguments that are module specific. For loadable drivers, the second argument is the driver major number. 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.

-i module_id

Specify the module to be unloaded.

SEE ALSO

attributes (7), modinfo (8), modload (8), update_drv (8)

NOTES

The modunload command is often used on driver modules to force the system to reread the associated driver configuration file. While this works in the current Solaris release, it is not the supported way to reread the configuration file and is not guaranteed to work in future releases. The supported way for rereading driver configuration file is through the update_drv(8) command.