summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-10-07 23:37:56 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-10-07 23:37:56 +0000
commite627f58514c9eca0e32ae82211f5756710f9e79f (patch)
tree16194e5fe1cd1d89ac1fcb13c93c42dffda2c2ac
parent8f7700cb555857f76301b9fa2d8d9d715fa77668 (diff)
Formerly fsck.h.~2~
-rw-r--r--ufs-fsck/fsck.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/ufs-fsck/fsck.h b/ufs-fsck/fsck.h
index 1f8240f4..b7749330 100644
--- a/ufs-fsck/fsck.h
+++ b/ufs-fsck/fsck.h
@@ -28,13 +28,41 @@ enum inodetype
BADDIR, /* dir with bad block pointers */
};
-/* State of each inode */
+/* Added to directories in pass 2 */
+#define DIR_REF 0x80000000 /* dir has been found in connectivity search */
+
+/* State of each inode (set by pass 1) */
enum inodetype *inodestate;
-/* Number of links claimed by each inode */
+/* Number of links claimed by each inode (set by pass 1) */
nlink_t *linkcount;
-/* DT_foo type of each inode */
+/* DT_foo type of each inode (set by pass 1) */
char *typemap;
+
+/* One of these structures is set up for each directory by
+ pass 1 and used by passes 2 and 3. */
+struct dirinfo
+{
+ struct inoinfo *i_nexthash; /* next entry in hash chain */
+ ino_t i_number; /* inode entry of this dir */
+ ino_t i_parent; /* inode entry of parent */
+ ino_t i_dotdot; /* inode number of `..' */
+ ino_t i_isize; /* size of inode */
+ u_int i_numblks; /* size of block array in bytes */
+ daddr_t i_blks[0]; /* array of inode block addresses */
+};
+
+/* Array of all the dirinfo structures in inode number order */
+struct **dirarray;
+
+/* Array of all thi dirinfo structures sorted by their first
+ block address */
+struct **dirsorted;
+
+int dirarrayused; /* number of directories */
+int dirarraysize; /* alloced size of dirarray/dirsorted */
+
+