diff options
Diffstat (limited to 'sbin/dump/optr.c')
-rw-r--r-- | sbin/dump/optr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 3dc17b6..0d70b9e 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); } } } |