]> git.wh0rd.org - dump.git/blobdiff - restore/tape.c
Another set of fixes for file not found at end of tape.
[dump.git] / restore / tape.c
index cd133cb7cf9c63a2b714b1920e6ad2827e2cdd27..4b4f7362ccf6a97713c9edcfd7b8e315cf1f543a 100644 (file)
@@ -46,7 +46,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.48 2001/11/16 14:09:07 stelian Exp $";
+       "$Id: tape.c,v 1.50 2001/12/24 15:53:41 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -97,7 +97,7 @@ int           noresyncmesg = 0;
 #endif /* USE_QFA */
 static long    fssize = MAXBSIZE;
 static int     mt = -1;
-static int     pipein = 0;
+int            pipein = 0;
 static int     magtapein = 0;          /* input is from magtape */
 static char    magtape[MAXPATHLEN];
 static char    magtapeprefix[MAXPATHLEN];
@@ -432,12 +432,16 @@ again:
                        fprintf(stderr, "\n");
                }
                do      {
-                       fprintf(stderr, "Specify next volume #: ");
+                       fprintf(stderr, "Specify next volume # (none if no more volumes): ");
                        (void) fflush(stderr);
                        (void) fgets(buf, TP_BSIZE, terminal);
                } while (!feof(terminal) && buf[0] == '\n');
                if (feof(terminal))
                        exit(1);
+               if (!strcmp(buf, "none\n")) {
+                       terminateinput();
+                       return;
+               }
                newvol = atoi(buf);
                if (newvol <= 0) {
                        fprintf(stderr,