kernel_read【转】
2016-06-01 13:49
615 查看
转自:http://blog.csdn.net/echoisland/article/details/7101097 http://lxr.oss.org.cn/source/fs/exec.c
798 int kernel_read(struct file *file, loff_t offset, 799 char *addr, unsigned long count) 800 { 801 mm_segment_t old_fs; 802 loff_t pos = offset; 803 int result; 804 805 old_fs = get_fs(); 806 set_fs(get_ds()); 807 /* The cast to a user pointer is valid due to the set_fs() */ 808 result = vfs_read(file, (void __user *)addr, count, &pos); 809 set_fs(old_fs); 810 return result; 811 } 812 813 EXPORT_SYMBOL(kernel_read);
相关文章推荐
- World of Warcraft
- 转化率不好?告诉你转化飙秘诀
- linux基本命令(49)——at命令
- 程序员必备神器
- maven常见错误
- 内核态文件操作【转】
- android中的include的使用
- LeetCode 90 Subsets II
- eclipse安装gradle插件
- Orocos Activity&ExecutionEngine 解析
- CyclicBarrier示例
- 解决android.permission.WRITE_APN_SETTINGS
- Maven 详解
- 实现分数类中的运算符重载,在分数类中可以完成分数的加减乘除(运算后再化简)、比较(6种关系)的运算
- Docker 入门教程(四)
- UIScrollView的PageEnable可以实现slider
- Node.js Express目录结构
- linux基本命令(51)——lsof命令
- PING 一个范围内的IP,把不通的保存下来的方法(批处理脚本)
- Java静态属性和方法的继承问题