-$Id: CHANGES,v 1.123 2001/07/18 13:12:33 stelian Exp $
+$Id: CHANGES,v 1.124 2001/07/18 14:57:46 stelian Exp $
Changes between versions 0.4b22 and 0.4b23 (released ????????????)
==================================================================
<uwe@ugsoft.de>, and some recommendations for QFA uses in
the man pages.
+10. Fixed the multivolume restoring where making a mistake
+ to the 'Mount next tape' prompt caused several blocks to
+ be lost.
+
Changes between versions 0.4b21 and 0.4b22 (released May 12, 2001)
==================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.43 2001/07/18 13:46:17 stelian Exp $";
+ "$Id: tape.c,v 1.44 2001/07/18 14:57:46 stelian Exp $";
#endif /* not lint */
#include <config.h>
void
getvol(long nextvol)
{
- long newvol = 0, savecnt = 0, wantnext = 0, i;
+ long newvol = 0, wantnext = 0, i;
+ long saved_blksread = 0, saved_tpblksread = 0;
union u_spcl tmpspcl;
# define tmpbuf tmpspcl.s_spcl
char buf[TP_BSIZE];
return;
goto gethdr;
}
- savecnt = blksread;
+ saved_blksread = blksread;
+ saved_tpblksread = tpblksread;
again:
if (pipein)
exit(1); /* pipes do not get a second chance */
fprintf(stderr, "tape is not dump tape\n");
volno = 0;
haderror = 1;
+ blksread = saved_blksread;
+ tpblksread = saved_tpblksread;
goto again;
}
if (tmpbuf.c_volume != volno) {
fprintf(stderr, "Wrong volume (%d)\n", tmpbuf.c_volume);
volno = 0;
haderror = 1;
+ blksread = saved_blksread;
+ tpblksread = saved_tpblksread;
goto again;
}
if (tmpbuf.c_date != dumpdate || tmpbuf.c_ddate != dumptime) {
fprintf(stderr, "\twanted: %s", ctime(&dumpdate));
volno = 0;
haderror = 1;
+ blksread = saved_blksread;
+ tpblksread = saved_tpblksread;
goto again;
}
tapesread |= 1 << volno;
- blksread = savecnt;
+ 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.