int vn_mknod (dvp, name, mode, dev, crp) struct vnode *dvp; caddr_t *name; int mode; dev_t dev; struct ucred *crp;
dvp | Points to the virtual node (v-node) for the directory to contain the new file. This v-node is held for the duration of the vn_mknod entry point. |
name | Specifies the name of a new file. |
mode | Identifies the integer mode that indicates the type of file and its permissions. |
dev | Identifies an integer device number. |
crp | Points to the cred structure. This structure contains data that applications can use to validate access permission. |
The vn_mknod entry point is invoked by the logical file system as the result of a mknod subroutine. The underlying file system is expected to create a new file in the given directory. The file type bits of the mode parameter indicate the type of file (regular, character special, or block special) to be created. If a special file is to be created, the dev parameter indicates the device number of the new special file.
The logical file system verifies that the dvp parameter does not reside in a read-only file system.
The vn_mknod 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.
The mknod 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.