VOP_RMDIR9freebsd
Remove a file or directory
Part of VOP_REMOVE(9freebsd).
Usage
#include <sys/param.h>
#include <sys/vnode.h>
int
VOP_REMOVE(struct vnode *dvp, struct vnode *vp, struct componentname *cnp);
int
VOP_RMDIR(struct vnode *dvp, struct vnode *vp, struct componentname *cnp);
Overview
These entry points remove files and directories respectively.
The arguments are:
- dvp
-
The vnode of the directory.
- vp
-
The vnode of the file to be removed.
- cnp
-
Pathname information about the file.
Locks
Both dvp and vp should be locked on entry and remain locked on return.
Return values
Zero is returned on success, otherwise an error code is returned.
Errors
- [EPERM]
-
The file is immutable.
- [ENOTEMPTY]
-
An attempt was made to remove a directory which is not empty.
Releases
9 releases since Debian 5.0 (Lenny); the text changed 6 times.