小编Dal*_*nd 的帖子

在内核模式和用户模式之间使用ioctl通信

我想使用ioctl与我的内核模块进行通信.我已经为内核模块编写了两个c程序,其他用于用户模式.编译内核模块时出现此错误:

错误:初始化程序中指定的未知字段'ioctl'

在这一行:

struct file_operations Fops = {
 .read = device_read,
 .write = device_write,
 .ioctl = device_ioctl,  ------> at this point error is occuring.
 .open = device_open,
 .release = device_release,
};
Run Code Online (Sandbox Code Playgroud)

知道为什么会这样.

谢谢

ioctl kernel-module ubuntu-10.04

17
推荐指数
1
解决办法
2万
查看次数

标签 统计

ioctl ×1

kernel-module ×1

ubuntu-10.04 ×1