From owner-svn-src-head@freebsd.org Thu Jun 21 15:21:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A8051021CF4; Thu, 21 Jun 2018 15:21:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1839D811F1; Thu, 21 Jun 2018 15:21:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED8F813746; Thu, 21 Jun 2018 15:21:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5LFLHp9069328; Thu, 21 Jun 2018 15:21:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5LFLHNH069327; Thu, 21 Jun 2018 15:21:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201806211521.w5LFLHNH069327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 21 Jun 2018 15:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335489 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 335489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 15:21:18 -0000 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