aboutsummaryrefslogtreecommitdiff
path: root/sbin/dump
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/optr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 3dc17b67db67..0d70b9e7be05 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -190,6 +190,7 @@ timeest(void)
{
double percent;
time_t tnow, tdone;
+ char *tdone_str;
int deltat, hours, mins;
(void)time(&tnow);
@@ -207,15 +208,16 @@ timeest(void)
hours = deltat / 3600;
mins = (deltat % 3600) / 60;
+ tdone_str = ctime(&tdone);
setproctitle(
- "%s: pass %d: %3.2f%% done, finished in %d:%02d at %s",
- disk, passno, percent, hours, mins, ctime(&tdone));
+ "%s: pass %d: %3.2f%% done, finished in %d:%02d at %.*s",
+ disk, passno, percent, hours, mins, strlen(tdone_str) - 1, tdone_str);
if (tnow >= tschedule) {
tschedule = tnow + 300;
if (blockswritten < 500)
return;
msg("%3.2f%% done, finished in %d:%02d at %s", percent,
- hours, mins, ctime(&tdone));
+ hours, mins, tdone_str);
}
}
}