xref: /minix/sys/lib/libsa/lfsv1.c (revision 0a6a1f1d)
1*0a6a1f1dSLionel Sambuc /* $NetBSD: lfsv1.c,v 1.14 2015/08/12 18:28:01 dholland Exp $ */
258a2b000SEvgeniy Ivanov 
358a2b000SEvgeniy Ivanov #define	LIBSA_LFS
458a2b000SEvgeniy Ivanov #define	REQUIRED_LFS_VERSION	1
558a2b000SEvgeniy Ivanov 
658a2b000SEvgeniy Ivanov #define	ufs_open		lfsv1_open
758a2b000SEvgeniy Ivanov #define	ufs_close		lfsv1_close
858a2b000SEvgeniy Ivanov #define	ufs_read		lfsv1_read
958a2b000SEvgeniy Ivanov #define	ufs_write		lfsv1_write
1058a2b000SEvgeniy Ivanov #define	ufs_seek		lfsv1_seek
1158a2b000SEvgeniy Ivanov #define	ufs_stat		lfsv1_stat
1258a2b000SEvgeniy Ivanov #if defined(LIBSA_ENABLE_LS_OP)
1358a2b000SEvgeniy Ivanov #define	ufs_ls			lfsv1_ls
14*0a6a1f1dSLionel Sambuc #if defined(__minix) && defined(LIBSA_ENABLE_LOAD_MODS_OP)
15*0a6a1f1dSLionel Sambuc #define ufs_load_mods		lfsv1_load_mods
16*0a6a1f1dSLionel Sambuc #endif /* defined(__minix) && defined(LIBSA_ENABLE_LOAD_MODS_OP) */
1758a2b000SEvgeniy Ivanov #endif
1858a2b000SEvgeniy Ivanov 
19*0a6a1f1dSLionel Sambuc #define ufs_dinode		lfs32_dinode
2084d9c625SLionel Sambuc 
21*0a6a1f1dSLionel Sambuc #define	fs_bsize		lfs_dlfs_u.u_32.dlfs_ibsize
2258a2b000SEvgeniy Ivanov 
2384d9c625SLionel Sambuc #define	INOPBx(fs) LFS_INOPB(fs)
2484d9c625SLionel Sambuc 
2584d9c625SLionel Sambuc #define UFS_NINDIR		LFS_NINDIR
2684d9c625SLionel Sambuc #define ufs_blkoff(a, b)	lfs_blkoff((a), (b))
2784d9c625SLionel Sambuc #define ufs_lblkno(a, b)	lfs_lblkno((a), (b))
2884d9c625SLionel Sambuc #define dblksize(a, b, c)	lfs_dblksize((a), (b), (c))
2958a2b000SEvgeniy Ivanov #define	FSBTODB(fs, daddr)	(daddr)		/* LFSv1 uses sectors for addresses */
3058a2b000SEvgeniy Ivanov 
3158a2b000SEvgeniy Ivanov #define	FSMOD			"lfs"
3258a2b000SEvgeniy Ivanov 
3358a2b000SEvgeniy Ivanov #include "lib/libsa/ufs.c"
34