Manpage of 'VOP_RMDIR' on UHLU - BSD System Documentation,
Programming Reference, Manual Pages and Source Code
All manual pages         All RFC pages
Common page
for VOP_RMDIR
Other pages
for VOP_RMDIR
More pages
containing VOP_RMDIR

Section 9 manual page or howto for 'VOP_RMDIR'  

VOP_REMOVE(9)	       FreeBSD Kernel Developer's Manual	 VOP_REMOVE(9)

NAME
     VOP_REMOVE, VOP_RMDIR -- remove a file or directory

SYNOPSIS
     #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);

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.

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.

PSEUDOCODE
     int
     vop_remove(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
     {

	 int error = 0;

	 if (vp is immutable) {
	     error = EPERM;
	     goto out;

	 }

	 /*
	  * Remove name cnp->cn_nameptr from directory and update link count
	  * of vp.
	  */

	 ...;

	 return error;
     }

ERRORS
     [EPERM]		The file is immutable.

     [ENOTEMPTY]	An attempt was made to remove a directory which is not

			empty.

SEE ALSO
     vnode(9), VOP_LOOKUP(9)

AUTHORS
     This manual page was written by Doug Rabson.

FreeBSD 7.2			 July 24, 1996			   FreeBSD 7.2

NAME - SYNOPSIS - DESCRIPTION - LOCKS - RETURN VALUES - PSEUDOCODE - 
ERRORS - SEE ALSO - AUTHORS -  
All manual pages         All RFC pages
Common page
for VOP_RMDIR
Other pages
for VOP_RMDIR
More pages
containing VOP_RMDIR
A random manual page         All manual pages        All RFC pages