X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=restore%2Ftape.c;h=4b4f7362ccf6a97713c9edcfd7b8e315cf1f543a;hb=95d326c036906b75044736fca88830890af47410;hp=cd133cb7cf9c63a2b714b1920e6ad2827e2cdd27;hpb=80dea6355164a9c0231e8d7f4dcfb3fca0858f7d;p=dump.git diff --git a/restore/tape.c b/restore/tape.c index cd133cb..4b4f736 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -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 @@ -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,