[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vn_link Entry Point

Purpose

Requests a hard link to a file.

Syntax

int vn_link (vp, dp, name, crp)
struct vnode *vp;
struct vnode *dp;
caddr_t *name;
struct ucred *crp;

Parameters

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.

Description

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.

Execution Environment

The vn_link entry point can be called from the process environment only.

Return Values

0 Indicates success.

Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.

Related Information

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.


[ Previous | Next | Contents | Home | Search ]