Skip to content

Commit

Permalink
progress: Allow regressing progress
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
XanClic authored and kevmw committed Dec 18, 2015
1 parent 0a8111e commit bd5072d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/qemu-progress.c
Expand Up @@ -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();
}
Expand Down

0 comments on commit bd5072d

Please sign in to comment.