Requests a hard link to a file.
Item | Description |
---|---|
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 vnop_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 vnop_link entry point can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates success. |
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.