DragonFly kernel List (threaded) for 2004-06
Re: working with vn_fullpath
Andrew Sporner wrote:
I am porting my VFS filesystem event stuff to dragonfly
and getting rid of some old workarounds.
I need to convert a vnode to it's pathname and I thought
logically that vn_fullpath() would be the right solution.
Unfortunately it fails with ENOENT.
Are there any specific rules to using this function?
When I restructured it from textvp_fullpath to vn_fullpath(),
I also added a manual page to how vn_fullpath is supposed to
Also, look at sys/kern/imgact_resident.c for more information
on how this function is used, the procfs and linprocfs code
too, which resides in sys/vfs/procfs and
Basically, the one rule to keep in mind is that the vn_fullpath
can only construct a pathname if *all* its namecache components
are available, otherwise it returns ENOENT, naturally meaning
it can't find one of the components.
Here is a link to the web manual page:
Hope that answers your queries; otherwise, please do not
hesitate to ask more questions if any! :-)