文件名称:file_operations
介绍说明--下载内容均来自于网络,请自行研究使用
ssize_t (*read) (struct file * filp, char __user * buffer, size_t size , loff_t * p) (指针参数 filp 为进行读取信息的目标文件,指针参数buffer 为对应放置信息的缓冲区(即用户空间内存地址),参数size为要读取的信息长度,参数 p 为读的位置相对于文件开头的偏移,在读取信息后,这个指针一般都会移动,移动的值为要读取信息的长度值)这个函数用来从设备中获取数据. 在这个位置的一个空指针导致 read 系统调用以 -EINVAL("Invalid argument") 失败.一个非负返回值代表了成功读取的字节数( 返回值是一个 "signed size" 类型, 常常是目标平台本地的整数类型).-ssize_t (* read) (struct file* filp, char __ user* buffer, size_t size, loff_t* p) (the pointer parameter filp to read the target file pointer parameter buffer corresponding buffer placement information (i.e., the user-space memory address), the size parameter is the length of the information to be read, the parameter p is the position of the read offset relative to the beginning of the file, after the read-out information, this pointer will generally move, move the value to be read This function is used to take the length of the value of the information) to get the data from the device. causes the read system call to-EINVAL (" Invalid argument" ) failed a non-negative return value represents a successful read word in this position a null pointer section number (return value is a " signed size" type, is often the target platform for local integer type).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
file_operations.doc