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...
NAMEVOP_REMOVE VOP_RMDIR - remove a file or directory
SYNOPSISIn 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
DESCRIPTIONThese 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.
LOCKSBoth Fa dvp and Fa vp should be locked on entry and remain locked on return.
RETURN VALUESZero is returned on success, otherwise an error code is returned.
- Bq Er EPERM
- The file is immutable.
- Bq Er ENOTEMPTY
- An attempt was made to remove a directory which is not empty.