VOP_REMOVE(9) remove a file or directory

Other Alias

VOP_RMDIR

SYNOPSIS

In sys/param.h In sys/vnode.h Ft int Fn VOP_REMOVE struct vnode *dvp struct vnode *vp struct componentname *cnp Ft int Fn VOP_RMDIR struct vnode *dvp struct vnode *vp struct componentname *cnp

DESCRIPTION

These entry points remove files and directories respectively.

The arguments are:

Fa dvp
The vnode of the directory.
Fa vp
The vnode of the file to be removed.
Fa cnp
Pathname information about the file.

LOCKS

Both Fa dvp and Fa 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

Bq Er EPERM
The file is immutable.
Bq Er ENOTEMPTY
An attempt was made to remove a directory which is not empty.

AUTHORS

This manual page was written by An Doug Rabson .