VOP_MKDIR (9)
Leading comments
Copyright (c) 1996 Doug Rabson All rights reserved. This program is free software. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in...
NAME
VOP_CREATE VOP_MKNOD VOP_MKDIR VOP_SYMLINK - create a file, socket, fifo, device, directory or symlinkSYNOPSIS
In sys/param.h In sys/vnode.h In sys/namei.h Ft int Fn VOP_CREATE struct vnode *dvp struct vnode **vpp struct componentname *cnp struct vattr *vap Ft int Fn VOP_MKNOD struct vnode *dvp struct vnode **vpp struct componentname *cnp struct vattr *vap Ft int Fn VOP_MKDIR struct vnode *dvp struct vnode **vpp struct componentname *cnp struct vattr *vap Ft int Fn VOP_SYMLINK struct vnode *dvp struct vnode **vpp struct componentname *cnp struct vattr *vap char *targetDESCRIPTION
These entry points create a new file, socket, fifo, device, directory or symlink in a given directory.The arguments are:
- Fa dvp
- The locked vnode of the directory.
- Fa vpp
- The address of a variable where the resulting locked vnode should be stored.
- Fa cnp
- The pathname component created.
- Fa vap
- The attributes that the new object should be created with.
- Fa target
- The pathname of the target of the symlink.
These entry points are called after VOP_LOOKUP9 when an object is being created.
LOCKS
The directory, Fa 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 Fa *vpp and zero is returned. Otherwise, an appropriate error is returned.ERRORS
- Bq Er ENOSPC
- The file system is full.
- Bq Er EDQUOT
- The user's file system space or inode quota would be exceeded.