#define allocbit(x) (page.header.freebitmap[(x)>>3] & (1 << ((x) & 7)))
#define DPHE (DHE + 1)
-
+#if 0
static void
fixup(char *name, int l)
{
name++;
}
}
-
+#endif
afs_uint32
parse_directory(XFILE * X, dump_parser * p, afs_vnode * v, afs_uint32 size,
int toeof)
{
afs_dir_entry de;
- int pgno, i, j, l, n;
- afs_uint32 r;
+ int pgno, i, l, n;
+ afs_int32 r;
u_int64 where;
if (p->print_flags & DSPRINT_DIR) {
for (pgno = 0; toeof || size; pgno++, size -= (toeof ? 0 : AFS_PAGESIZE)) {
if ((p->flags & DSFLAG_SEEK) && (r = xfseek(X, &where)))
return r;
- if (r = xfread(X, &page, AFS_PAGESIZE)) {
- if (toeof && r == ERROR_XFILE_EOF)
+ if ((r = xfread(X, &page, AFS_PAGESIZE))) {
+ if (toeof && (r == ERROR_XFILE_EOF))
break;
return r;
}
afs_uint32 r;
r = parse_directory(X, p, 0, size, toeof);
+ return r;
}