cvs commit: src/sys/kern vfs_syscalls.c
Xin LI
delphij at frontfree.net
Mon Aug 15 03:12:06 PDT 2005
å¨ 2005-08-15ä¸ç 00:26 -0700ï¼Matthew Dillonåéï¼
> dillon 2005/08/15 00:26:47 PDT
>
> DragonFly src repository
>
> Modified files:
> sys/kern vfs_syscalls.c
> Log:
> UFS sometimes reports: 'ufs_rename: fvp == tvp (can't happen)'. The case
> is not supposed to be able to happen, and UFS ignores the rename operation
> when it sees it. This is true in both FreeBSD and DragonFly.
>
> But, in fact, the case CAN happen if you rename a file to another that
> happens to be a hardlink to the first. The rename operations appears to
The FreeBSD behavior was intentional. I think this change violates
POSIX, which states:
"If the old argument and the new argument resolve to the same existing
file, rename() shall return successfully and perform no other action."
(See http://www.opengroup.org/onlinepubs/009695399/functions/rename.html
for reference. This could be found from the third paragraph of the
DESCRIPTION section)
I am not sure why POSIX requires this feature, though :-) What do you
think about it?
Cheers,
--
Xin LI <delphij delphij net> http://www.delphij.net/
Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00015.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/commits/attachments/20050815/534f8430/attachment-0022.obj>
More information about the Commits
mailing list