Date: Wed, 4 Jul 2018 13:57:49 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335947 - stable/11/lib/libc/sys Message-ID: <201807041357.w64DvnF8018574@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Wed Jul 4 13:57:49 2018 New Revision: 335947 URL: https://svnweb.freebsd.org/changeset/base/335947 Log: MFC r335489: 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: stable/11/lib/libc/sys/rename.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/rename.2 ============================================================================== --- stable/11/lib/libc/sys/rename.2 Wed Jul 4 13:56:01 2018 (r335946) +++ stable/11/lib/libc/sys/rename.2 Wed Jul 4 13:57:49 2018 (r335947) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807041357.w64DvnF8018574>