DragonFly kernel List (threaded) for 2004-06
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: working with vn_fullpath
Andrew Sporner wrote:
Hi,
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
function.
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
sys/emulation/linux/i386
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:
http://leaf.dragonflybsd.org/cgi/web-man?vn_fullpath+9
Hope that answers your queries; otherwise, please do not
hesitate to ask more questions if any! :-)
-Hiten
hmp@xxxxxxxxxxxxx
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]