X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=dump%2Ftape.c;h=54f11786ecc9be06c13d86a30e4d8119e4e7f947;hb=c4223f38de9ae29e507cc1d2a69d623f6a3e97a2;hp=156abffc99ed843bbf03cb77f8341cb8e2951a2e;hpb=d435f57f01229cd9fa358abe32c4a93077d9090d;p=dump.git diff --git a/dump/tape.c b/dump/tape.c index 156abff..54f1178 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.80 2004/01/27 10:37:29 stelian Exp $"; + "$Id: tape.c,v 1.82 2004/03/08 14:04:04 stelian Exp $"; #endif /* not lint */ #include @@ -485,7 +485,7 @@ flushtape(void) blockswritten += ntrec; blocksthisvol += ntrec; if (!pipeout && !unlimited) { - if (blocksperfiles[blocksperfiles_current]) { + if (blocksperfiles && blocksperfiles[blocksperfiles_current]) { if ( compressed ? (bytes_written - tapea_bytes + SLAVES * (writesize + sizeof(struct tapebuf))) >= (((long long)blocksperfiles[blocksperfiles_current]) * 1024) : blocksthisvol >= blocksperfiles[blocksperfiles_current] ) { close_rewind(); @@ -573,8 +573,6 @@ close_rewind(void) { int eot_code = 1; (void)trewind(); - if (nexttape || Mflag) - return; if (eot_script) { msg("Launching %s\n", eot_script); eot_code = system_command(eot_script, tape, tapeno); @@ -585,6 +583,8 @@ close_rewind(void) } if (eot_code == 0) return; + if (nexttape || Mflag) + return; if (!nogripe) { msg("Change Volumes: Mount volume #%d\n", tapeno+1); broadcast("CHANGE DUMP VOLUMES!\7\7\n"); @@ -872,7 +872,7 @@ restore_check_point: tape[MAXPATHLEN - 1] = '\0'; msg("Dumping volume %d on %s\n", tapeno, tape); } - if (blocksperfiles_current < *blocksperfiles) + if (blocksperfiles && blocksperfiles_current < *blocksperfiles) blocksperfiles_current++; #ifdef RDUMP while ((tapefd = (host ? rmtopen(tape, O_WRONLY|O_CREAT|O_TRUNC) : pipeout ?