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_LINK — create a new name for a file

Authors

       This manual page was originally written by Doug Rabson.

Debian                                            July 24, 1996                                      VOP_LINK(9)

Description

       This links a new name in the specified directory to an existing file.

       Its arguments are:

       dvp       The vnode of the directory.

       vp        The vnode of the file to be linked.

       cnp       Pathname information about the file.

       The  pathname  info  should  not be released on exit because it is done by the caller.  The directory and
       file vnodes should not be released on exit.

Errors

       [EMLINK]           The file has too many links.

       [EPERM]            The file is immutable.

       [EXDEV]            A hard link is not possible between different file systems.

Locks

VOP_LINK() expects the directory and file vnodes to be locked on entry and will leave the  vnodes  locked
       on return.

Name

       VOP_LINK — create a new name for a file

Return Values

       Zero is returned if the file was linked successfully, otherwise an error is returned.

See Also

vn_lock(9), vnode(9)

Synopsis

#include<sys/param.h>#include<sys/vnode.h>intVOP_LINK(structvnode*dvp, structvnode*vp, structcomponentname*cnp);

See Also