]> git.wh0rd.org - dump.git/blobdiff - restore/tape.c
New config.guess and config.sub version, + minor cleanup.
[dump.git] / restore / tape.c
index f434143116847216ceee0722e32be8921117cc86..f46ac48a1f5ea0a9f60efd916fb66ae4a661f546 100644 (file)
@@ -46,7 +46,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.32 2001/04/10 12:46:53 stelian Exp $";
+       "$Id: tape.c,v 1.34 2001/04/12 16:03:30 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -150,7 +150,7 @@ static void readtape_comprtape __P((char *));
 static char    *decompress_tapebuf __P((struct tapebuf *, int));
 static void    msg_read_error __P((char *));
 #endif
-static int     read_a_block __P((int, void *, size_t, long *));
+static int     read_a_block __P((int, char *, size_t, long *));
 #define PREFIXSIZE     sizeof(struct tapebuf)
 
 #define COMPARE_ONTHEFLY 1
@@ -841,6 +841,11 @@ loop:
                (*fill)((char *)buf, (size_t)(curblk * TP_BSIZE) + size);
                last_write_was_hole = 0;
        }
+       if (size > 0) {
+               fprintf(stderr, "Missing blocks at the end of %s, assuming hole\n", curfile.name);
+               (*skip)(clearedbuf, size);
+               last_write_was_hole = 1;
+       }
        if (last_write_was_hole) {
                ftruncate(ofile, origsize);
        }
@@ -1787,7 +1792,7 @@ findtapeblksize(void)
 /*
  * Read a block of data handling all of the messy details.
  */
-static int read_a_block(int fd, void *buf, size_t len, long *lengthread)
+static int read_a_block(int fd, char *buf, size_t len, long *lengthread)
 {
        long i = 1, size;