[RTEMS Project] #2169: rename(2) does not allow destination file to exist, contravenes POSIX and RTEMS documentation
RTEMS trac
trac at rtems.org
Thu Feb 19 21:36:45 UTC 2015
#2169: rename(2) does not allow destination file to exist, contravenes POSIX and
RTEMS documentation
--------------------------+---------------------
Reporter: nick.withers | Owner: chrisj
Type: defect | Status: new
Priority: highest | Milestone: 5.0
Component: filesystem | Version: 4.11
Severity: normal | Resolution:
Keywords: |
--------------------------+---------------------
Changes (by gedare):
* milestone: 4.11 => 5.0
Old description:
> 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.
New description:
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.
--
Comment:
Committed the note in doc. Pushing milestone since there seems little
interest in fixing it for 4.11, and we should not fix it in a dot release.
--
Ticket URL: <http://devel.rtems.org/ticket/2169#comment:10>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list