Welcome! Log In Create A New Profile


Getting absolute path of a file

Posted by sajanagr 
Getting absolute path of a file
August 02, 2010 04:49AM
I am a newbie in Linux Kernel.
I am writing a code in fs/ext3/namei.c under ext3_unlink(), and that code requires to get the absoulte path of the file.

While exploring, I came across a function called d_path(), but I am not sure how to use it, esp. to pass the second parameter of vfsmount to it without "struct file *".

Any alternative ways to find the path, will also do.

Also, I explored that d_path() trucates the path, if the path is too long. Any good solutions to this ?

Your Email:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 6 plus 10?