How to get the dentry value - no path_lookup

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Mon Sep 7 13:55:35 EDT 2015


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....)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150907/b273d32a/attachment.bin 


More information about the Kernelnewbies mailing list