[core] add log progress report when writing an image/zeroing a drive

* Also simplify a nonsensical condition in format_ext
This commit is contained in:
Pete Batard 2020-11-13 17:58:56 +00:00
parent 0e43c5f2ea
commit 460ab5dd73
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 14 additions and 8 deletions

View file

@ -190,7 +190,7 @@ errcode_t ext2fs_print_progress(int64_t cur_value, int64_t max_value)
return 0;
UpdateProgressWithInfo(OP_FORMAT, MSG_217, (uint64_t)((ext2_percent_start * max_value) + (ext2_percent_share * cur_value)), max_value);
cur_value = (int64_t)(((float)cur_value / (float)max_value) * min(ext2_max_marker, (float)max_value));
if ((cur_value < last_value) || (cur_value > last_value)) {
if (cur_value != last_value) {
last_value = cur_value;
uprintfs("+");
}