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中刪除。