create_module - 创建一个可加载模块项目
内容简介
|
#include <linux/module.h> caddr_t create_module(const char *name, size_t size); |
描述
create_module() 尝试创建一个可加载模块项目,并预定将需要按住模块的内核内存。此系统调用需要的特权。
返回值
On success, returns the kernel address at which the module will reside. On error -1 is returned and errno is set appropriately.
错误
| Error Code | 描述 |
|---|---|
| EEXIST | A module by that name already exists. |
| EFAULT | name is outside the program’s accessible address space. |
| EINVAL | The requested size is too small even for the module header information. |
| ENOMEM | The kernel could not allocate a contiguous block of memory large enough for the module. |
| EPERM | The caller was not privileged (did not have theCAP_SYS_MODULE capability). |
遵循于
create_module() is Linux specific.
注意
这个系统调用是目前唯一在Linux2.4内核,直到它在Linux2.6中删除。
另请参阅
上一篇:
connect()函数 Unix/Linux
下一篇:
open()函数 Unix/Linux
