Copyright © tutorialspoint.com
#include <linux/module.h> |
The following values can be specified for which:
Tag | Description | |
---|---|---|
0 | Always returns success. Used to probe for availability of the system call. | |
QM_MODULES | ||
Returns the names of all loaded modules. The returned buffer consists of a sequence of null-terminated strings; ret is set to the number of modules. | ||
QM_DEPS | ||
Returns the names of all modules used by the indicated module. The returned buffer consists of a sequence of null-terminated strings; ret is set to the number of modules. | ||
QM_REFS | ||
Returns the names of all modules using the indicated module. This is the inverse of QM_DEPS. The returned buffer consists of a sequence of null-terminated strings; ret is set to the number of modules. | ||
QM_SYMBOLS | ||
Returns the symbols and values exported by the kernel or the indicated
module.
The returned buffer is an array of structures of the following form
followed by null-terminated strings. The value of name is the character offset of the string relative to the start of buf; ret is set to the number of symbols. | ||
QM_INFO | ||
Returns miscellaneous information about the indicated module. The output
buffer format is:
where address is the kernel address at which the module resides, size is the size of the module in bytes, and flags is a mask of MOD_RUNNING, MOD_AUTOCLEAN, etc. that indicates the current status of the module (see the kernel source file include/linux/module.h). ret is set to the size of the module_info structure. |
Tag | Description |
---|---|
EFAULT | At least one of name, buf, or ret was outside the programs accessible address space. |
EINVAL | Invalid which; or name is NULL (indicating "the kernel"), but this is not permitted with the specified value of which. |
ENOENT | No module by that name exists. |
ENOSPC | The buffer size provided was too small. ret is set to the minimum size needed. |
Copyright © tutorialspoint.com