Provided by:
manpages-zh_1.5.2-1_all 
NAME
query_module - . /* ?? */
#include <linux/module.h>
int query_module(const char *name, int which,void *buf, size_t bufsize,
size _t *ret);
query_module. which,name.namenull, .: which 0 Always returns
success. Used to probe for the system call. 0 ,. /* insmod -p */
QM_MODULES Returns the names of all loaded modules. The output
buffer
format is adjacent null-terminated strings; ret is set to the number
of mod ules.
.null;ret . QM_DEPS Returns the names of all modules used
by the indicated module. The output buffer format is adjacent null-
terminated strings; ret is set t o the number of modules. name.
null;ret. QM_REFS Returns the names of all modules using the
indicated module. This is the inverse of QM_DEPS. The output buffer
format is adjacent null-te rminated strings; ret is set to the number
of modules.
name.QM_DEPS. null;ret. QM_SYMBOLS Returns the symbols and
values exported by the kernel or t he indicated module. The buffer
format is an array of:
struct module_symbol
{
unsigned long value;
unsigned long name;
};
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 t he number of symbols.
().null ,name;ret.
struct module_symbol
{
unsigned long value;
unsigned long value;
} QM_INFO Returns miscelaneous information about the
indicated module. The output buffer format is:
struct module_info
{
unsigned long address;
unsigned long size;
unsigned long flags;
};
where address is the kernel address at which the module
reside s, size is the size of the module in bytes, and flags is a mask
of MOD_RUNNI NG, MOD_AUTOCLEAN, et al that indicates the current status
of the module. re t is set to the size of the module_info
struct.
,:
struct module_info
{
unsigned long address;
unsigned long size;
unsigned long flags;
}
address,size,flagsMOD_R UNING,MOD_AUTOCLEAN.retmod ule_info.
0,-1,errno.
ENOENT
name.
EINVAL
ENOSPC
,ret.
EFAULT
name,bufret.
"" <nsinit@263.net>
query_module(2)