X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=restore%2Fmain.c;h=2a261f6f1bc80088200d444a76472aadbb2e3a5b;hb=5bbb0926a5e765575c199573ea3b3d0f5ecd99a2;hp=8f189d4bba44db5b414695309b1a1b453bb8a2a0;hpb=9ce019288739ce7b6d3e3a4664303a5200b539ad;p=dump.git diff --git a/restore/main.c b/restore/main.c index 8f189d4..2a261f6 100644 --- a/restore/main.c +++ b/restore/main.c @@ -41,10 +41,11 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.22 2001/04/24 15:04:59 stelian Exp $"; + "$Id: main.c,v 1.24 2001/04/27 15:22:47 stelian Exp $"; #endif /* not lint */ #include +#include #include #include #include @@ -118,9 +119,11 @@ main(int argc, char *argv[]) FILE *filelist = NULL; char fname[MAXPATHLEN]; #ifdef USE_QFA - time_t tistart, tiend, titaken; tapeposflag = 0; #endif +#ifdef USE_QFADEBUG + time_t tistart, tiend, titaken; +#endif /* Temp files should *not* be readable. We set permissions later. */ (void) umask(077); @@ -251,7 +254,7 @@ main(int argc, char *argv[]) #ifdef USE_QFA if (!mflag && tapeposflag) - errx(1, "m and Q options are mutually exclusive"): + errx(1, "m and Q options are mutually exclusive"); #endif if (signal(SIGINT, onintr) == SIG_IGN) @@ -313,14 +316,14 @@ main(int argc, char *argv[]) * Compare contents of tape. */ case 'C': { - struct stat stbuf; + struct STAT stbuf; Vprintf(stdout, "Begin compare restore\n"); compare_ignore_not_found = 0; compare_errors = 0; setup(); printf("filesys = %s\n", filesys); - if (stat(filesys, &stbuf) < 0) + if (STAT(filesys, &stbuf) < 0) err(1, "cannot stat directory %s", filesys); if (chdir(filesys) < 0) err(1, "cannot cd to %s", filesys); @@ -435,7 +438,7 @@ main(int argc, char *argv[]) * Batch extraction of tape contents. */ case 'x': -#ifdef USE_QFA +#ifdef USE_QFADEBUG tistart = time(NULL); #endif setup(); @@ -458,14 +461,12 @@ main(int argc, char *argv[]) setdirmodes(0); if (dflag) checkrestore(); -#ifdef USE_QFA +#ifdef USE_QFADEBUG tiend = time(NULL); titaken = tiend - tistart; -#ifdef USE_QFA msg("restore took %d:%02d:%02d\n", titaken / 3600, (titaken % 3600) / 60, titaken % 60); -#endif -#endif +#endif /* USE_QFADEBUG */ break; } exit(0);