]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/create_module.2
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / 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 "2002" Linux "Linux Module Support"
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 EPERM
44 The caller was not privileged
45 (did not have the
46 .B CAP_SYS_MODULE
47 capability).
48 .SH "CONFORMING TO"
49 .BR create_module ()
50 is Linux specific.
51 .SH NOTES
52 This system call is only present on Linux up until kernel 2.4;
53 it was removed in Linux 2.6.
54 .\" Removed in Linux-2.5.48
55 .SH "SEE ALSO"
56 .BR init_module (2),
57 .BR delete_module (2),
58 .BR query_module (2)