* Ported to Linux's Second Extended File System as part of the
* dump and restore backup suit
* Remy Card <card@Linux.EU.Org>, 1994-1997
- * Stelian Pop <pop@cybercable.fr>, 1999
- *
+ * Stelian Pop <pop@cybercable.fr>, 1999-2000
*/
/*
*/
#ifndef lint
-#if 0
-static char sccsid[] = "@(#)restore.c 8.3 (Berkeley) 9/13/94";
-#endif
static const char rcsid[] =
- "$Id: restore.c,v 1.3 1999/10/11 12:59:20 stelian Exp $";
+ "$Id: restore.c,v 1.9 2000/06/01 18:30:08 stelian Exp $";
#endif /* not lint */
#include <sys/types.h>
if (compare_ignore_not_found) break;
fprintf(stderr, "%s: (inode %lu) not found on tape\n",
name, (unsigned long)ino);
+ compare_errors = 1;
break;
/*
static void
compare_entry(struct entry *ep, int do_compare)
{
- if ((ep->e_flags & (NEW|EXTRACT)) == 0)
+ if ((ep->e_flags & (NEW|EXTRACT)) == 0) {
badentry(ep, "unexpected file on tape");
+ compare_errors = 1;
+ }
if (do_compare) (void) comparefile(myname(ep));
ep->e_flags &= ~(NEW|EXTRACT);
}
if (ep == NULL)
panic("%d: bad first\n", first);
fprintf(stderr, "%s: not found on tape\n", myname(ep));
+ compare_errors = 1;
ep->e_flags &= ~(NEW|EXTRACT);
first = lowerbnd(first);
}
if (first != curfile.ino) {
fprintf(stderr, "expected next file %ld, got %lu\n",
(long)first, (unsigned long)curfile.ino);
+ compare_errors = 1;
skipfile();
goto next;
}
ep = lookupino(curfile.ino);
- if (ep == NULL)
+ if (ep == NULL) {
panic("unknown file on tape\n");
+ compare_errors = 1;
+ }
compare_entry(ep, 1);
for (ep = ep->e_links; ep != NULL; ep = ep->e_links) {
compare_entry(ep, 0);