From owner-freebsd-fs Mon Jul 22 12:28:45 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDCD137B400 for ; Mon, 22 Jul 2002 12:28:42 -0700 (PDT) Received: from laptop.tenebras.com (laptop.tenebras.com [66.92.188.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 6214A43E67 for ; Mon, 22 Jul 2002 12:28:42 -0700 (PDT) (envelope-from kudzu@tenebras.com) Received: (qmail 71793 invoked from network); 22 Jul 2002 19:28:40 -0000 Received: from sapphire.tenebras.com (HELO tenebras.com) (66.92.188.241) by 0 with SMTP; 22 Jul 2002 19:28:40 -0000 Message-ID: <3D3C5CE8.6090607@tenebras.com> Date: Mon, 22 Jul 2002 12:28:40 -0700 From: Michael Sierchio User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020717 X-Accept-Language: en-us, en, fr-fr, ru MIME-Version: 1.0 To: Alfred Perlstein Cc: fs@freebsd.org Subject: Re: rename hardlinks "works" on FreeBSD, but no-op on others References: <20020722191522.GA77219@elvis.mu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Alfred Perlstein wrote: > What gives? > > It seems that we do the right thing, however: > > 1) are we standards compliant? > 2) just for curiousity, why would others silently fail? We aren't compliant with the Single UNIX Specification, which says that mv is equivalent to invoking rename(), and the man page for rename sez If the old argument and the new argument both refer to, and both link to the same existing file, rename() returns successfully and performs no other action. The FreeBSD man page claims POSIX.2 compliance for mv, but I don't recall whether POSIX addresses mv directly. Obviously you'd only have this happen for files on the same filesystem, since rename(2) doesn't work otherwise. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message