X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=77f84f08dbe441f6be9cf283b6293cc6926d1990;hp=aa0dbd7021a711c2192da6c4646fcb64dc7f6993;hb=77de3c7f1a6de2d141713d4dd3c44e1b5090d63d;hpb=a55ce9149e3f4a5f848a20b7593dbe8cd7b0bbd1 diff --git a/restore/tape.c b/restore/tape.c index aa0dbd7..77f84f0 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.84 2004/12/15 11:00:01 stelian Exp $"; + "$Id: tape.c,v 1.87 2005/01/24 10:37:58 stelian Exp $"; #endif /* not lint */ #include @@ -1527,7 +1527,7 @@ cmpfiles(char *tapefile, char *diskfile, struct STAT *sbuf_disk) int fd_tape, fd_disk; if (STAT(tapefile, &sbuf_tape) != 0) { - panic("Can't lstat tmp file %s: %s\n", tapefile, + panic("can't lstat tmp file %s: %s\n", tapefile, strerror(errno)); do_compare_error; } @@ -1545,12 +1545,12 @@ cmpfiles(char *tapefile, char *diskfile, struct STAT *sbuf_disk) } if ((fd_tape = OPEN(tapefile, O_RDONLY)) < 0) { - panic("Can't open %s: %s\n", tapefile, strerror(errno)); + panic("can't open %s: %s\n", tapefile, strerror(errno)); do_compare_error; } if ((fd_disk = OPEN(diskfile, O_RDONLY)) < 0) { close(fd_tape); - panic("Can't open %s: %s\n", diskfile, strerror(errno)); + panic("can't open %s: %s\n", diskfile, strerror(errno)); do_compare_error; } @@ -1652,7 +1652,7 @@ comparefile(char *name) } if ((r = LSTAT(name, &sb)) != 0) { - warn("%s: does not exist (%d)", name, r); + warn("unable to stat %s", name); do_compare_error; skipfile(); return; @@ -1678,8 +1678,10 @@ comparefile(char *name) } #ifdef __linux__ if (lgetflags(name, &newflags) < 0) { - warn("%s: lgetflags failed", name); - do_compare_error; + if (flags != 0) { + warn("%s: lgetflags failed", name); + do_compare_error; + } } else { if (newflags != flags) { @@ -1728,7 +1730,7 @@ comparefile(char *name) return; } if ((lsize = readlink(name, lbuf, MAXPATHLEN)) < 0) { - panic("readlink of %s failed: %s", name, + panic("readlink of %s failed: %s\n", name, strerror(errno)); do_compare_error; } @@ -1771,7 +1773,7 @@ comparefile(char *name) case IFREG: #if COMPARE_ONTHEFLY if ((ifile = OPEN(name, O_RDONLY)) < 0) { - panic("Can't open %s: %s\n", name, strerror(errno)); + warn("can't open %s", name); skipfile(); do_compare_error; }