X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=7debfd16a054bae6ac243c8f1914e0279cde2505;hp=45d156f5abd02dfeff2b2fd718f9daf7b29ff8f6;hb=c910e1c0e24b3f10483e624adb6b9c2a004e39dc;hpb=67febcc5e8d252f6f13784dfc2b540bacd4dda77 diff --git a/restore/tape.c b/restore/tape.c index 45d156f..7debfd1 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.99 2010/06/11 11:19:17 stelian Exp $"; + "$Id: tape.c,v 1.102 2011/06/08 15:40:53 stelian Exp $"; #endif /* not lint */ #include @@ -586,7 +586,7 @@ again: fprintf(stderr, "otherwise enter tape name (default: %s) ", magtape); #endif (void) fflush(stderr); - if (fgets(buf, TP_BSIZE, terminal)) + if (!fgets(buf, TP_BSIZE, terminal)) exit(1); if (feof(terminal)) exit(1); @@ -2143,6 +2143,10 @@ readtape_comprfile(char *buf) ((struct s_spcl *)&tapebuf[i * TP_BSIZE])->c_magic = 0; numtrec = ntrec; tpb = (struct tapebuf *) tapebuf; +#ifdef USE_QFA + if (createtapeposflag) + (void)GetTapePos(&curtapepos); +#endif /* read the block prefix */ ret = read_a_block(mt, tapebuf, PREFIXSIZE, &rl); @@ -2232,6 +2236,10 @@ readtape_comprtape(char *buf) ((struct s_spcl *)&tapebuf[i * TP_BSIZE])->c_magic = 0; numtrec = ntrec; tpb = (struct tapebuf *) tapebuf; +#ifdef USE_QFA + if (createtapeposflag) + (void)GetTapePos(&curtapepos); +#endif /* read the block */ size = bufsize + PREFIXSIZE; @@ -3336,11 +3344,14 @@ ReReadInodeFromTape(dump_ino_t theino) cntloop++; gethead(&spcl); } while (!(spcl.c_inumber == theino && spcl.c_type == TS_INODE && spcl.c_date == dumpdate)); + + tpblksread = spcl.c_tapea + spcl.c_volume; #ifdef DEBUG_QFA fprintf(stderr, "DEBUG: %ld reads\n", cntloop); fprintf(stderr, "DEBUG: bufsize %ld\n", bufsize); fprintf(stderr, "DEBUG: ntrec %ld\n", ntrec); - fprintf(stderr, "DEBUG: %ld reads\n", cntloop); + fprintf(stderr, "DEBUG: tapea %d\n", spcl.c_tapea); + fprintf(stderr, "DEBUG: tpblksread %ld\n", tpblksread); #endif findinode(&spcl); noresyncmesg = 0;