Use common ffs/lfs file ufs.c instead of lfs specific version.

This commit is contained in:
dsl 2003-04-11 11:27:06 +00:00
parent 5a0534abeb
commit af3660bcdb
2 changed files with 39 additions and 6 deletions

View File

@ -1,4 +1,19 @@
/* $NetBSD: lfsv1.c,v 1.1 2003/02/23 23:17:42 simonb Exp $ */
/* $NetBSD: lfsv1.c,v 1.2 2003/04/11 11:27:06 dsl Exp $ */
#define LIBSA_LFSv1
#include "lib/libsa/lfs.c"
#define LIBSA_LFS
#define REQUIRED_LFS_VERSION 1
#define ufs_open lfsv1_open
#define ufs_close lfsv1_close
#define ufs_read lfsv1_read
#define ufs_write lfsv1_write
#define ufs_seek lfsv1_seek
#define ufs_stat lfsv1_stat
#define fs_bsize lfs_ibsize
#define IFILE_Vx IFILE_V1
#define FSBTODB(fs, daddr) (daddr) /* LFSv1 uses sectors for addresses */
#define INOPBx(fs) INOPB(fs)
#include "lib/libsa/ufs.c"

View File

@ -1,4 +1,22 @@
/* $NetBSD: lfsv2.c,v 1.1 2003/02/23 23:17:42 simonb Exp $ */
/* $NetBSD: lfsv2.c,v 1.2 2003/04/11 11:27:06 dsl Exp $ */
#define LIBSA_LFSv2
#include "lib/libsa/lfs.c"
#define LIBSA_LFS
#define REQUIRED_LFS_VERSION 2
#define ufs_open lfsv2_open
#define ufs_close lfsv2_close
#define ufs_read lfsv2_read
#define ufs_write lfsv2_write
#define ufs_seek lfsv2_seek
#define ufs_stat lfsv2_stat
#define fs_bsize lfs_bsize
#define IFILE_Vx IFILE
#ifdef LFS_IFILE_FRAG_ADDRESSING /* XXX see sys/ufs/lfs/ -- not tested */
#define INOPBx(fs) INOPF(fs)
#else
#define INOPBx(fs) INOPB(fs)
#endif
#include "lib/libsa/ufs.c"