logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

VOP_VPTOCNP — translate a vnode to its component name

Authors

       This manual page was written by Joe Marcus Clarke.

Debian                                            March 8, 2015                                   VOP_VPTOCNP(9)

Description

       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.

       cred    The caller credentials.

       buf     The buffer into which to prepend 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.

Errors

       [ENOMEM]           The buffer was not large enough to hold the vnode's component name.

       [ENOENT]           The vnode was not found on the file system.

History

       The function VOP_VPTOCNP appeared in FreeBSD 8.0.

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.

Name

       VOP_VPTOCNP — translate a vnode to its component name

Notes

       This interface is a work in progress.

Return Values

       Zero is returned on success, otherwise an error code is returned.

See Also

vnode(9), VOP_LOOKUP(9)

Synopsis

#include<sys/param.h>#include<sys/ucred.h>#include<sys/vnode.h>intVOP_VPTOCNP(structvnode*vp, structvnode**dvp, structucred*cred, char*buf, int*buflen);

See Also