lkml.org 
[lkml]   [2004]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: d_path errors
On Fri, Aug 06, 2004 at 05:23:56PM +0200, Andrea Arcangeli wrote:

> on a slightly different topic, Al, could you suggest how to hack d_path
> so that it provides an absolute path with respect to the init_task root
> directory?

Simple: you don't.
a) filesystem may be mounted more than once in init_task's namespace
b) filesystem may be not mounted there at all.
c) different subtrees of filessytem might be mounted there and
full tree might be not among them; your file might be covered by some of
them.

What you are asking for is about as feasible as "I have an unlinked file.
Show me a pathname of existing link to it". The best answer will be
along the lines of "use find(1) if you are that desperate". And if
vfsmount/dentry did *not* give you an absolute pathname, you are in
situation equivalent to that.

No way in hell it's getting shoved in d_path() and I'm very sceptical
about any code that really needs that.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.041 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site