内核的struct file在哪儿定义的
时间:2011-11-01
来源:互联网
内核的file结构体在哪儿定义的,怎么找不到啊,我在include/file.h中找到的定义是这样的:
C/C++ code
这个应该不是内核的file结构吧,里面连文件操作都没有,
我要找的是这个:
C/C++ code
但是就是找不到在那个文件中定义的,我的linux内核版本是2.6.38
C/C++ code
struct file { struct file *next; struct file *parent; char *name; int lineno; int flags; };
这个应该不是内核的file结构吧,里面连文件操作都没有,
我要找的是这个:
C/C++ code
struct file { /* * fu_list becomes invalid after file_free is called and queued via * fu_rcuhead for RCU freeing * */ union { struct list_head fu_list; struct rcu_head fu_rcuhead; } f_u; struct dentry *f_dentry; struct vfsmount *f_vfsmnt; const struct file_operations *f_op; atomic_t f_count; unsigned int f_flags; mode_t f_mode; loff_t f_pos; struct fown_structf_owner; unsigned int f_uid, f_gid; struct file_ra_statef_ra; unsigned long f_version; void *f_security; /* needed for tty driver, and maybe others */ void *private_data; #ifdef CONFIG_EPOLL /* Used by fs/eventpoll.c to link all the hooks to this file */ struct list_head f_ep_links; spinlock_t f_ep_lock; #endif /* #ifdef CONFIG_EPOLL */ struct address_space *f_mapping; };
但是就是找不到在那个文件中定义的,我的linux内核版本是2.6.38
作者: xjuran 发布时间: 2011-11-01
include <linux/fs.h>
作者: ezword 发布时间: 2011-11-01
谢谢了,找到了
作者: xjuran 发布时间: 2011-11-01
如果是研究内核的话就用source insight把内核代码加入工程,查看查找非常方便。
希望能够帮到你!
希望能够帮到你!
作者: songjinshi 发布时间: 2011-11-01
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28