cvs commit: src/sys/kern vfs_syscalls.c
Matthew Dillon
dillon at apollo.backplane.com
Mon Aug 15 08:20:33 PDT 2005
:I didn't say anything different, I just used a more complex example.
:Point is that I don't see SUSv3 talking about hardlinks ("links") in
:this case. So I think Matt's change is correct and brings us (again?)
:to POSIX mandated behaviour.
:
:FWIW, Linux and OSX do this:
:
:$ touch foo
:$ ln foo bar
:$ ls -l
:total 0
:-rw-r--r-- 2 corecode users 0 Aug 15 14:02 bar
:-rw-r--r-- 2 corecode users 0 Aug 15 14:02 foo
:$ mv foo bar
:$ ls -l
:total 0
:-rw-r--r-- 1 corecode users 0 Aug 15 14:02 bar
:
:cheers
: simon
I suppose the terminology in the standard could be interpreted that
way. When they say 'same existing file', and not mention hardlinks
explicitly, they could very well simply be meaning the same file from
the point of view of the namespace, rather then the same inode.
In fact, the more I think about it the more I think they would have
said 'hardlink' or 'to the same inode' explicitly if they really meant
for rename("a", "b") where "a" is a hardlink to "b" to fail.
In anycase, we are doing the right thing.
-Matt
More information about the Commits
mailing list