From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrVCO-0003mu-Bi for qemu-devel@nongnu.org; Thu, 20 Nov 2014 12:07:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrVCH-0000ni-RC for qemu-devel@nongnu.org; Thu, 20 Nov 2014 12:07:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrVCH-0000nc-KT for qemu-devel@nongnu.org; Thu, 20 Nov 2014 12:07:09 -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 sAKH79cL018224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 20 Nov 2014 12:07:09 -0500 From: Max Reitz Date: Thu, 20 Nov 2014 18:06:29 +0100 Message-Id: <1416503198-17031-14-git-send-email-mreitz@redhat.com> In-Reply-To: <1416503198-17031-1-git-send-email-mreitz@redhat.com> References: <1416503198-17031-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH v3 13/22] progress: Allow regressing progress List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz Progress may regress; this should be displayed correctly by qemu_progress_print(). Signed-off-by: Max Reitz --- util/qemu-progress.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/qemu-progress.c b/util/qemu-progress.c index 4ee5cd0..c0fb14d 100644 --- a/util/qemu-progress.c +++ b/util/qemu-progress.c @@ -152,6 +152,7 @@ void qemu_progress_print(float delta, int max) state.current = current; if (current > (state.last_print + state.min_skip) || + current < (state.last_print - state.min_skip) || (current == 100) || (current == 0)) { state.last_print = state.current; state.print(); -- 1.9.3