Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libsa Use common ffs/lfs file ufs.c instead of lfs s...



details:   https://anonhg.NetBSD.org/src/rev/36b49022271f
branches:  trunk
changeset: 545586:36b49022271f
user:      dsl <dsl%NetBSD.org@localhost>
date:      Fri Apr 11 11:27:06 2003 +0000

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

diffstat:

 sys/lib/libsa/lfsv1.c |  21 ++++++++++++++++++---
 sys/lib/libsa/lfsv2.c |  24 +++++++++++++++++++++---
 2 files changed, 39 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r c0b5ae9f8b33 -r 36b49022271f sys/lib/libsa/lfsv1.c
--- a/sys/lib/libsa/lfsv1.c     Fri Apr 11 11:24:49 2003 +0000
+++ b/sys/lib/libsa/lfsv1.c     Fri Apr 11 11:27:06 2003 +0000
@@ -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_LFS
+#define        REQUIRED_LFS_VERSION    1
 
-#define        LIBSA_LFSv1
-#include "lib/libsa/lfs.c"
+#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"
diff -r c0b5ae9f8b33 -r 36b49022271f sys/lib/libsa/lfsv2.c
--- a/sys/lib/libsa/lfsv2.c     Fri Apr 11 11:24:49 2003 +0000
+++ b/sys/lib/libsa/lfsv2.c     Fri Apr 11 11:27:06 2003 +0000
@@ -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_LFS
+#define        REQUIRED_LFS_VERSION    2
 
-#define        LIBSA_LFSv2
-#include "lib/libsa/lfs.c"
+#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"



Home | Main Index | Thread Index | Old Index