Hi Rohan,
#if(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
err= kern_path_parent(tmp,nd);
#else
err= path_lookup(tmp, 0, nd);
#endif
Now that "nameidata" structure is not exposed with kernel version >= 3.6.0
I used kern_path_create() which is returning invalid dentry value.
dentry =kern_path_create(AT_FDCWD, tmp, path, 1);
So, I tried using : user_path_at() , kern_path() which are not helping me.
How to fetch 'dentry' data from file name ?
On Mon, Sep 7, 2015 at 12:45 PM, Rohan Puri <rohan.puri15@xxxxxxxxx> wrote:
On Mon, Sep 7, 2015 at 12:10 PM, Pria Mn <pria.mn9@xxxxxxxxx> wrote:_______________________________________________Hi,
I happened to come across the below discussion.
http://lists.kernelnewbies.org/pipermail/kernelnewbies/2012-August/005914.html
I am having a similar issue.
I am using Rhel7-3.10.0-123
kernel. I tried all the options that are mentioned above and none of the api's
including kern_path()
return valid dentry value. My requirement is to fetch directory name from filepath.
Can anybody suggest a work-around for this ?
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Pria,This is in regards with which kernel version? also what are you trying to do, please be more detailed.Enjoy life,Rohan
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies