VOP_LINK(9FREEBSD) - man page online | system kernel interfaces
Create a new name for a file.
July 24, 1996
VOP_LINK(9) BSD Kernel Developer's Manual VOP_LINK(9)
NAMEVOP_LINK — create a new name for a file
SYNOPSIS#include <sys/param.h> #include <sys/vnode.h> int VOP_LINK(struct vnode *dvp, struct vnode *vp, struct componentname *cnp);
DESCRIPTIONThis 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.
LOCKSVOP_LINK() expects the directory and file vnodes to be locked on entry and will leave the vnodes locked on return.
RETURN VALUESZero is returned if the file was linked successfully, otherwise an error is returned.
ERRORS[EMLINK] The file has too many links. [EPERM] The file is immutable. [EXDEV] A hard link is not possible between different file systems.
SEE ALSOvn_lock(9), vnode(9)
BSD July 24, 1996 BSD
AUTHORSThis manual page was originally written by Doug Rabson.
|This manual||Reference||Other manuals|
|refer to||vn_lock(9freebsd) | vnode(9freebsd)|