logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

VOP_CREATE, VOP_MKNOD, VOP_MKDIR, VOP_SYMLINK — create a file, socket, fifo, device, directory or symlink

Authors

       This manual page was written by Doug Rabson.

Debian                                            July 24, 1996                                    VOP_CREATE(9)

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_LOOKUP(9) when an object is being created.

Errors

       [ENOSPC]           The file system is full.

       [EDQUOT]           The user's file system space or inode quota would be exceeded.

History

       The function VOP_CREATE appeared in 4.3BSD.

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.

Name

       VOP_CREATE, VOP_MKNOD, VOP_MKDIR, VOP_SYMLINK — create a file, socket, fifo, device, directory or symlink

Return Values

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

See Also

vnode(9), VOP_LOOKUP(9)

Synopsis

#include<sys/param.h>#include<sys/vnode.h>#include<sys/namei.h>intVOP_CREATE(structvnode*dvp, structvnode**vpp, structcomponentname*cnp, structvattr*vap);

       intVOP_MKNOD(structvnode*dvp, structvnode**vpp, structcomponentname*cnp, structvattr*vap);

       intVOP_MKDIR(structvnode*dvp, structvnode**vpp, structcomponentname*cnp, structvattr*vap);

       intVOP_SYMLINK(structvnode*dvp,  structvnode**vpp,  structcomponentname*cnp,  structvattr*vap,
           char*target);

See Also