enh: read linear: add sectors ok/err in verbose mode
print amount of correctly read sectors during session when at least one read failed, in verbose mode
This commit is contained in:
@@ -553,9 +553,10 @@ static void show_progress(read_closure *rc)
|
||||
if(rc->readPos>rc->readMarker) rc->readMarker=rc->readPos;
|
||||
percent = (1000*rc->readPos)/rc->image->dh->sectors;
|
||||
|
||||
if (Closure->verbose)
|
||||
Verbose("Current sector: %" PRId64 ". This session: NewSectorsReadOK=%" PRId64 ", ReadErrors=%" PRId64 ", CRCErrors=%" PRId64 "\n",
|
||||
rc->readPos, rc->speed, rc->readOK, Closure->readErrors, Closure->crcErrors);
|
||||
/* to avoid flooding logs when everything is ok, log this only when there have been errors in the read session */
|
||||
if (Closure->verbose && Closure->readErrors > 0)
|
||||
Verbose("Current sector: %" PRId64 ". This session: NewSectorsReadOK=%" PRId64 ", ReadErrors=%" PRId64 "\n",
|
||||
rc->readPos, rc->readOK, Closure->readErrors);
|
||||
|
||||
|
||||
if(rc->lastPercent != percent)
|
||||
|
||||
Reference in New Issue
Block a user