Re: ext2fs problem with rename() system call

Tom Eastep (eastep@loc1.tandem.com)
Thu, 07 Jan 1999 16:03:30 +0000


Jamie Lokier wrote:
>
> There is a problem with the rename() system call in 2.1.131 on ext2fs.
>
> 1. The problem is that if source and destination are the same file, it
> returns zero ("success") but does not remove the source file. It
> should remove the source file.
>

No, it shouldn't - From POSIX.1, section 5.5.3.2:

"If the _old_ argument and the _new_ argument both refer to links
to the same existing file, the rename() function shall return
successfully and perform no other action."

-Tom

-- 
Tom Eastep
Compaq Computer Corporation
Enterprise Computing Group
Tandem Division
tom.eastep@compaq.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/