projects
/
debian
/
dump
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.4b40
[debian/dump]
/
restore
/
main.c
diff --git
a/restore/main.c
b/restore/main.c
index f53d740513c1718b9c156bde174737c15e1edc7a..dfbe8c6ce557ca18d282e67c290b0f8f0ad911ef 100644
(file)
--- a/
restore/main.c
+++ b/
restore/main.c
@@
-37,7
+37,7
@@
#ifndef lint
static const char rcsid[] =
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.4
6 2004/04/13 13:04:33
stelian Exp $";
+ "$Id: main.c,v 1.4
9 2005/01/14 13:04:56
stelian Exp $";
#endif /* not lint */
#include <config.h>
#endif /* not lint */
#include <config.h>
@@
-112,6
+112,7
@@
char filesys[NAMELEN];
static const char *stdin_opt = NULL;
char *bot_script = NULL;
dump_ino_t volinfo[TP_NINOS];
static const char *stdin_opt = NULL;
char *bot_script = NULL;
dump_ino_t volinfo[TP_NINOS];
+int wdfd;
#ifdef USE_QFA
FILE *gTapeposfp;
#ifdef USE_QFA
FILE *gTapeposfp;
@@
-356,6
+357,10
@@
main(int argc, char *argv[])
else
setinput(inputdev);
else
setinput(inputdev);
+ wdfd = open(".", O_RDONLY);
+ if (wdfd < 0)
+ err(1, "can't get current directory");
+
if (argc == 0 && !filelist) {
argc = 1;
*--argv = ".";
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;
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)
setup();
printf("filesys = %s\n", filesys);
if (STAT(filesys, &stbuf) < 0)
@@
-427,9
+433,10
@@
main(int argc, char *argv[])
err(1, "cannot cd to %s", filesys);
compare_ignore_not_found = dumptime > 0;
initsymtable((char *)0);
err(1, "cannot cd to %s", filesys);
compare_ignore_not_found = dumptime > 0;
initsymtable((char *)0);
- extractdirs(
0
);
+ extractdirs(
1
);
treescan(".", ROOTINO, nodeupdates);
compareleaves();
treescan(".", ROOTINO, nodeupdates);
compareleaves();
+ comparedirmodes();
checkrestore();
if (compare_errors) {
printf("Some files were modified!\n");
checkrestore();
if (compare_errors) {
printf("Some files were modified!\n");