Reading from a block device in kernel space

三世轮回 提交于 2019-12-04 15:36:22

If you really absolutely must then use the filp_open, filp_close, vfs_read and vfs_write functions.

The description for for filp_open states "This is the helper to open a file from kernelspace if you really have to. But in generally you should not do this, so please move along, nothing to see here.."

There is an excellent article "Driving Me Nuts - Things You Never Should Do in the Kernel" at http://www.linuxjournal.com/article/8110

You can look at any hard disk device driver.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!