X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=344ca3b46fadd47079622653e5fcc07f19ac47d4;hp=fb5c816e974ad6c3a6406d8d7d6282dece01fb97;hb=8b7882a833092b5974aa73e06b2e55bb9d1a9e99;hpb=caea5c768eb239f9b987791f0c665b10d7550741 diff --git a/restore/tape.c b/restore/tape.c index fb5c816..344ca3b 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.46 2001/08/16 15:24:22 stelian Exp $"; + "$Id: tape.c,v 1.47 2001/09/12 10:21:49 stelian Exp $"; #endif /* not lint */ #include @@ -1492,6 +1492,9 @@ readtape_comprfile(char *buf) /* read the block prefix */ ret = read_a_block(mt, tapebuf, PREFIXSIZE, &rl); + + if (Vflag && (ret == 0 || rl < PREFIXSIZE || tpb->length == 0)) + ret = 0; if (ret <= 0) goto readerr; @@ -1932,7 +1935,9 @@ setmagtapein(void) { magtapein = ioctl(mt, MTIOCGET, (char *)&mt_stat) == 0; } - Vprintf(stdout,"Input is from %s\n", magtapein? "tape": "file/pipe"); + Vprintf(stdout,"Input is from %s\n", + magtapein ? "tape" : + Vflag ? "multi-volume (no tape)" : "file/pipe"); } /*