X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;ds=sidebyside;f=restore%2Ftape.c;h=63eae65ef23cf95a29dd747bed9f3e0a08496bd2;hb=816bf0d9a643ed425d9677064d58b626d7df7b70;hp=d04866de64d6b70437c95d4e3dc830d2dbfc3d0b;hpb=7422942fcabc3e5735e850fce8113e9751ddd399;p=dump.git diff --git a/restore/tape.c b/restore/tape.c index d04866d..63eae65 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.30 2001/03/20 20:39:36 stelian Exp $"; + "$Id: tape.c,v 1.31 2001/03/27 08:09:21 stelian Exp $"; #endif /* not lint */ #include @@ -1742,8 +1742,8 @@ findtapeblksize(void) else { /* read in the rest of the block based on bufsize */ len = bufsize - TP_BSIZE; - if (read_a_block(mt, tapebuf+TP_BSIZE, len, &i) <= 0 - || i != len) + if (read_a_block(mt, tapebuf+TP_BSIZE, len, &i) < 0 + || (i != len && i % TP_BSIZE != 0)) errx(1,"Error reading dump file header"); tbufptr = tapebuf; numtrec = ntrec;