X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Fmain.c;h=dfbe8c6ce557ca18d282e67c290b0f8f0ad911ef;hp=361c4ecd4b4e190e01e03a251011e783a2e2ed3a;hb=18dc6e86736f5319aa7f1d85bf3dc0f696a981ec;hpb=a55ce9149e3f4a5f848a20b7593dbe8cd7b0bbd1 diff --git a/restore/main.c b/restore/main.c index 361c4ec..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.47 2004/12/15 11:00:01 stelian Exp $"; + "$Id: main.c,v 1.49 2005/01/14 13:04:56 stelian Exp $"; #endif /* not lint */ #include @@ -112,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; @@ -356,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 = "."; @@ -419,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)