您的位置:首页 > 运维架构 > Linux

linux内核由struct file获取filename

2015-01-08 23:15 253 查看
参考:
http://stackoverflow.com/questions/17885676/in-linux-how-can-i-get-the-filename-from-the-struct-file-structure-while-ste
获取文件名:

struct file *filp with filp->f_path.dentry->d_iname.

获取全路径:
dentry_path_raw(filp->f_path.dentry,buf,buflen)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: