DELETE_MODULESection: Linux Programmer's Guide (2)
Index Return to Main Contents
NAMEdelete_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:
- If flags is set to this and CONFIG_MODULE_FORCE_UNLOAD is turned on, deletion can take place; otherwise, the function returns EBUSY.
- 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.
- The current user does not have administrator capabilities to modify the modules.
- An invalid user_name value was specified.
- A signal interrupt occurred.
- An invalid module name was specified.
- Other running modules are dependent on the specified module.
- The module is already being removed or cannot be removed.
This document was created by man2html, using the manual pages.
Time: 05:33:03 GMT, December 24, 2015