fix build (dholland)

This commit is contained in:
christos 2015-08-21 15:33:04 +00:00
parent aba2ad8151
commit f432ba3f0a
2 changed files with 8 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: readufs.h,v 1.12 2013/06/18 18:18:58 christos Exp $ */
/* $NetBSD: readufs.h,v 1.13 2015/08/21 15:33:04 christos Exp $ */
/* from Id: readufs.h,v 1.9 2003/10/15 14:16:58 itohy Exp */
/*
@ -26,8 +26,7 @@ union ufs_dinode {
struct ufs2_dinode di2;
#endif
#ifdef USE_LFS
struct ulfs1_dinode dil1;
struct ulfs2_dinode dil2;
struct lfs32_dinode dil32;
#endif
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: readufs_lfs.c,v 1.16 2015/07/28 16:51:25 christos Exp $ */
/* $NetBSD: readufs_lfs.c,v 1.17 2015/08/21 15:33:04 christos Exp $ */
/* from Id: readufs_lfs.c,v 1.7 2003/10/15 14:16:58 itohy Exp */
/*
@ -21,7 +21,7 @@
static int get_lfs_inode(ino32_t ino, union ufs_dinode *dibuf);
static struct ulfs1_dinode ifile_dinode;
static struct lfs32_dinode ifile_dinode;
#define fsi (*ufsinfo)
#define fsi_lfs fsi.fs_u.u_lfs
@ -159,7 +159,7 @@ get_lfs_inode(ino32_t ino, union ufs_dinode *dibuf)
struct ufs_info *ufsinfo = &ufs_info;
daddr_t daddr;
char *buf = alloca(fsi.bsize);
struct ulfs1_dinode *di, *diend;
struct lfs32_dinode *di, *diend;
int i;
/* Get fs block which contains the specified inode. */
@ -176,7 +176,7 @@ get_lfs_inode(ino32_t ino, union ufs_dinode *dibuf)
i = ino % fsi_lfs.ifpb;
daddr = (fsi_lfs.version == 1) ?
((IFILE_V1 *) buf + i)->if_daddr
: ((IFILE *) buf + i)->if_daddr;
: ((IFILE32 *) buf + i)->if_daddr;
}
#ifdef DEBUG_WITH_STDIO
printf("LFS(%d): daddr: %d\n", ino, (int) daddr);
@ -195,7 +195,7 @@ get_lfs_inode(ino32_t ino, union ufs_dinode *dibuf)
);
/* Search for the inode. */
di = (struct ulfs1_dinode *) buf;
di = (struct lfs32_dinode *) buf;
diend = di + fsi_lfs.inopb;
for ( ; di < diend; di++)
@ -219,7 +219,7 @@ found:
#endif
#endif
dibuf->dil1 = *di;
dibuf->dil32 = *di;
return 0;
}