VOP_REMOVE, VOP_RMDIR — remove a file or directory
Contents
Description
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.
Errors
[EPERM] The file is immutable.
[ENOTEMPTY] An attempt was made to remove a directory which is not empty.
Locks
Both dvp and vp should be locked on entry and remain locked on return.
Name
VOP_REMOVE, VOP_RMDIR — remove a file or directory
Return Values
Zero is returned on success, otherwise an error code is returned.
See Also
vnode(9), VOP_LOOKUP(9)
Synopsis
#include<sys/param.h>#include<sys/vnode.h>intVOP_REMOVE(structvnode*dvp, structvnode*vp, structcomponentname*cnp);
intVOP_RMDIR(structvnode*dvp, structvnode*vp, structcomponentname*cnp);
