From owner-cvs-all Tue Sep 10 6:14:30 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2114137B400; Tue, 10 Sep 2002 06:14:23 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id A290243E4A; Tue, 10 Sep 2002 06:14:21 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id XAA04432; Tue, 10 Sep 2002 23:14:19 +1000 Date: Tue, 10 Sep 2002 23:22:03 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Eivind Eklund Cc: Bruce Evans , , Subject: Re: cvs commit: src/sys/kern vfs_syscalls.c src/sys/gnu/ext2fs ext2_vnops.c src/sys/ufs/ufs ufs_vnops.c In-Reply-To: <20020910124618.GC86704@phoenix.dmnstech.net> Message-ID: <20020910230114.K1753-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 10 Sep 2002, Eivind Eklund wrote: > On Tue, Sep 10, 2002 at 04:09:13AM -0700, Bruce Evans wrote: > > bde 2002/09/10 04:09:13 PDT > > > > Modified files: > > sys/kern vfs_syscalls.c > > sys/gnu/ext2fs ext2_vnops.c > > sys/ufs/ufs ufs_vnops.c > > Log: > > vfs_syscalls.c: > > Changed rename(2) to follow the letter of the POSIX spec. POSIX > > requires rename() to have no effect if its args "resolve to the same > > existing file". I think "file" can only reasonably be read as referring > > to the inode, although the rationale and "resolve" seem to say that > > sameness is at the level of (resolved) directory entries. > > This seems to be wrong semantics to me - as far as I can tell, you've just > made the mv in the following case pass through without any change: > touch a > ln a b > mv a b > ... which would normally result in you just having the link 'b' to the file > originally named 'a', but you are silently leaving 'a' and 'b'. Yes, POSIX seems to require leaving 'a' alone here. I used essentially this to test recent changes. > The POSIX interpretation would seem to prohibit the mv in > mkdir d > touch d/a > ln -s d d2 > mv d2/a d/a > from having any effect, which makes way more sense to me. This also seems to > be what the old code did. Er, this case shouldn't work. I think it didn't. d2/a and d/a are the same directory entry here. Perhaps you meant: mkdir d d2 touch d/a ln d/a d2/a2 mv d2/a2 d/a POSIX seems to require leaving d2/a2 alone here. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message