http://ilinuxkernel.com/?p=2028
在Linux内核空间中,如何获取读写的文件名?
How to get read/write filename in linux kernel space?
如ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)中如何获取读写的文件名?
答案:
file->f_path.dentry->d_iname
http://ilinuxkernel.com/?p=2028
在Linux内核空间中,如何获取读写的文件名?
How to get read/write filename in linux kernel space?
如ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)中如何获取读写的文件名?
答案:
file->f_path.dentry->d_iname