VOP_CREATE(9) | Kernel Developer's Manual | VOP_CREATE(9) |
VOP_CREATE
,
VOP_MKNOD
, VOP_MKDIR
,
VOP_SYMLINK
— create a file,
socket, fifo, device, directory or symlink
#include
<sys/param.h>
#include <sys/vnode.h>
#include <sys/namei.h>
int
VOP_CREATE
(struct
vnode *dvp, struct vnode
**vpp, struct
componentname *cnp,
struct vattr *vap);
int
VOP_MKNOD
(struct
vnode *dvp, struct vnode
**vpp, struct
componentname *cnp,
struct vattr *vap);
int
VOP_MKDIR
(struct
vnode *dvp, struct vnode
**vpp, struct
componentname *cnp,
struct vattr *vap);
int
VOP_SYMLINK
(struct
vnode *dvp, struct vnode
**vpp, struct
componentname *cnp,
struct vattr *vap,
char *target);
These entry points create a new file, socket, fifo, device, directory or symlink in a given directory.
The arguments are:
These entry points are called after VOP_LOOKUP(9) when an object is being created.
The directory, dvp will be locked on entry and must remain locked on return. If the call is successful, the new object will be returned locked.
If successful, the vnode for the new object is placed in *vpp and zero is returned. Otherwise, an appropriate error is returned.
The function VOP_CREATE
appeared in
4.3BSD.
This manual page was written by Doug Rabson.
July 24, 1996 | Debian |