File: create_module.2

package info (click to toggle)
modutils 2.4.26-1.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,724 kB
  • ctags: 1,708
  • sloc: ansic: 16,932; sh: 2,998; makefile: 549; lex: 490; yacc: 375
file content (41 lines) | stat: -rw-r--r-- 1,241 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.\" Copyright (C) 1996 Free Software Foundation, Inc.
.\" This file is distributed according to the GNU General Public License.
.\" See the file COPYING in the top level source directory for details.
.\"
.TH CREATE_MODULE 2 "26 Dec 1996" Linux "Linux Module Support"
.SH NAME
create_module \- create a loadable module entry
.SH SYNOPSIS
.nf
.B #include <linux/module.h>
.sp
.BI "caddr_t create_module(const char *" name ", size_t " size );
.fi
.SH DESCRIPTION
.B create_module
attempts to create a loadable module entry and reserve the kernel memory
that will be needed to hold the module.  This system call is only open
to the superuser.
.SH "RETURN VALUE"
On success, returns the kernel address at which the module will reside.
On error \-1 is returned and \fIerrno\fP is set appropriately.
.SH ERRORS
.TP
.B EPERM
The user is not the superuser.
.TP
.B EEXIST
A module by that name already exists.
.TP
.B EINVAL
The requested size is too small even for the module header information.
.TP
.B ENOMEM
The kernel could not allocate a contiguous block of memory large
enough for the module.
.TP
.B EFAULT
.I name
is outside the program's accessible address space.
.SH "SEE ALSO
.BR init_module "(2), " delete_module "(2), " query_module "(2)."