On Fri, Feb 14, 2014 at 10:16, Eivind Evensen wrote: > Index: tape.c > =================================================================== > RCS file: /cvs/src/sbin/dump/tape.c,v > retrieving revision 1.38 > diff -u -p -r1.38 tape.c > --- tape.c 12 Nov 2013 04:59:02 -0000 1.38 > +++ tape.c 14 Feb 2014 08:21:21 -0000 > @@ -265,10 +265,11 @@ statussig(int signo) > deltat = tstart_writing - tnow + (1.0 * (tnow - tstart_writing)) > / blockswritten * tapesize; > (void)snprintf(msgbuf, sizeof(msgbuf), > - "dump: %s %3.2f%% done at %lld KB/s, finished in %d:%02d\n", > + "dump: %s %3.2f%% done at %lld KB/s, finished in %lld:%02lld\n", > tape, (blockswritten * 100.0) / tapesize, > (spcl.c_tapea - tapea_volume) / (tnow - tstart_volume), > - (int)(deltat / 3600), (int)((deltat % 3600) / 60)); > + (long long)(deltat / 3600), > + ((long long)deltat % 3600) / 60); > write(STDERR_FILENO, msgbuf, strlen(msgbuf)); > errno = save_errno; > }
This shouldn't be necessary. the range of deltat % 3600 certainly fits in an int, and the range of deltat / 3600 should fit too. i hope your backups don't take more than two billion hours.