|VOP_VPTOCNP(9)||FreeBSD Kernel Developer's Manual||VOP_VPTOCNP(9)|
NAMEVOP_VPTOCNP — translate a vnode to its component name
SYNOPSIS#include < sys/param.h>
#include < sys/vnode.h>
VOP_VPTOCNP( struct vnode *vp, struct vnode **dvp, char *buf, int *buflen);
DESCRIPTIONThis translates a vnode into its component name, and writes that name to the head of the buffer specified by buf.
- The vnode to translate.
- The vnode of the parent directory of vp.
- The buffer into which to prepend the component name.
- 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.
LOCKSThe 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 use count incremented.
RETURN VALUESZero is returned on success, otherwise an error code is returned.
- [ ENOMEM]
- The buffer was not large enough to hold the vnode's component name.
- [ ENOENT]
- The vnode was not found on the file system.
NOTESThis interface is a work in progress.
HISTORYThe function VOP_VPTOCNP appeared in FreeBSD 8.0.
AUTHORSThis manual page was written by .
|November 19, 2011||FreeBSD|