#ifndef lint
static const char rcsid[] =
- "$Id: restore.c,v 1.34 2004/12/14 14:07:57 stelian Exp $";
+ "$Id: restore.c,v 1.37 2005/07/07 09:16:08 stelian Exp $";
#endif /* not lint */
#include <config.h>
continue;
if (ep->e_entries == NULL)
continue;
- for (j = 0; j < DIRHASH_SIZE; j++) {
+ for (j = 0; j < dirhash_size; j++) {
for (np = ep->e_entries[j]; np != NULL; np = np->e_sibling) {
if (np->e_flags == 0) {
Dprintf(stdout,
for (ep = removelist; ep != NULL; ep = ep->e_next) {
if (ep->e_entries == NULL)
continue;
- for (j = 0; j < DIRHASH_SIZE; j++) {
+ for (j = 0; j < dirhash_size; j++) {
for (np = ep->e_entries[j]; np != NULL; np = np->e_sibling) {
if (np->e_type == LEAF) {
if (np->e_flags != 0)
change = 0;
prev = &removelist;
for (ep = removelist; ep != NULL; ep = *prev) {
+ int docont = 0;
if (ep->e_entries != NULL) {
int i;
- for (i = 0; i < DIRHASH_SIZE; i++) {
+ for (i = 0; i < dirhash_size; i++) {
if (ep->e_entries[i] != NULL) {
prev = &ep->e_next;
- continue;
+ docont = 1;
+ break;
}
}
}
+ if (docont)
+ continue;
*prev = ep->e_next;
removenode(ep);
freeentry(ep);
badentry(ep, "unexpected file on tape");
do_compare_error;
}
- if (do_compare) (void) comparefile(myname(ep));
+ if (do_compare) {
+ (void) comparefile(myname(ep));
+ skipxattr();
+ }
ep->e_flags &= ~(NEW|EXTRACT);
}
else
doremove = 0;
(void) extractfile(ep, doremove);
+ skipxattr();
ep->e_flags &= ~(NEW|EXTRACT);
-finderres:
- if ((first == curfile.ino) && (spcl.c_flags & DR_EXTATTRIBUTES)) {
- switch (spcl.c_extattributes) {
- case EXT_MACOSFNDRINFO:
-#ifdef DUMP_MACOSX
- (void)extractfinderinfoufs(myname(ep));
-#else
- msg("MacOSX not supported in this version, skipping\n");
- skipfile();
-#endif
- break;
- case EXT_MACOSRESFORK:
-#ifdef DUMP_MACOSX
- (void)extractresourceufs(myname(ep));
-#else
- msg("MacOSX not supported in this version, skipping\n");
- skipfile();
-#endif
- break;
- case EXT_ACL:
- msg("ACLs not supported in this version, skipping\n");
- skipfile();
- break;
- default:
- msg("unexpected inode extension %ld, skipping\n", spcl.c_extattributes);
- skipfile();
- break;
- }
- goto finderres;
- }
-
/*
* We checkpoint the restore after every tape reel, so
* as to simplify the amount of work required by the
} else {
#endif /* USE_QFA */
(void) extractfile(ep, 0);
-
-finderres:
- if ((next == curfile.ino) && (spcl.c_flags & DR_EXTATTRIBUTES)) {
- switch (spcl.c_extattributes) {
- case EXT_MACOSFNDRINFO:
-#ifdef DUMP_MACOSX
- (void)extractfinderinfoufs(myname(ep));
-#else
- msg("MacOSX not supported in this version, skipping\n");
- skipfile();
-#endif
- break;
- case EXT_MACOSRESFORK:
-#ifdef DUMP_MACOSX
- (void)extractresourceufs(myname(ep));
-#else
- msg("MacOSX not supported in this version, skipping\n");
- skipfile();
-#endif
- break;
- case EXT_ACL:
- msg("ACLs not supported in this version, skipping\n");
- skipfile();
- break;
- default:
- msg("unexpected inode extension %ld, skipping\n", spcl.c_extattributes);
- skipfile();
- break;
- }
- goto finderres;
- }
+ skipxattr();
#ifdef USE_QFA
}