DragonFly On-Line Manual Pages

Search: Section:  


VOP_OLD_CREATE(9)     DragonFly Kernel Developer's Manual    VOP_OLD_CREATE(9)

NAME

VOP_OLD_CREATE, VOP_OLD_MKNOD, VOP_OLD_MKDIR, VOP_OLD_SYMLINK -- create a file, socket, fifo, device, directory or symlink

SYNOPSIS

#include <sys/param.h> #include <sys/vnode.h> #include <sys/namei.h> int VOP_OLD_CREATE(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap); int VOP_OLD_MKNOD(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap); int VOP_OLD_MKDIR(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap); int VOP_OLD_SYMLINK(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap, char *target);

DESCRIPTION

These entry points create a new file, socket, fifo, device, directory or symlink in a given directory. The arguments are: dvp the locked vnode of the directory vpp the address of a variable where the resulting locked vnode should be stored cnp the pathname component created vap the attributes that the new object should be created with target the pathname of the target of the symlink These entry points are called after VOP_OLD_LOOKUP(9) when an object is being created. If an error is detected when creating the file, then this memory will be freed. If the file is created successfully, then it will be freed.

LOCKS

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.

RETURN VALUES

If successful, the vnode for the new object is placed in *vpp and zero is returned. Otherwise, an appropriate error is returned.

ERRORS

[ENOSPC] The filesystem is full. [EDQUOT] Quota exceeded.

SEE ALSO

vnode(9), VOP_OLD_LOOKUP(9)

HISTORY

The function VOP_OLD_CREATE appeared in 4.3BSD.

AUTHORS

This man page was written by Doug Rabson. DragonFly 3.9 October 13, 2014 DragonFly 3.9

Search: Section: