Browse Source

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>
pull/33/head
Max Reitz 11 years ago
committed by Kevin Wolf
parent
commit
bd5072d756
  1. 3
      util/qemu-progress.c

3
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();
}

Loading…
Cancel
Save