make this compile again after the lfs changes

This commit is contained in:
christos 2013-06-15 00:42:16 +00:00
parent 4c1da39777
commit c486c59c33
2 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: readufs.h,v 1.6 2012/02/24 18:45:20 skrll Exp $ */
/* $NetBSD: readufs.h,v 1.7 2013/06/15 00:42:16 christos Exp $ */
/* from Id: readufs.h,v 1.10 2003/12/16 13:54:11 itohy Exp */
/*
@ -10,6 +10,7 @@
#include <sys/param.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
#include <ufs/lfs/ulfs_dinode.h>
/*
* UFS1 / UFS2
@ -21,6 +22,10 @@ union ufs_dinode {
#ifdef USE_UFS2
struct ufs2_dinode di2;
#endif
#ifdef USE_LFS
struct ulfs1_dinode dil1;
struct ulfs2_dinode dil2;
#endif
};
/* For more compact code and independence on 64-bit types and ops */

View File

@ -1,4 +1,4 @@
/* $NetBSD: readufs_lfs.c,v 1.7 2011/02/21 02:31:57 itohy Exp $ */
/* $NetBSD: readufs_lfs.c,v 1.8 2013/06/15 00:42:16 christos Exp $ */
/* from Id: readufs_lfs.c,v 1.8 2003/12/16 13:54:11 itohy Exp */
/*
@ -20,7 +20,7 @@
#error LFS currently requires USE_UFS1
#endif
static struct ufs1_dinode ifile_dinode;
static struct ulfs1_dinode ifile_dinode;
#define fsi (*ufsinfo)
#define fsi_lfs fsi.fs_u.u_lfs
@ -156,7 +156,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 ufs1_dinode *di, *diend;
struct ulfs1_dinode *di, *diend;
int i;
/* Get fs block which contains the specified inode. */
@ -186,7 +186,7 @@ get_lfs_inode(ino32_t ino, union ufs_dinode *dibuf)
RAW_READ(buf, daddr << fsi.fsbtodb, fsi_lfs.ibsize);
/* Search for the inode. */
di = (struct ufs1_dinode *) buf;
di = (struct ulfs1_dinode *) buf;
diend = di + fsi_lfs.inopb;
for ( ; di < diend; di++)
@ -210,7 +210,7 @@ found:
#endif
#endif
dibuf->di1 = *di;
dibuf->dil1 = *di;
return 0;
}