1
2DELETE_MODULE(2)           Linux Programmer's Guide           DELETE_MODULE(2)
3
4
5

NAME

7       delete_module - Delete a loadable module
8

SYNOPSIS

10       long sys_delete_module (const char *name_user, unsigned int flags,
11                               const struct timespec *rqtp,
12                               struct timespec *rmtp);
13
14

DESCRIPTION

16       delete_module deletes a loadable module. name_user points to the module
17       name that is given by the userspace call to this system call. The flags
18       parameter specifies what actions to take upon module use. There are two
19       values for the flags parameter:
20
21
22       O_TRUNC
23              If flags is set to this and CONFIG_MODULE_FORCE_UNLOAD is turned
24              on,  deletion  can  take  place; otherwise, the function returns
25              EBUSY.
26
27
28       O_NONBLOCK
29              If the module is in use,  CONFIG_MODULE_FORCE_UNLOAD  is  turned
30              on, the module refcount is non-zero, and O_TRUNC is also defined
31              for the flag, then deletion can take place; otherwise, the func‐
32              tion returns EWOULDBLOCK.
33
34

RETURN VALUE

36       delete_module  returns  0  on success; otherwise, it returns one of the
37       errors listed in the "Errors" section.
38
39

ERRORS

41       -EPERM The current user does not  have  administrator  capabilities  to
42              modify the modules.
43
44
45       -EFAULT
46              An invalid user_name value was specified.
47
48
49
50       -EINTR A signal interrupt occurred.
51
52
53       -ENOENT
54              An invalid module name was specified.
55
56
57       -EWOULDBLOCK
58              Other running modules are dependent on the specified module.
59
60
61       -EBUSY The module is already being removed or cannot be removed.
62
63

SEE ALSO

65       init_module(2)
66
67

AUTHOR

69       Niki Rahimi
70
71
72
73Linux 2.6                        2004-March-12                DELETE_MODULE(2)
Impressum