VOP_REMOVE9
Remove a file or directory
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
83 releases since FreeBSD 2.2.2-RELEASE; the text changed 41 times.