svn commit: r335489 - head/lib/libc/sys
Ian Lepore
ian at FreeBSD.org
Thu Jun 21 15:21:18 UTC 2018
Author: ian
Date: Thu Jun 21 15:21:17 2018
New Revision: 335489
URL: https://svnweb.freebsd.org/changeset/base/335489
Log:
Add some words clarifying that rename(2) does nothing when the 'from' and
'to' args are the same file. Wording borrowed from POSIX.1-2017, but
the freebsd code to implement this behavior was added in 2002 (r103180).
Modified:
head/lib/libc/sys/rename.2
Modified: head/lib/libc/sys/rename.2
==============================================================================
--- head/lib/libc/sys/rename.2 Thu Jun 21 15:11:14 2018 (r335488)
+++ head/lib/libc/sys/rename.2 Thu Jun 21 15:21:17 2018 (r335489)
@@ -28,7 +28,7 @@
.\" @(#)rename.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd September 15, 2017
+.Dd June 21, 2018
.Dt RENAME 2
.Os
.Sh NAME
@@ -75,6 +75,15 @@ If the final component of
is a symbolic link,
the symbolic link is renamed,
not the file or directory to which it points.
+.Pp
+If
+.Fa from
+and
+.Fa to
+resolve to the same directory entry, or to different directory
+entries for the same existing file,
+.Fn rename
+returns success without taking any further action.
.Pp
The
.Fn renameat
More information about the svn-src-all
mailing list