SYNOPSIS
In sys/param.h In sys/vnode.h Ft int Fn VOP_VPTOCNP struct vnode *vp struct vnode **dvp char *buf int *buflenDESCRIPTION
This translates a vnode into its component name, and writes that name to the head of the buffer specified by Fa buf .- Fa vp
- The vnode to translate.
- Fa dvp
- The vnode of the parent directory of Fa vp .
- Fa buf
- The buffer into which to prepend the component name.
- Fa buflen
- The remaining size of the buffer.
The default implementation of scans through Fa vp Ns 's parent directory looking for a dirent with a matching file number. If Fa vp is not a directory, then returns ENOENT.
LOCKS
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 use count incremented.RETURN VALUES
Zero is returned on success, otherwise an error code is returned.ERRORS
- Bq Er ENOMEM
- The buffer was not large enough to hold the vnode's component name.
- Bq Er ENOENT
- The vnode was not found on the file system.
NOTES
This interface is a work in progress.HISTORY
The function appeared in Fx 8.0 .AUTHORS
This manual page was written by An Joe Marcus Clarke .