How to get the dentry value - no path_lookup

Rohan Puri rohan.puri15 at gmail.com
Mon Sep 7 14:33:33 EDT 2015


On 7 Sep 2015 23:25, <Valdis.Kletnieks at vt.edu> wrote:
>
> On Mon, 07 Sep 2015 12:10:56 +0530, Pria Mn said:
>
> > return valid dentry value. My requirement is to fetch directory name
from
> > filepath.
>
> First off, unless this is a class assignment, your *requirement* isn't
> to fetch a directory name.
>
> Fetching the directory name is a *solution* you're thinking of using for
> a problem you're trying to solve.
>
> So take a step back, and explain what you're trying to do, and why you
thought
> getting the directory name from filepath was a solution - it's quite
> likely that you should be using some other API and approach entirely.
>
> (I'd estimate that 75% of the "I can't get this API to work" questions
> on the Linux kernel are because the person should be using a different
API....)
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

Yes Valdis is absolutely right about being clear as to what you want to do
and why you would be doing that. Also for what does the api do you need to
understand the code and browse using tools(cscope ctags maybe others) to
check for other APIs doing the same and you would definitely find one for
your need.

The way I would suggest is don't rush through, enjoy the process and not
the result.

Enjoy life,
Rohan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150908/03eed909/attachment.html 


More information about the Kernelnewbies mailing list