Fix batch mode for tools progress function.

This commit is contained in:
Milan Broz
2017-06-08 15:05:28 +02:00
parent 73030aa5fb
commit edba04c978
2 changed files with 4 additions and 2 deletions

View File

@@ -351,6 +351,9 @@ void tools_time_progress(uint64_t device_size, uint64_t bytes,
double tdiff, mib;
int final = (bytes == device_size);
if (opt_batch_mode)
return;
gettimeofday(&now_time, NULL);
if (start_time->tv_sec == 0 && start_time->tv_usec == 0) {
*start_time = now_time;