X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Fmain.c;h=dfbe8c6ce557ca18d282e67c290b0f8f0ad911ef;hp=77b9d7daf13fd787e8b72633fa94da618c73ad45;hb=18dc6e86736f5319aa7f1d85bf3dc0f696a981ec;hpb=d1925e0c515fcb4f815d75292566d600fd715ff5 diff --git a/restore/main.c b/restore/main.c index 77b9d7d..dfbe8c6 100644 --- a/restore/main.c +++ b/restore/main.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.45 2003/10/26 16:05:48 stelian Exp $"; + "$Id: main.c,v 1.49 2005/01/14 13:04:56 stelian Exp $"; #endif /* not lint */ #include @@ -92,6 +92,7 @@ int abortifconnerr = 1; /* set to 1 if lib dumprmt.o should exit on connection int aflag = 0, bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0; int hflag = 1, mflag = 1, Mflag = 0, Nflag = 0, Vflag = 0, zflag = 0; int uflag = 0, lflag = 0, Lflag = 0, oflag = 0; +int ufs2flag = 0; char *Afile = NULL; int dokerberos = 0; char command = '\0'; @@ -111,6 +112,7 @@ char filesys[NAMELEN]; static const char *stdin_opt = NULL; char *bot_script = NULL; dump_ino_t volinfo[TP_NINOS]; +int wdfd; #ifdef USE_QFA FILE *gTapeposfp; @@ -355,6 +357,10 @@ main(int argc, char *argv[]) else setinput(inputdev); + wdfd = open(".", O_RDONLY); + if (wdfd < 0) + err(1, "can't get current directory"); + if (argc == 0 && !filelist) { argc = 1; *--argv = "."; @@ -418,6 +424,7 @@ main(int argc, char *argv[]) Vprintf(stdout, "Begin compare restore\n"); compare_ignore_not_found = 0; compare_errors = 0; + Nflag = 1; setup(); printf("filesys = %s\n", filesys); if (STAT(filesys, &stbuf) < 0) @@ -426,9 +433,10 @@ main(int argc, char *argv[]) err(1, "cannot cd to %s", filesys); compare_ignore_not_found = dumptime > 0; initsymtable((char *)0); - extractdirs(0); + extractdirs(1); treescan(".", ROOTINO, nodeupdates); compareleaves(); + comparedirmodes(); checkrestore(); if (compare_errors) { printf("Some files were modified!\n");