Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jun 2003 18:14:56 +0400
From:      Yar Tikhiy <yar@freebsd.org>
To:        arch@freebsd.org
Subject:   VOP_RENAME(9) arguments question
Message-ID:  <20030623141456.GA79865@comp.chem.msu.su>

next in thread | raw e-mail | index | archive | help
Hi there,

I've seen code in the VOP_RENAME() vop implementations handling
various cases of some of fvp, fdvp, tvp, and tdvp being different,
or the same, or NULL.  Some of such cases seem clear to me:

tvp == NULL	-- the destination file doesn't exist yet
tdvp == fdvp	-- renaming within the same directory
tvp == fvp	-- source and destination are hardlinks to the same file

But what does mean the case of "tvp == tdvp"?  I guess this can be
true only if renaming to the root directory, which will fail, yet
is a special case for unlocking tvp and tdvp.

Can there be other special cases of arguments to VOP_RENAME(9)
a developer should be aware of?

-- 
Yar



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030623141456.GA79865>