GNU/Linux |
CentOS 5.5 |
|
![]() |
delete_module(2) |
![]() |
delete_module − Delete a loadable module
long sys_delete_module (const char *name_user, unsigned int flags, const struct timespec *rqtp, struct timespec *rmtp); |
delete_module
deletes a loadable module. name_user points to the
module name that is given by the userspace call to this
system call. The flags parameter specifies what
actions to take upon module use. There are two values for
the flags parameter:
O_TRUNC
If flags is set to this and CONFIG_MODULE_FORCE_UNLOAD is turned on, deletion can take place; otherwise, the function returns EBUSY.
O_NONBLOCK
If the module is in use, CONFIG_MODULE_FORCE_UNLOAD is turned on, the module refcount is non-zero, and O_TRUNC is also defined for the flag, then deletion can take place; otherwise, the function returns EWOULDBLOCK.
delete_module returns 0 on success; otherwise, it returns one of the errors listed in the "Errors" section.
-EPERM |
The current user does not have administrator capabilities to modify the modules. |
-EFAULT
An invalid user_name value was specified.
-EINTR |
A signal interrupt occurred. |
-ENOENT
An invalid module name was specified.
-EWOULDBLOCK
Other running modules are dependent on the specified module.
-EBUSY |
The module is already being removed or cannot be removed. |
init_module(2)
Niki Rahimi
![]() |
delete_module(2) | ![]() |