#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.92 2007/02/22 20:16:23 stelian Exp $";
+ "$Id: tape.c,v 1.94 2009/12/03 12:46:30 stelian Exp $";
#endif /* not lint */
#include <config.h>
if (nextvol == 1) {
tapesread = 0;
gettingfile = 0;
- tpblksread = 0;
blksread = 0;
}
if (pipein) {
case IFIFO:
Vprintf(stdout, "extract fifo %s\n", name);
- if (Nflag) {
- skipfile();
+ skipfile();
+ if (Nflag)
return (GOOD);
- }
if (! (spcl.c_flags & DR_METAONLY)) {
if (uflag && !Nflag)
(void)unlink(name);
if (mkfifo(name, mode) < 0) {
warn("%s: cannot create fifo", name);
- skipfile();
return (FAIL);
}
}
(void) chflags(name, flags);
#endif
#endif
- skipfile();
return (GOOD);
case IFCHR:
case IFBLK:
Vprintf(stdout, "extract special file %s\n", name);
- if (Nflag) {
- skipfile();
+ skipfile();
+ if (Nflag)
return (GOOD);
- }
if (! (spcl.c_flags & DR_METAONLY)) {
if (uflag)
(void)unlink(name);
if (mknod(name, mode, (int)curfile.dip->di_rdev) < 0) {
warn("%s: cannot create special file", name);
- skipfile();
return (FAIL);
}
}
}
#endif
#endif
- skipfile();
return (GOOD);
case IFREG:
break;
}
}
- if (gethead(&spcl) == GOOD && size > 0) {
+ while (gethead(&spcl) != GOOD) {
+ fprintf(stderr, "Incorrect block for %s at %ld blocks\n",
+ curfile.name, (long)blksread);
+ }
+ if (size > 0) {
if (spcl.c_type == TS_ADDR)
goto loop;
Dprintf(stdout,