From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiLwn-0006LT-GG for qemu-devel@nongnu.org; Tue, 11 Dec 2012 04:16:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiLwc-0003Un-D5 for qemu-devel@nongnu.org; Tue, 11 Dec 2012 04:16:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiLwc-0003Uc-4s for qemu-devel@nongnu.org; Tue, 11 Dec 2012 04:16:06 -0500 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 qBB9G5Nd020431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Dec 2012 04:16:05 -0500 Date: Tue, 11 Dec 2012 10:16:04 +0100 From: Stefan Hajnoczi Message-ID: <20121211091604.GA30567@stefanha-thinkpad.muc.redhat.com> References: <1649739967.10174371.1354619215533.JavaMail.root@redhat.com> <1340958014.11395601.1354796644818.JavaMail.root@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1340958014.11395601.1354796644818.JavaMail.root@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6] Add compare subcommand for qemu-img List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Miroslav Rezanina Cc: Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org On Thu, Dec 06, 2012 at 07:24:04AM -0500, Miroslav Rezanina wrote: > This is second version of patch adding compare subcommand that > compares two images. Compare has 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 > > v6: > - added handling -?, -h options for compare subcommand > > v5 (only minor changes): > - removed redundant comment > - removed dead code (goto after help()) > - set final total_sectors on first assignment > > v4: > - Fixed various typos > - Added functions for empty sector check and sector-to-bytes offset > conversion > - Fixed command-line parameters processing > > v3: > - options -f/-F are orthogonal > - documentation updated to new syntax and behavior > - used byte offset instead of sector number for output > > v2: > - changed option for second image format to -F > - changed handling of -f and -F [1] > - added strict mode (-s) > - added quiet mode (-q) > - improved output messages [2] > - rename variables for larger image handling > - added man page content > > Signed-off-by: Miroslav Rezanina Acked-by: Stefan Hajnoczi