- perc *= 100.0;
- printf(": [%s] [%3.1f%% done] [%6u/%6u kb/s] [eta %s]", run_str, perc, rate[0], rate[1], eta_str);
+ char perc_str[32];
+ int ll;
+
+ if ((!eta_sec && !eta_good) || nr_ramp == nr_running)
+ strcpy(perc_str, "-.-% done");
+ else {
+ eta_good = 1;
+ perc *= 100.0;
+ sprintf(perc_str, "%3.1f%% done", perc);
+ }
+
+ ll = printf(": [%s] [%s] [%6u/%6u kb/s] [eta %s]",
+ run_str, perc_str, rate[0], rate[1], eta_str);
+ if (ll >= 0 && ll < linelen_last)
+ printf("%*s", linelen_last - ll, "");
+ linelen_last = ll;