OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man2 / create_module.2
1 .\" Copyright (C) 1996 Free Software Foundation, Inc.
2 .\" This file is distributed according to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
4 .\"
5 .\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
6 .\" reformatting and rewordings by mtk
7 .\"
8 .TH CREATE_MODULE 2 2007-06-03 "Linux" "Linux Programmer's Manual"
9 .SH NAME
10 create_module \- create a loadable module entry
11 .SH SYNOPSIS
12 .nf
13 .B #include <linux/module.h>
14 .sp
15 .BI "caddr_t create_module(const char *" name ", size_t " size );
16 .fi
17 .SH DESCRIPTION
18 .BR create_module ()
19 attempts to create a loadable module entry and reserve the kernel memory
20 that will be needed to hold the module.
21 This system call requires privilege.
22 .SH "RETURN VALUE"
23 On success, returns the kernel address at which the module will reside.
24 On error \-1 is returned and
25 .I errno
26 is set appropriately.
27 .SH ERRORS
28 .TP
29 .B EEXIST
30 A module by that name already exists.
31 .TP
32 .B EFAULT
33 .I name
34 is outside the program's accessible address space.
35 .TP
36 .B EINVAL
37 The requested size is too small even for the module header information.
38 .TP
39 .B ENOMEM
40 The kernel could not allocate a contiguous block of memory large
41 enough for the module.
42 .TP
43 .B ENOSYS
44 .BR create_module ()
45 is not supported in this version of the kernel.
46 .TP
47 .B EPERM
48 The caller was not privileged
49 (did not have the
50 .B CAP_SYS_MODULE
51 capability).
52 .SH VERSIONS
53 This system call is only present on Linux up until kernel 2.4;
54 it was removed in Linux 2.6.
55 .\" Removed in Linux 2.5.48
56 .SH "CONFORMING TO"
57 .BR create_module ()
58 is Linux-specific.
59 .SH "SEE ALSO"
60 .BR delete_module (2),
61 .BR init_module (2),
62 .BR query_module (2)