DragonFly On-Line Manual Pages

Search: Section:  


VOP_OLD_RENAME(9)     DragonFly Kernel Developer's Manual    VOP_OLD_RENAME(9)

NAME

VOP_OLD_RENAME -- rename a file

SYNOPSIS

#include <sys/param.h> #include <sys/vnode.h> int VOP_OLD_RENAME(struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp, struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp);

DESCRIPTION

This renames a file and possibly changes its parent directory. If the destination object exists, it will be removed first. Its arguments are: fdvp the vnode of the old parent directory fvp the vnode of the file to be renamed fcnp pathname information about the file's current name tdvp the vnode of the new parent directory tvp the vnode of the target file (if it exists) tcnp pathname information about the file's new name

LOCKS

The source directory and file are unlocked but are expected to have their ref count bumped on entry. The VOP routine is expected to vrele() both prior to returning. The destination directory and file are locked as well as having their ref count bumped. The VOP routine is expected to vput() both prior to returning.

ERRORS

[EPERM] the file is immutable [EXDEV] cross device move [EINVAL] illegal directory rename [ENOTDIR] attempt to rename a directory to a file or vice versa [ENOTEMPTY] attempt to remove a directory which is not empty

SEE ALSO

vnode(9)

AUTHORS

This man page was written by Doug Rabson. DragonFly 3.9 October 13, 2014 DragonFly 3.9

Search: Section: