diff options
author | Max Reitz <mreitz@redhat.com> | 2015-07-27 17:51:31 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-12-18 14:34:43 +0100 |
commit | bd5072d75622c3a702741064df87ea8911bae1a4 (patch) | |
tree | b4ebcfde055893e3de4adbd8009d3d3839793861 /util | |
parent | 0a8111e0fbeccdf94ee011bc3b3013a45166a9a8 (diff) | |
download | qemu-bd5072d75622c3a702741064df87ea8911bae1a4.zip qemu-bd5072d75622c3a702741064df87ea8911bae1a4.tar.gz qemu-bd5072d75622c3a702741064df87ea8911bae1a4.tar.bz2 |
progress: Allow regressing progress
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>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/qemu-progress.c | 3 |
1 files changed, 2 insertions, 1 deletions
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(); } |