From: Stelian Pop Date: Mon, 22 Nov 2004 10:22:40 +0000 (+0000) Subject: Exclude directory entries to non-dumped inodes from the dump. X-Git-Tag: release_0_4b38~8 X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=commitdiff_plain;h=585ca01a9a2ed1ce197c44a33f5a1fde06adbef7;hp=7d422735f62ce24de9bc9c9d5033745660a85756 Exclude directory entries to non-dumped inodes from the dump. --- diff --git a/CHANGES b/CHANGES index 0d7cd05..3a2b9b7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.257 2004/08/16 09:39:45 stelian Exp $ +$Id: CHANGES,v 1.258 2004/11/22 10:22:40 stelian Exp $ Changes between versions 0.4b37 and 0.4b38 (released ????????????) ================================================================== @@ -13,6 +13,10 @@ Changes between versions 0.4b37 and 0.4b38 (released ????????????) dump containing files over 2GB. Thanks to Steve Bonds for the bug report. +4. Do not save directory entries to non-dumped inodes + (excluded from dump). This will eliminate the 'missing + file' warnings when doing 'restore -C'. + Changes between versions 0.4b36 and 0.4b37 (released July 7, 2004) ================================================================== diff --git a/dump/traverse.c b/dump/traverse.c index 4104799..9e68fdd 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.61 2004/07/01 09:14:49 stelian Exp $"; + "$Id: traverse.c,v 1.62 2004/11/22 10:22:43 stelian Exp $"; #endif /* not lint */ #include @@ -985,6 +985,11 @@ convert_dir(struct ext2_dir_entry *dirent, UNUSED(int offset), struct direct *dp; int reclen; + /* do not save entries to excluded inodes */ + if (TSTINO(dirent->inode, dumpinomap) == 0 && + TSTINO(dirent->inode, dumpdirmap) == 0) + return 0; + p = (struct convert_dir_context *)private; reclen = EXT2_DIR_REC_LEN((dirent->name_len & 0xFF) + 1);