From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwYrL-00055n-DD for qemu-devel@nongnu.org; Wed, 01 Aug 2012 09:21:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwYrK-0007y1-7q for qemu-devel@nongnu.org; Wed, 01 Aug 2012 09:21:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwYrJ-0007xu-VZ for qemu-devel@nongnu.org; Wed, 01 Aug 2012 09:21:06 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q71DL5Sg014592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Aug 2012 09:21:05 -0400 Message-ID: <50192D3F.7010303@redhat.com> Date: Wed, 01 Aug 2012 07:21:03 -0600 From: Eric Blake MIME-Version: 1.0 References: <490157254.6767622.1343815423950.JavaMail.root@redhat.com> In-Reply-To: <490157254.6767622.1343815423950.JavaMail.root@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig4231984084DAFE2D1F6D4F6B" Subject: Re: [Qemu-devel] [PATCH][RFC] Add compare subcommand for qemu-img List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Miroslav Rezanina Cc: Paolo Bonzini , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4231984084DAFE2D1F6D4F6B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/01/2012 04:03 AM, Miroslav Rezanina wrote: > This patch adds compare subcommand that compares two images. Compare ha= s following criteria: > - only data part is compared > - unallocated sectors are not read > - in case of different image size, exceeding part of bigger disk has to= be zeroed/unallocated to compare rest > - qemu-img returns: > - 0 if images are identical > - 1 if images differ > - 2 on error >=20 > Signed-off-by: Miroslav Rezanina >=20 > +++ b/qemu-img.c > @@ -96,7 +96,9 @@ static void help(void) > " '-a' applies a snapshot (revert disk to saved state)\n" > " '-c' creates a snapshot\n" > " '-d' deletes a snapshot\n" > - " '-l' lists all snapshots in the given image\n"; > + " '-l' lists all snapshots in the given image\n" > + "Parameters to compare subcommand:\n" > + " '-g' Second image format (in case it differs from first = image)\n"; As written, this sounds like: No -f, no -g =3D> probe both -f, no -g =3D> -f applies to both no -f, -g =3D> probe first, use -g for second -f, -g =3D> use given formats for both Is that really what you meant, or do we actually get: -f, no -g =3D> -f applies to first, probe second I think both interpretations could make sense, but I'd prefer having the omission of -g imply probing the second file type regardless of the presence or absence of -f, for consistency. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig4231984084DAFE2D1F6D4F6B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQGS1AAAoJEKeha0olJ0NqJykIAJQtyJVgnePBi2GKpS+Tor0t hjDY+2vv82DhZ+VF6nCAGVzSwxG+c1Q5YbSlfNroOX8Elmu5jrO7DvGEn9xmLo89 sCYz5qQeeZk2uzx0AvOpHWQ+2HqDaw2I8PHO4tDUv9SU3wh7iMe3nvhNfRmAQke/ /BitDAWSbZCrSd3h8Srk92zrpFs6L7nmT2QSP0/5GdgvyGrA7uM25Bw4RzB8iDaU gazBL1zU0hCy8kiTtwFNE43c/xxjMZHk6CpHAJ0xgQ+QT0DLtxFc4yT00dgbGj3A 7+uZgxpaiO1s8fYZuvV3Q3JZqnL+59doMMx46IRlvBCsl15bVbI1aKLmkwLmJzw= =veOd -----END PGP SIGNATURE----- --------------enig4231984084DAFE2D1F6D4F6B--