Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2002 14:46:18 +0200
From:      Eivind Eklund <eivind@FreeBSD.org>
To:        Bruce Evans <bde@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern vfs_syscalls.c src/sys/gnu/ext2fs ext2_vnops.c src/sys/ufs/ufs ufs_vnops.c
Message-ID:  <20020910124618.GC86704@phoenix.dmnstech.net>
In-Reply-To: <200209101109.g8AB9EBh016754@freefall.freebsd.org>
References:  <200209101109.g8AB9EBh016754@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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'.

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.

Eivind.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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