From owner-cvs-all@FreeBSD.ORG Sun Dec 16 18:23:55 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534B116A468; Sun, 16 Dec 2007 18:23:55 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out-01.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id AC94913C468; Sun, 16 Dec 2007 18:23:54 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-av-01.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-01.forthnet.gr (8.13.8/8.13.8) with ESMTP id lBGHnhlw030827; Sun, 16 Dec 2007 19:49:43 +0200 Received: from MX-IN-01.forthnet.gr (mx-in-01.forthnet.gr [193.92.150.23]) by mx-av-01.forthnet.gr (8.14.1/8.14.1) with ESMTP id lBGHnh6t014838; Sun, 16 Dec 2007 19:49:43 +0200 Received: from [192.168.136.22] (ppp238-249.adsl.forthnet.gr [77.49.17.249]) by MX-IN-01.forthnet.gr (8.14.2/8.14.2) with ESMTP id lBGHnejn005302; Sun, 16 Dec 2007 19:49:41 +0200 Authentication-Results: MX-IN-01.forthnet.gr smtp.mail=dds@aueb.gr; spf=neutral Authentication-Results: MX-IN-01.forthnet.gr header.from=dds@aueb.gr; sender-id=neutral Message-ID: <47656524.4010509@aueb.gr> Date: Sun, 16 Dec 2007 19:49:24 +0200 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 MIME-Version: 1.0 To: Alexander Kabaev References: <200712161414.lBGEEV3O050572@repoman.freebsd.org> <20071216113543.2c16de3e@kan.dnsalias.net> In-Reply-To: <20071216113543.2c16de3e@kan.dnsalias.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, Diomidis Spinellis , cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/bin/mv mv.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2007 18:23:55 -0000 Alexander Kabaev wrote: > On Sun, 16 Dec 2007 14:14:31 +0000 (UTC) > Diomidis Spinellis wrote: > >> dds 2007-12-16 14:14:31 UTC >> >> FreeBSD src repository >> >> Modified files: >> bin/mv mv.c >> Log: >> When moving a directory across devices to a place where a directory >> with the same name exists, delete that directory first, before >> performing the copy. This ensures that mv(1) across devices follows >> the semantics of rename(2), as required by POSIX. >> >> This change could introduce the potential of data loss, even if the >> copy fails, violating the atomicity properties of rename(2). This >> is (mostly) mitigated by first renaming the destination and >> obliterating it only after a succesfull copy. >> >> The above logic also led to the introduction of code that will >> cleanup the results of a partial copy, if a cross-device copy fails. >> >> PR: bin/118367 >> MFC after: 1 month >> >> Revision Changes Path >> 1.47 +83 -23 src/bin/mv/mv.c >> >> http://cvsweb.FreeBSD.org/src/bin/mv/mv.c.diff?r1=1.46&r2=1.47 > > This breaks make buildworld on amd64 at least: > > > /usr/src/bin/mv/mv.c: In function 'copy': /usr/src/bin/mv/mv.c:361: > warning: variable 'rval' might be clobbered by 'longjmp' or 'vfork' > /usr/src/bin/mv/mv.c:361: warning:variable 'i' might be clobbered by > 'longjmp' or 'vfork' > Thanks - sorry - I fixed it in 1.48. -- Diomidis Spinellis