码迷,mamicode.com
首页 >  
搜索关键字:file_operations    ( 93个结果
linux内核头文件 cdev.h 解析
遇到一个内核API——cdev_init 就找到这里来了。#ifndef _LINUX_CDEV_H#define _LINUX_CDEV_H#include #include struct file_operations;struct inode;struct module;struct cdev...
分类:系统相关   时间:2015-01-07 20:36:32    阅读次数:311
linux 设备驱动之IOCTRL
linux 设备驱动之IOCTRL 1,where come from? ioctrl(或者说unlocked_ioctl/compat_ioctl)是file_operations结构体的函数指针 struct file_operations { ...      long (*unlocked_ioctl) (struct file *, unsigned i...
分类:系统相关   时间:2014-12-25 20:34:47    阅读次数:452
驱动笔记 - 混杂设备常用函数
#include 混杂设备:主设备号为10的字符设备struct miscdevice{ int minor; //次设备号 const char *name; const struct file_operations *fops; struct list_head list; struct dev...
分类:其他好文   时间:2014-11-19 23:53:21    阅读次数:225
驱动笔记 - file_operations
#include struct file_operations { struct module *owner; loff_t (*llseek) (struct file *, loff_t, int); ssize_t (*read) (struct file *, char __user *, ...
分类:其他好文   时间:2014-11-19 23:45:41    阅读次数:242
TEST
static struct file_operations s3c24xx_leds_fops ={ .owner = THIS_MODULE , //.open = s3c24xx_leds_open, .read = s3c24xx_leds_read , .write = s3c24xx_le...
分类:其他好文   时间:2014-10-16 16:09:12    阅读次数:138
TEST2
static struct file_operations s3c24xx_leds_fops ={ .owner = THIS_MODULE , //.open = s3c24xx_leds_open, .read = s3c24xx_leds_read , .write = s3c24xx_le...
分类:其他好文   时间:2014-10-16 15:51:02    阅读次数:184
字符设备驱动
Scull的设计 主设备号和次设备号 设备编号的内部表达 分配和释放设备号 动态分配主设备号 一些重要的数据结构 三个file_operations,file,inode 文件操作 file结构 inode结构 read和write unsigned long copy_to_user(void __user *to,const void *from,...
分类:其他好文   时间:2014-09-26 11:01:41    阅读次数:187
ioctl和unlock_ioctl的区别
今天调一个程序调了半天,发现应用程序的ioctl的cmd参数传送到驱动程序的ioctl发生改变。而根据《linux设备驱动》这个cmd应该是不变的。因为在kernel 2.6.36 中已经完全删除了struct file_operations 中的ioctl 函数指针,取而代之的是unlocked_...
分类:其他好文   时间:2014-09-24 22:43:27    阅读次数:217
PHP 配置文件中open_basedir选项作用
如下是php.ini中的原文说明以及默认配置: ; open_basedir, if set, limits all file operations to the defined directory ; and below. This directive makes most sense if used in a per-directory or ; per-...
分类:Web程序   时间:2014-09-11 17:39:22    阅读次数:209
error: unknown field 'ioctl' specified in initializer
error message:原因: 从2.6.36开始,file_operations结构发生了重大变化具体看 xx../include/linux/fs.h定义:取消了原先的int (*ioctl)(struct inode*, struct file*, unsigned int, unsign...
分类:其他好文   时间:2014-07-31 16:19:37    阅读次数:275
93条   上一页 1 ... 7 8 9 10 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!