create_module 中文man頁面
NAME
create_module - 生成一條可加載模塊記錄.
總覽
#include <linux/module.h>
caddr_t create_module(const char *name, size_t size);
描述
create_module試圖生成一條可加載模塊的記錄并保留用來容納模塊的內(nèi)核空間內(nèi)存.該系統(tǒng)調(diào)用只對超級用戶開放.
返回值
成功時返回模塊駐留的內(nèi)核空間地址,錯誤時返回-1,errno被相應(yīng)設(shè)置.
錯誤
- EPERM
用戶非超級用戶.- EEXIST
相同名字的模塊已經(jīng)存在.- EINVAL
要求的大小即使對模塊的頭信息來說也太小.- ENOMEM
內(nèi)核無法給模塊分配足夠的連續(xù)的內(nèi)存塊.- EFAULT
name 越出了程序可訪問的地址空間.
#p#
NAME
create_module - create a loadable module entry
SYNOPSIS
#include <linux/module.h> caddr_t create_module(const char *name, size_t size);
DESCRIPTION
create_module attempts to create a loadable module entry and reserve the kernel memory that will be needed to hold the module. This system call is only open to the superuser.
RETURN VALUE
On success, returns the kernel address at which the module will reside. On error -1 is returned and errno is set appropriately.
ERRORS
- EPERM
- The user is not the superuser.
- EEXIST
- A module by that name already exists.
- 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.
- EFAULT
- name is outside the program's accessible address space.
SEE ALSO
init_module(2), delete_module(2), query_module(2).