VOP_REMOVE (9)
Leading comments
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...
NAME
VOP_REMOVE VOP_RMDIR - remove a file or directorySYNOPSIS
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 *cnpDESCRIPTION
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.