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

vn_mkdir Entry Point

Purpose

Creates a directory.

Syntax

int vn_mkdir (dp, name, mode, crp)
struct vnode *dp;
caddr_t name;
int mode;
struct ucred *crp;

Parameters

dp Points to the virtual node (v-node) of the parent directory of a new directory. This v-node is held for the duration of the entry point.
name Specifies the name of a new directory.
mode Specifies the permission modes of a new directory.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vn_mkdir entry point is invoked by the logical file system as the result of the mkdir subroutine. The vn_mkdir entry point is expected to create the named directory in the parent directory associated with the dp parameter. The logical file system ensures that the dp parameter does not reside on a read-only file system.

Execution Environment

The vn_mkdir 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

The mkdir subroutine.

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 ]