working with vn_fullpath
Andrew Sporner
asporner at yahoo.com
Sun Jun 27 10:09:11 PDT 2004
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?
Here is an example of what failed for me:
(part of kern_unlink in vfs_syscalls.c ---not complete---)
. ...
VOP_LEASE(vp, td, p->p_ucred, LEASE_WRITE);
vn_lock(vp, NULL, LK_EXCLUSIVE | LK_RETRY, td);
if (vn_fullpath(td->td_proc, vp, &fullpath, &freepath) == 0) {
printf ("got path %s\n", fullpath);
}
free(freepath, M_TEMP);
,,,,,
Any hints would be appreciated!
Many thanks in advance
Andy
<
More information about the Kernel
mailing list