From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v8 01/10] progress: Allow regressing progress
Date: Wed, 18 Mar 2015 16:56:19 -0400 [thread overview]
Message-ID: <1426712188-24799-2-git-send-email-mreitz@redhat.com> (raw)
In-Reply-To: <1426712188-24799-1-git-send-email-mreitz@redhat.com>
Progress may regress; this should be displayed correctly by
qemu_progress_print().
While touching that area of code, drop the redundant parentheses in the
same condition.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
util/qemu-progress.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/qemu-progress.c b/util/qemu-progress.c
index 4ee5cd0..532333e 100644
--- a/util/qemu-progress.c
+++ b/util/qemu-progress.c
@@ -152,7 +152,8 @@ void qemu_progress_print(float delta, int max)
state.current = current;
if (current > (state.last_print + state.min_skip) ||
- (current == 100) || (current == 0)) {
+ current < (state.last_print - state.min_skip) ||
+ current == 100 || current == 0) {
state.last_print = state.current;
state.print();
}
--
2.1.0
next prev parent reply other threads:[~2015-03-18 20:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 20:56 [Qemu-devel] [PATCH v8 00/10] qcow2: Allow refcount_bits amendment Max Reitz
2015-03-18 20:56 ` Max Reitz [this message]
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 02/10] block: Add opaque value to the amend CB Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 03/10] qcow2: Use error_report() in qcow2_amend_options() Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 04/10] qcow2: Use abort() instead of assert(false) Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 05/10] qcow2: Split upgrade/downgrade paths for amend Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 06/10] qcow2: Use intermediate helper CB " Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 07/10] qcow2: Add function for refcount order amendment Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 08/10] qcow2: Invoke refcount order amendment function Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 09/10] qcow2: Point to amend function in check Max Reitz
2015-03-18 20:56 ` [Qemu-devel] [PATCH v8 10/10] iotests: Extend test 112 for qemu-img amend Max Reitz
2015-05-11 12:49 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-24 15:00 ` [Qemu-devel] [PATCH v8 00/10] qcow2: Allow refcount_bits amendment Max Reitz
2015-05-11 12:49 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2015-06-03 20:13 [Qemu-devel] [PATCH v8 00/10] qcow2: Support refcount order amendment Max Reitz
2015-06-03 20:13 ` [Qemu-devel] [PATCH v8 01/10] progress: Allow regressing progress Max Reitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426712188-24799-2-git-send-email-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).