Char Driver Linux:读写file_operations的正确实现是什么?需要进行哪些偏移量检查?
我正在尝试读写char驱动程序。当我使用C程序打开设备文件并对其进行读写时,出现SEG错误。当我在设备文件中使用猫时,它将进入无限循环。
1)有人可以帮助解释我缺少什么以及在file_operations中正确执行读写操作吗?
2) I know in prototype read/write: read(struct file *fp, char *ch, size_t count, loff_t *lofft) count refers to number of bytes read/write req...