From owner-cvs-all@FreeBSD.ORG Sun Dec 16 16:35:52 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 03BCA16A419 for ; Sun, 16 Dec 2007 16:35:52 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7BAEB13C448 for ; Sun, 16 Dec 2007 16:35:51 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1716942rvb.43 for ; Sun, 16 Dec 2007 08:35:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=9KsPpZmJ8jLdWGRuR8654zcoCWIGB1+aLyOlLFOR4ps=; b=ZNzZ/oySjugIWjoQFhhHbHuPZQehu2aqV177G3wq7dJuDDK49SGtjNs54hQRRXu8diP6nix5p+UqLuHQB3BdP6WJBJZuoZfqGg7TO8JK0tvzyLCXL+eH2Eafay8kRv0x1/4QL5pjXFmjIyrOap43rH7s3V7aPgmwL4sqYPRYNfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=PXwNQ8kg+rmEbvHNeLdixOnaWwT9F74EkxdTvsIsGwctx6+ObocxRDXCrpJ/SQIfOi5cVwbtkOUp6AzGmOqpt28H8+OogkH95/5nKXuHTLYxT9ml2fwOZ5jI8UNMc9IOUctCWg73xt5c6SKAB6JKjCxkTtmBN47Ima+wSA/BXFM= Received: by 10.142.171.6 with SMTP id t6mr484776wfe.126.1197822951151; Sun, 16 Dec 2007 08:35:51 -0800 (PST) Received: from kan.dnsalias.net ( [24.218.183.247]) by mx.google.com with ESMTPS id h19sm6710859wxd.2007.12.16.08.35.49 (version=SSLv3 cipher=OTHER); Sun, 16 Dec 2007 08:35:50 -0800 (PST) Date: Sun, 16 Dec 2007 11:35:43 -0500 From: Alexander Kabaev To: Diomidis Spinellis Message-ID: <20071216113543.2c16de3e@kan.dnsalias.net> In-Reply-To: <200712161414.lBGEEV3O050572@repoman.freebsd.org> References: <200712161414.lBGEEV3O050572@repoman.freebsd.org> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/HG.+BC44WnNQ_BOv65=uDuU"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, 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 16:35:52 -0000 --Sig_/HG.+BC44WnNQ_BOv65=uDuU Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 16 Dec 2007 14:14:31 +0000 (UTC) Diomidis Spinellis wrote: > dds 2007-12-16 14:14:31 UTC >=20 > FreeBSD src repository >=20 > Modified files: > bin/mv mv.c=20 > 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. > =20 > 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. > =20 > 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. > =20 > PR: bin/118367 > MFC after: 1 month > =20 > Revision Changes Path > 1.47 +83 -23 src/bin/mv/mv.c >=20 > http://cvsweb.FreeBSD.org/src/bin/mv/mv.c.diff?r1=3D1.46&r2=3D1.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' --=20 Alexander Kabaev --Sig_/HG.+BC44WnNQ_BOv65=uDuU Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHZVPfQ6z1jMm+XZYRAmT/AJoDgxLME2TUqy/9iwVXZ2CsAAPaKACeIphH wnKRwo2NItEmEVRjiXKS94k= =poSF -----END PGP SIGNATURE----- --Sig_/HG.+BC44WnNQ_BOv65=uDuU--