summaryrefslogtreecommitdiffstats
path: root/qemu/util/qemu-progress.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/util/qemu-progress.c')
-rw-r--r--qemu/util/qemu-progress.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu/util/qemu-progress.c b/qemu/util/qemu-progress.c
index 4ee5cd07f..f74523376 100644
--- a/qemu/util/qemu-progress.c
+++ b/qemu/util/qemu-progress.c
@@ -22,9 +22,8 @@
* THE SOFTWARE.
*/
-#include "qemu-common.h"
#include "qemu/osdep.h"
-#include <stdio.h>
+#include "qemu-common.h"
struct progress_state {
float current;
@@ -152,7 +151,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();
}