X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=1b6b1d9d52578436d8fd6c1cfa6baf712359fe11;hp=453b7eb276e533f694cfc73bfdd7d2ae0b8c32c1;hb=ff9e45da1a0be7807fb18401ca7e5ee28d0e1007;hpb=1fe6adbfb31c8fcdb9fbf6f9b266970b626a9789 diff --git a/restore/tape.c b/restore/tape.c index 453b7eb..1b6b1d9 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.60 2002/04/04 08:20:23 stelian Exp $"; + "$Id: tape.c,v 1.61 2002/05/06 08:45:41 stelian Exp $"; #endif /* not lint */ #include @@ -431,6 +431,8 @@ getvol(long nextvol) if (nextvol == 1) { tapesread = 0; gettingfile = 0; + tpblksread = 0; + blksread = 0; } if (pipein) { if (nextvol != 1) @@ -587,8 +589,6 @@ gethdr: goto again; } tapesread |= 1 << volno; - blksread = saved_blksread; - tpblksread = saved_tpblksread; /* * If continuing from the previous volume, skip over any * blocks read already at the end of the previous volume. @@ -603,10 +603,10 @@ gethdr: #endif /* !HAVE_ZLIB && !HAVE_BZLIB */ } Dprintf(stdout, "read %ld recs, tape starts with %ld\n", - tpblksread, (long)tmpbuf.c_firstrec); + tpblksread - 1, (long)tmpbuf.c_firstrec); if (tmpbuf.c_type == TS_TAPE && (tmpbuf.c_flags & DR_NEWHEADER)) { if (!wantnext) { - tpblksread = tmpbuf.c_firstrec; + tpblksread = tmpbuf.c_firstrec + 1; for (i = tmpbuf.c_count; i > 0; i--) readtape(buf); } else if (tmpbuf.c_firstrec > 0 &&