delete_module(2)
NAME
delete_module - Delete a loadable module
SYNOPSIS
long sys_delete_module (const char *name_user, unsigned int flags, const struct timespec *rqtp, struct timespec *rmtp);
DESCRIPTION
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.
RETURN VALUE
delete_module returns 0 on success; otherwise, it returns one of the
errors listed in the "Errors" section.
ERRORS
- -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.
SEE ALSO
AUTHOR
- Niki Rahimi