From 4239a14381106d531ccbf872d7471383a7e310fd Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 8 Apr 2022 17:29:23 +0100 Subject: [PATCH] dvd-sector-copy.c (find_good_sector): Update the progress display later. In particular, after clearing the display for debugging rather than before. --- dvd-sector-copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvd-sector-copy.c b/dvd-sector-copy.c index a303239..73e068a 100644 --- a/dvd-sector-copy.c +++ b/dvd-sector-copy.c @@ -727,7 +727,6 @@ static ssize_t find_good_sector(secaddr *pos_inout, secaddr end, bad_lo = pos; bad_hi = pos + 1; for (;;) { - report_bad_blocks_progress(bad_hi, errno); #ifdef DEBUG progress_clear(&progress); printf(";; bounding bad-block region: " @@ -740,6 +739,7 @@ static ssize_t find_good_sector(secaddr *pos_inout, secaddr end, recovered(bad_lo, end); *pos_inout = end; return (0); } + report_bad_blocks_progress(bad_hi, errno); step = (step_factor - 1)*(bad_hi - bad_lo); if (step < step_min) step = step_min; if (step_max && step > step_max) step = step_max; @@ -758,13 +758,13 @@ static ssize_t find_good_sector(secaddr *pos_inout, secaddr end, good = pos; while (good > bad_hi) { - report_bad_blocks_progress(bad_hi, errno); #ifdef DEBUG progress_clear(&progress); printf(";; limiting bad-block region: " "%"PRIuSEC" ..%"PRIuSEC".. %"PRIuSEC" ..%"PRIuSEC".. %"PRIuSEC"\n", bad_lo, bad_hi - bad_lo, bad_hi, good - bad_hi, good); #endif + report_bad_blocks_progress(bad_hi, errno); pos = bad_hi + (good - bad_hi)/2; step = pos - bad_lo; want = run_length_wanted(pos, step, end); -- 2.11.0