X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=dump%2Ftraverse.c;h=f762cf4b1c455c985ee2473b9536d1bd3578f7b0;hp=34be0ec9115bb8ddc369dac0c2bab5976c5af978;hb=70deb804d2211535f1f188a14e8fc867db9c6625;hpb=221107b058053e59e420bfffede2e01396051267 diff --git a/dump/traverse.c b/dump/traverse.c index 34be0ec..f762cf4 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.72 2011/02/21 10:36:47 stelian Exp $"; + "$Id: traverse.c,v 1.74 2011/06/10 13:41:41 stelian Exp $"; #endif /* not lint */ #include @@ -77,6 +77,7 @@ static const char rcsid[] = #include #include "dump.h" +#include "indexer.h" #define HASDUMPEDFILE 0x1 #define HASSUBDIRS 0x2 @@ -868,8 +869,9 @@ dump_xattr(dump_ino_t ino, struct dinode *dp) { void dumpino(struct dinode *dp, dump_ino_t ino, int metaonly) { - unsigned long cnt; - fsizeT size, remaining; + //unsigned long cnt; + //fsizeT size; + fsizeT remaining; char buf[TP_BSIZE]; struct new_bsd_inode nbi; int i; @@ -913,6 +915,8 @@ dumpino(struct dinode *dp, dump_ino_t ino, int metaonly) spcl.c_type = TS_INODE; spcl.c_count = 0; + indexer->addInode(dp, ino, metaonly); + if (metaonly && (dp->di_mode & S_IFMT)) { spcl.c_flags |= DR_METAONLY; spcl.c_count = 0; @@ -1100,6 +1104,8 @@ convert_dir(struct ext2_dir_entry *dirent, UNUSED(int offset), p->prev_offset = p->offset; p->offset += reclen; + //indexer->addDirEntry(dirent, offset, blocksize, buf, private); + return 0; } @@ -1203,6 +1209,8 @@ dumpdirino(struct dinode *dp, dump_ino_t ino) spcl.c_type = TS_ADDR; } + indexer->addInode(dp, ino, 0); + (void)free(cdc.buf); dump_xattr(ino, dp); } @@ -1348,6 +1356,7 @@ mkchecksum(union u_spcl *tmpspcl) void writeheader(dump_ino_t ino) { + char *state; /* need to have some place to put this! */ spcl.c_inumber = ino; spcl.c_magic = NFS_MAGIC; mkchecksum((union u_spcl *)&spcl);