-$Id: CHANGES,v 1.309 2010/03/22 15:40:55 stelian Exp $
+$Id: CHANGES,v 1.310 2010/03/22 16:08:10 stelian Exp $
Changes between versions 0.4b42 and 0.4b43 (released ?????????????)
===================================================================
to John Austin <jaustin1@users.sourceforge.net> for reporting
the bug.
+8. Fix some issues when restoring a dump which was generated using
+ exclusion patterns (either via -e or via the nodump attribute)
+ (see the Debian bug #574667 for details. Thanks to Frédéric
+ Brière <fbriere@fbriere.net> for the bug report and the associated
+ patch.
Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009)
===================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: restore.c,v 1.38 2008/04/17 15:22:56 stelian Exp $";
+ "$Id: restore.c,v 1.39 2010/03/22 16:08:10 stelian Exp $";
#endif /* not lint */
#include <config.h>
/*
* Find unreferenced link names.
+ *
+ * This also takes care of directories which were missed by removeoldleaves(),
+ * because their inode has been reused, but excluded from the dump.
*/
void
findunreflinks(void)
continue;
for (j = 0; j < dirhash_size; j++) {
for (np = ep->e_entries[j]; np != NULL; np = np->e_sibling) {
- if (np->e_flags == 0) {
+ if ((np->e_flags & ~TMPNAME) == 0) {
Dprintf(stdout,
"%s: remove unreferenced name\n",
myname(np));
- removeleaf(np);
- freeentry(np);
+ if (np->e_type == LEAF) {
+ removeleaf(np);
+ freeentry(np);
+ } else {
+ np->e_flags |= TMPNAME;
+ deleteino(np->e_ino);
+ np->e_next = removelist;
+ removelist = np;
+ }
}
}
}
myname(np));
removeleaf(np);
freeentry(np);
+ } else {
+ if ((np->e_flags & ~TMPNAME) != 0)
+ badentry(np, "unreferenced with flags");
+
+ if (np->e_flags == 0) {
+ Dprintf(stdout,
+ "%s: remove unreferenced name\n",
+ myname(np));
+ np->e_next = ep->e_next;
+ ep->e_next = np;
+ }
}
}
}