Provided by: freebsd-manpages_8.2-1_all
VOP_VPTOCNP — translate a vnode to its component name
VOP_VPTOCNP(struct vnode *vp, struct vnode **dvp, char *buf,
This translates a vnode into its component name, and writes that name to
the head of the buffer specified by buf
vp The vnode to translate.
dvp The vnode of the parent directory of vp.
buf The buffer into which to preprend the component name.
buflen The remaining size of the buffer.
The default implementation of VOP_VPTOCNP scans through vp's parent
directory looking for a dirent with a matching file number. If vp is not
a directory, then VOP_VPTOCNP returns ENOENT.
The vnode should be locked on entry and will still be locked on exit.
The parent directory vnode will be unlocked on a successful exit.
However, it will have its hold count incremented.
Zero is returned on success, otherwise an error code is returned.
[ENOMEM] The buffer was not large enough to hold the vnode's
[ENOENT] The vnode was not found on the file system.
This interface is a work in progress.
The function VOP_VPTOCNP appeared in FreeBSD 8.0.
This manual page was written by Joe Marcus Clarke.