#ifndef lint
static const char rcsid[] =
- "$Id: traverse.c,v 1.70 2010/06/10 12:01:30 stelian Exp $";
+ "$Id: traverse.c,v 1.74 2011/06/10 13:41:41 stelian Exp $";
#endif /* not lint */
#include <config.h>
#include <protocols/dumprestore.h>
#include "dump.h"
+#include "indexer.h"
#define HASDUMPEDFILE 0x1
#define HASSUBDIRS 0x2
#define MSINCE(dp, t) \
((dp)->di_mtime >= (t))
#define CHANGEDSINCE(dp, t) \
- (CSINCE(dp, t) || MSINCE(dp, t))
+ CSINCE(dp, t)
/* The NODUMP_FLAG macro tests if a file has the nodump flag. */
#ifdef UF_NODUMP
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;
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;
bc.buf = (int *)malloc (bc.max * sizeof (int));
bc.cnt = 0;
bc.ino = ino;
- bc.next_block = NDADDR;
+ bc.next_block = 0;
ext2fs_block_iterate2(fs, (ext2_ino_t)ino, BLOCK_FLAG_DATA_ONLY, NULL, dumponeblock, (void *)&bc);
/* deal with holes at the end of the inode */
p->prev_offset = p->offset;
p->offset += reclen;
+ //indexer->addDirEntry(dirent, offset, blocksize, buf, private);
+
return 0;
}
spcl.c_type = TS_ADDR;
}
+ indexer->addInode(dp, ino, 0);
+
(void)free(cdc.buf);
dump_xattr(ino, dp);
}
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);