From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwtJZ-000260-Hn for qemu-devel@nongnu.org; Thu, 02 Aug 2012 07:11:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwtJV-0002b8-NP for qemu-devel@nongnu.org; Thu, 02 Aug 2012 07:11:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwtJV-0002b4-FX for qemu-devel@nongnu.org; Thu, 02 Aug 2012 07:11:33 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q72BBX7o011058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 2 Aug 2012 07:11:33 -0400 Message-ID: <501A6063.40500@redhat.com> Date: Thu, 02 Aug 2012 13:11:31 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1293024006.7532127.1343901996210.JavaMail.root@redhat.com> In-Reply-To: <1293024006.7532127.1343901996210.JavaMail.root@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: qemu-devel@nongnu.org Il 02/08/2012 12:06, Miroslav Rezanina ha scritto: >>> > > + qemu_progress_print(((float) nb_sectors / >>> > > progress_base)*100, 100); >> > >> > qemu_progress_print(nb_sectors, over_sectors); >> > >> > >> > Paolo >> > > This won't work. qemu_progress_print takes either (current_progress,0) or > (progress_delta,progress_part) where all values are in percents - values in > range (0,100). If we pass (nb_sectors,over_sectors) we get 100% thanks to the > formula: > > nb_sectors / 100 * over_sectors Uff, I admit I never understood qemu_progress_print. :) Paolo