After writing 2TB (INT_MAX * TP_BSIZE), dump(8) stops reporting
progress because the blockswritten variable has wrapped around to
negative.  It needs to be a larger type like the tapesize variable;
see optr.c:timeest().  This only affects the terminal chatter.  The
actual dump functionality is fine.

ok?

Index: dump.h
===================================================================
RCS file: /cvs/src/sbin/dump/dump.h,v
retrieving revision 1.19
diff -u -p -r1.19 dump.h
--- dump.h      24 May 2014 21:49:09 -0000      1.19
+++ dump.h      12 Jun 2014 11:28:35 -0000
@@ -73,7 +73,7 @@ int   etapes;         /* estimated number of tape
 int    nonodump;       /* if set, do not honor UF_NODUMP user flags */
 
 int    notify;         /* notify operator flag */
-int    blockswritten;  /* number of blocks written on current tape */
+off_t  blockswritten;  /* number of blocks written on current tape */
 int    tapeno;         /* current tape number */
 time_t tstart_writing; /* when started writing the first tape block */
 long   xferrate;       /* averaged transfer rate of all volumes */
Index: main.c
===================================================================
RCS file: /cvs/src/sbin/dump/main.c,v
retrieving revision 1.50
diff -u -p -r1.50 main.c
--- main.c      31 May 2014 08:28:13 -0000      1.50
+++ main.c      12 Jun 2014 11:29:07 -0000
@@ -59,7 +59,7 @@
 #include "pathnames.h"
 
 int    notify = 0;     /* notify operator flag */
-int    blockswritten = 0;      /* number of blocks written on current tape */
+off_t  blockswritten = 0;      /* number of blocks written on current tape */
 int    tapeno = 0;     /* current tape number */
 int    density = 0;    /* density in bytes/0.1" */
 int    ntrec = NTREC;  /* # tape blocks in each tape record */

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to