[Bug 2169] New: rename(2) does not allow destination file to exist, contravenes POSIX and RTEMS documentation

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Jan 20 07:08:40 UTC 2014


https://www.rtems.org/bugzilla/show_bug.cgi?id=2169

             Bug #: 2169
           Summary: rename(2) does not allow destination file to exist,
                    contravenes POSIX and RTEMS documentation
    Classification: Unclassified
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: filesystem
        AssignedTo: chrisj at rtems.org
        ReportedBy: nick.withers at anu.edu.au


The rename(2) call is required by POSIX to allow the destination file to
already exist: "If the link named by the new argument exists, it shall be
removed and old renamed to new" (
http://pubs.opengroup.org/onlinepubs/009695399/functions/rename.html ).

RTEMS documentation at
http://rtems.org/onlinedocs/doc-current/share/rtems/html/posix_users/Files-and-Directories-Manager-rename-_002d-Renames-a-file.html
suggests this is implemented: "If a file already exists by the name new, it is
removed", but also reserves error code EEXIST "The named file already exists".

Testing with a rename of a file (on JFFS2) failed with EEXIST.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list