Requests a hard link to a file.
int vn_link (vp, dp, name, crp) struct vnode *vp; struct vnode *dp; caddr_t *name; struct ucred *crp;
vp | Points to the virtual node (v-node) to link to. This v-node is held for the duration of the linking process. |
dp | Points to the v-node for the directory in which the link is created. This v-node is held for the duration of the linking process. |
name | Identifies the new name of the entry. |
crp | Points to the cred structure. This structure contains data that the file system can use to validate access permission. |
The vn_link entry point is invoked to create a new hard link to an existing file as part of the link subroutine. The logical file system ensures that the dp and vp parameters reside in the same virtual file system, which is not read-only.
The vn_link entry point can be called from the process environment only.
0 | Indicates success. |
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.
Virtual File System Overview, Virtual File System Kernel Extensions Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes) in AIX Kernel Extensions and Device Support Programming Concepts.
List of Virtual File System Operations.