summaryrefslogtreecommitdiff
path: root/sbin/fsck_ext2fs/fsck.h
diff options
context:
space:
mode:
authorjasoni <jasoni@cvs.openbsd.org>2000-04-26 23:26:08 +0000
committerjasoni <jasoni@cvs.openbsd.org>2000-04-26 23:26:08 +0000
commit2ff690a15797dceababa2e77f7dca9567657c9b9 (patch)
treef079ecec0615e6bc8dffe9c2ddab263e7e3327c1 /sbin/fsck_ext2fs/fsck.h
parentb8e2981f69abb136dfacb9e792372f456732e939 (diff)
Support for ext2fs rev. 1
Diffstat (limited to 'sbin/fsck_ext2fs/fsck.h')
-rw-r--r--sbin/fsck_ext2fs/fsck.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/sbin/fsck_ext2fs/fsck.h b/sbin/fsck_ext2fs/fsck.h
index fd8f5a784e4..63a3b45a683 100644
--- a/sbin/fsck_ext2fs/fsck.h
+++ b/sbin/fsck_ext2fs/fsck.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsck.h,v 1.3 1997/06/14 04:16:51 downsj Exp $ */
+/* $OpenBSD: fsck.h,v 1.4 2000/04/26 23:26:05 jasoni Exp $ */
/* $NetBSD: fsck.h,v 1.1 1997/06/11 11:21:47 bouyer Exp $ */
/*
@@ -66,7 +66,7 @@ struct bufarea {
union {
char *b_buf; /* buffer space */
daddr_t *b_indir; /* indirect block */
- struct m_ext2fs *b_fs; /* super block */
+ struct ext2fs *b_fs; /* super block */
struct ext2_gd *b_cgd; /* cylinder group descriptor */
struct ext2fs_dinode *b_dinode; /* inode block */
} b_un;
@@ -78,9 +78,11 @@ struct bufarea {
#define MINBUFS 5 /* minimum number of buffers required */
struct bufarea bufhead; /* head of list of other blks in filesys */
struct bufarea sblk; /* file system superblock */
+struct bufarea asblk; /* first alternate superblock */
struct bufarea *pdirbp; /* current directory contents */
struct bufarea *pbp; /* current inode block */
struct bufarea *getdatablk __P((daddr_t, long));
+struct m_ext2fs sblock;
#define dirty(bp) (bp)->b_dirty = 1
#define initbarea(bp) \
@@ -88,10 +90,7 @@ struct bufarea *getdatablk __P((daddr_t, long));
(bp)->b_bno = (daddr_t)-1; \
(bp)->b_flags = 0;
-#define sbdirty() sblk.b_dirty = 1
-#define cgdirty() cgblk.b_dirty = 1
-#define sblock (*sblk.b_un.b_fs)
-#define cgrp (*cgblk.b_un.b_cg)
+#define sbdirty() copyback_sb(&sblk); sblk.b_dirty = 1
enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE};
@@ -181,11 +180,11 @@ int fswritefd; /* file descriptor for writing file system */
int rerun; /* rerun fsck. Only used in non-preen mode */
daddr_t maxfsblock; /* number of blocks in the file system */
-daddr_t cgoverhead; /* overhead per cg */
char *blockmap; /* ptr to primary blk allocation map */
ino_t maxino; /* number of inodes in file system */
ino_t lastino; /* last inode in use */
char *statemap; /* ptr to inode state table */
+u_char *typemap; /* ptr to inode type table */
int16_t *lncntp; /* ptr to link count table */
ino_t lfdir; /* lost & found directory inode number */
@@ -212,3 +211,5 @@ struct ext2fs_dinode *ginode __P((ino_t));
struct inoinfo *getinoinfo __P((ino_t));
void getblk __P((struct bufarea *, daddr_t, long));
ino_t allocino __P((ino_t, int));
+void copyback_sb __P((struct bufarea*));
+daddr_t cgoverhead __P((int)); /* overhead per cg */