IPB
>  Man Pages > Linux > Suse Linux 10.1 > Section 2 > init_module man page

init_module man page

Section 2 - Suse Linux 10.1 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


INIT_MODULE(2)               Linux Module Support               INIT_MODULE(2)




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  appro-
       priate for kernel space, i.e., 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)



Linux                                2002                       INIT_MODULE(2)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Tue Feb 13 02:17:35 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

sqlite3 man page (5323 hits)
(openSUSE 10.2)

svn man page (5169 hits)
(FreeBSD 6.2)

adv_cap_autoneg man page (4865 hits)
(Solaris 10 11_06)

CPAN man page (4602 hits)
(Suse Linux 10.1)

ssh man page (4337 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (2841 hits)
(Solaris 10 11_06)

netcat man page (2688 hits)
(Suse Linux 10.1)

pprosetup man page (2472 hits)
(Solaris 10 11_06)

startproc man page (2452 hits)
(Suse Linux 10.1)

signal man page (2393 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Mountain Holidays Contact Us :: PIC Micro Development :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum