Penguin
Diff: query_module(2)
EditPageHistoryDiffInfoLikePages

Differences between current version and predecessor to the previous major change of query_module(2).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 5 Last edited on Sunday, March 16, 2003 8:17:49 pm by PerryLorier
Older page: version 4 Last edited on Monday, June 3, 2002 6:53:02 pm by perry Revert
@@ -1,136 +1,45 @@
-QUERY_MODULE  
-!!!QUERY_MODULE  
-NAME  
-SYNOPSIS  
-DESCRIPTION  
-RETURN VALUE  
-ERRORS  
-SEE ALSO  
-----  
 !!NAME 
+query_module - query the kernel for various bits pertaining to modules.  
  
-  
-query_module - query the kernel for various bits pertaining to modules.  
 !!SYNOPSIS 
-  
-  
- __#include  
-__''name''__, int__ ''which''__,  
- void *__''buf''__, size_t__ ''bufsize''__, size_t *__''ret''__);  
- __ 
+ __#include <linux/module.h>__  
+ __int query_module(const char * __''name''__, int__ ''which''__, void *__''buf''__, size_t__ ''bufsize''__, size_t *__''ret''__); __ 
 !!DESCRIPTION 
+__query_module__ requests information related to loadable modules from the kernel. The precise nature of the information and its format depends on the ''which'' sub function. Some functions require ''name'' to name a currently loaded module, some allow ''name'' to be __NULL__ indicating the kernel proper.  
  
+!!VALUES OF WHICH  
  
-__query_module__ requests information related to loadable  
-modules from the kernel . The precise nature of the  
-information and its format depends on the ''which '' sub  
-function . Some functions require ''name '' to name a  
-currently loaded module, some allow ''name '' to be  
-__NULL__ indicating the kernel proper
+;: Always returns success. Used to probe for the system call.  
+;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 modules.  
+;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 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 output buffer format is adjacent 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 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 the number of symbols.  
  
-__VALUES OF WHICH__  
+;QM _INFO: Returns miscellaneous 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 resides, ''size'' is the size of the module in bytes, and ''flags'' is a mask of __MOD _RUNNING __, __MOD_AUTOCLEAN__, et al that indicates the current status of the module. ''ret'' is set to the size of the __module_info__ struct.  
  
-  
-Always returns success. Used to probe for the system  
-call.  
-  
-  
-__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 modules.  
-  
-  
-__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 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 output buffer  
-format is adjacent 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 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 the number of symbols.  
-  
-  
-__QM_INFO__  
-  
-  
-Returns miscellaneous 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 resides, ''size'' is the size of the module in bytes, and ''flags'' is a mask of __MOD_RUNNING__, __MOD_AUTOCLEAN__, et al that indicates the current status of the module. ''ret'' is set to the size of the __module_info__ struct.  
 !!RETURN VALUE 
-  
-  
- On success, zero is returned. On error, -1 is returned and  
- ''errno'' is set appropriately. 
+On success, zero is returned. On error, -1 is returned and ''errno'' is set appropriately. 
 !!ERRORS 
+;[ENOENT]: No module by that ''name'' exists.  
+;[EINVAL]: Invalid ''which'', or ''name'' indicates the kernel for an inappropriate sub function.  
+;[ENOSPC]: The buffer size provided was too small. ''ret'' is set to the minimum size needed.  
+;[EFAULT]: At least one of ''name'', ''buf'', or ''ret'' was outside the program's accessible address space.  
  
-  
-__ENOENT__  
-  
-  
-No module by that ''name'' exists.  
-  
-  
-__EINVAL__  
-  
-  
-Invalid ''which'', or ''name'' indicates the kernel  
-for an inappropriate sub function.  
-  
-  
-__ENOSPC__  
-  
-  
-The buffer size provided was too small. ''ret'' is set to  
-the minimum size needed.  
-  
-  
-__EFAULT__  
-  
-  
-At least one of ''name'', ''buf'', or ''ret'' was  
-outside the program's accessible address space.  
 !!SEE ALSO 
-  
-  
- create_module(2), __ init_module__ (2),  
- delete_module(2).  
-----  
+create_module(2), init_module(2), delete_module(2). 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.