from small one page howto to huge articles all in one place
 

search text in:





Poll
Which filesystem do you use?






poll results



Last additions:
Disable Anti-Aliasing fonts

Disable Anti-Aliasing fonts

words:

186

views:

8264

userrating:

no votes yet


May 25th. 2007:
Words

491

Views

9600

why adblockers are bad


handy one-liners for sed (Unix stream editor)
Tutorial:

handy one-liners for sed (Unix stream editor)

words:

4078

views:

24997

userrating:

no votes yet


rotating apache logfiles with cronolog

rotating apache logfiles with cronolog

words:

294

views:

9729

userrating:

no votes yet


Druckversion
You are here: manpages

INIT_MODULE

Section: Linux Programmer's Manual (2)
Updated: 2006-02-09
Index Return to Main Contents
 

NAME

init_module - initialize a loadable module entry  

SYNOPSIS

#include <linux/module.h>

int init_module(const char *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, that is, relocated with the rest of the module.

This system call requires privilege.  

RETURN VALUE

On success, zero is returned. On error, -1 is returned and errno is set appropriately.  

ERRORS

EBUSY
The module's initialization routine failed.
EFAULT
name or image is outside the program's accessible address space.
EINVAL
Some image slot is filled in incorrectly, image->name does not correspond to the original module name, some image->deps entry does not correspond to a loaded module, or some other similar inconsistency.
ENOENT
No module by that name exists.
EPERM
The caller was not privileged (did not have the CAP_SYS_MODULE capability).
 

CONFORMING TO

init_module() is Linux-specific.  

SEE ALSO

create_module(2), delete_module(2), query_module(2)  

COLOPHON

This page is part of release 3.05 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO
COLOPHON

Please read "Why adblockers are bad". Ärger mit Freenet.de



to the forum.
:
:
other Ads
Stellenangebote
Stellenangebote
für Fach- und
Führungskräfte
www.nachoben.com
Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
FeedCollector
Combine various newsfeeds to one customized webpage
www.feedcollector.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004 S&P Softwaredesign
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 22.6 ms
system status display