1 .\" Copyright (C) 1996 Free Software Foundation, Inc.
2 .\" This file is distributed accroding to the GNU General Public License.
3 .\" See the file COPYING in the top level source directory for details.
5 .\" Japanese Version Copyright (c) 1997,1999 HANATAKA Shinya and FUJIWARA Teruyoshi
6 .\" all rights reserved.
7 .\" Translated Sat Aug 30 13:42:42 JST 1997
8 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
9 .\" Merged with another translation Sun Aug 15 09:55:42 JST 1999
10 .\" by FUJIWARA Teruyoshi <fujiwara@linux.or.jp>
12 .\"WORD: loadable module ¥í¡¼¥À¥Ö¥ë¡¦¥â¥¸¥å¡¼¥ë
14 .TH CREATE_MODULE 2 "26 Dec 1996" Linux "Linux Module Support"
17 .\"O create_module \- create a loadable module entry
18 create_module \- ¥í¡¼¥À¥Ö¥ë¥â¥¸¥å¡¼¥ë¤Î¥¨¥ó¥È¥ê¤òÀ¸À®¤¹¤ë
22 .B #include <linux/module.h>
24 .BI "caddr_t create_module(const char *" name ", size_t " size );
29 .\"O attempts to create a loadable module entry and reserve the kernel memory
30 .\"O that will be needed to hold the module. This system call is only open
31 .\"O to the superuser.
33 ¤Ï¥í¡¼¥À¥Ö¥ë¥â¥¸¥å¡¼¥ë(loadable module)¤Î¥¨¥ó¥È¥ê¤òºîÀ®¤·¡¢¤½¤Î¥â¥¸¥å¡¼¥ë
34 ¤ÎÊÝ»ý¤ËɬÍפʥ«¡¼¥Í¥ë¥á¥â¥ê¤òͽÌ󤷤褦¤È¤¹¤ë¡£¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò»È
35 ¤¨¤ë¤Î¤Ï¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¤À¤±¤Ç¤¢¤ë¡£
36 .\"O .SH "RETURN VALUE"
38 .\"O On success, returns the kernel address at which the module will reside.
39 .\"O On error \-1 is returned and \fIerrno\fP is set appropriately.
40 À®¸ù¤·¤¿¾ì¹ç¤Ï¡¢¥â¥¸¥å¡¼¥ë¤ò¾ïÃ󤵤»¤ë¤¿¤á¤Î¥«¡¼¥Í¥ë¥á¥â¥ê¾å¤Î¥¢¥É¥ì¥¹
41 ¤¬ÊÖ¤µ¤ì¤ë¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢\fIerrno\fP ¤ÎÃͤ¬Å¬ÀÚ¤ËÀßÄê
47 .\"O The user is not the superuser.
48 ¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¤Î¤¬¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¤Ç¤Ê¤¤¡£
51 .\"O A module by that name already exists.
52 ¤½¤Î̾Á°¤Î¥â¥¸¥å¡¼¥ë¤¬´û¤Ë¸ºß¤·¤Æ¤¤¤ë¡£
55 .\"O The requested size is too small even for the module header information.
56 Í׵ᤷ¤¿¥µ¥¤¥º¤¬¾®¤µ¤¹¤®¤Æ¡¢¥â¥¸¥å¡¼¥ë¤Î¥Ø¥Ã¥À¾ðÊ󤹤é³ÊǼ¤Ç¤¤Ê¤¤¡£
59 .\"O The kernel could not allocate a contiguous block of memory large
60 .\"O enough for the module.
61 ¥â¥¸¥å¡¼¥ë¤ò³ÊǼ¤¹¤ë¤Î¤ËɬÍפÊÂ礤µ¤ÎϢ³¤·¤¿¥á¥â¥ê¥Ö¥í¥Ã¥¯¤ò¥«¡¼¥Í¥ë
66 .\"O is outside the program's accessible address space.
68 ¤¬¡¢¥×¥í¥°¥é¥à¤¬¥¢¥¯¥»¥¹¤Ç¤¤ë¥¢¥É¥ì¥¹¶õ´Ö¤Î³°Éô¤Ë¤¢¤ë¡£
71 .\"O .BR init_module "(2), " delete_module "(2), " query_module "(2)."
72 .BR init_module "(2), " delete_module "(2), " query_module "(2)"