Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
init_module(2)
Edit
PageHistory
Diff
Info
LikePages
INIT_MODULE !!!INIT_MODULE NAME SYNOPSIS DESCRIPTION RETURN VALUE ERRORS SEE ALSO ---- !!NAME init_module - initialize a loadable module entry !!SYNOPSIS __#include __''name''__, struct module *__''image''__); __ !!DESCRIPTION __init_module__ loads the relocated module image into kernel space and runs the module's ''init'' function. The module image begins with a module structure and is followed by code and data as appropriate. The module structure is defined as follows: struct module { unsigned long size_of_struct; struct module *next; const char *name; unsigned long size; long usecount; unsigned long flags; unsigned int nsyms; unsigned int ndeps; struct module_symbol *syms; struct module_ref *deps; struct module_ref *refs; int (*init)(void); void (*cleanup)(void); const struct exception_table_entry *ex_table_start; const struct exception_table_entry *ex_table_end; #ifdef __alpha__ unsigned long gp; #endif }; All of the pointer fields, with the exception of ''next'' and ''refs'', are expected to point within the module body and be initialized as appropriate for kernel space, i.e. relocated with the rest of the module. This system call is only open to the superuser. !!RETURN VALUE On success, zero is returned. On error, -1 is returned and ''errno'' is set appropriately. !!ERRORS __EPERM__ The user is not the superuser. __ENOENT__ No module by that name exists. __EINVAL__ Some ''image'' slot filled in incorrectly, ''image-'' does not correspond to the original module name, some ''image-'' entry does not correspond to a loaded module, or some other similar inconsistency. __EBUSY__ The module's initialization routine failed. __EFAULT__ ''name'' or ''image'' is outside the program's accessible address space. !!SEE ALSO create_module(2), __delete_module__(2), query_module(2). ----
5 pages link to
init_module(2)
:
Man2i
syscalls(2)
delete_module(2)
create_module(2)
query_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.