Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c设备驱动程序文件\操作结构字段_C_Device Driver - Fatal编程技术网

c设备驱动程序文件\操作结构字段

c设备驱动程序文件\操作结构字段,c,device-driver,C,Device Driver,以下是:结构域之后,即所有者的含义: 我也见过这样的地方。所有者:= 另外,我如何查看“所有者”的其他可用选项。我想授予所有人发出ioctl调用的权限 这是什么意思。在这里 有人能解释一下吗 struct file_operations hello_fops = { owner: THIS_MODULE, read: hello_read, write: hello_write, ioctl: hello_ioctl, open: hello_open, release: hello_relea

以下是:结构域之后,即所有者的含义: 我也见过这样的地方。所有者:=

另外,我如何查看“所有者”的其他可用选项。我想授予所有人发出ioctl调用的权限

这是什么意思。在这里 有人能解释一下吗

struct file_operations hello_fops = {
owner: THIS_MODULE,
read: hello_read,
write: hello_write,
ioctl: hello_ioctl,
open: hello_open,
release: hello_release,
};
是C99样式的初始值设定项

{.field=value}
是GCC样式的初始值设定项

{.field=value}
owner
与权限无关。权限是正常的文件权限,您可能需要使用
udev
规则来设置适当的权限。
ioctl
调用通常需要额外的权限,具体取决于其含义,例如:某些网络相关ioctl的CAP\u NET\u ADMIN