X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=restore%2Frestore.c;h=d438f41dd0813e02f407fbd520586a286cfad318;hb=ddf0df5b77e1a86207bf944b90ba70ac472df923;hp=2c1089248180076059f675994228debd44b8a85a;hpb=ec387a1267f4cac7625cd5b6d1c1f080d39085b3;p=dump.git diff --git a/restore/restore.c b/restore/restore.c index 2c10892..d438f41 100644 --- a/restore/restore.c +++ b/restore/restore.c @@ -2,8 +2,7 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999 - * + * Stelian Pop , 1999-2000 */ /* @@ -37,10 +36,13 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: restore.c,v 1.5 1999/10/11 13:31:13 stelian Exp $ */ +#ifndef lint +static const char rcsid[] = + "$Id: restore.c,v 1.9 2000/06/01 18:30:08 stelian Exp $"; +#endif /* not lint */ + #include #ifdef __linux__ @@ -479,6 +481,7 @@ nodeupdates(char *name, ino_t ino, int type) if (compare_ignore_not_found) break; fprintf(stderr, "%s: (inode %lu) not found on tape\n", name, (unsigned long)ino); + compare_errors = 1; break; /* @@ -608,8 +611,10 @@ removeoldnodes(void) 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); } @@ -640,6 +645,7 @@ compareleaves(void) 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); } @@ -653,12 +659,15 @@ compareleaves(void) 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);