minor fixes
[unix-history] / usr / src / sbin / fsck / pass5.c
index 161c508..d998813 100644 (file)
@@ -1,6 +1,12 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
 #ifndef lint
 #ifndef lint
-static char version[] = "@(#)pass5.c   3.6 (Berkeley) %G%";
-#endif
+static char sccsid[] = "@(#)pass5.c    5.3 (Berkeley) %G%";
+#endif not lint
 
 #include <sys/param.h>
 #include <sys/inode.h>
 
 #include <sys/param.h>
 #include <sys/inode.h>
@@ -86,6 +92,12 @@ pass5()
                                newcg->cg_cs.cs_nifree--;
                                setbit(newcg->cg_iused, i);
                                break;
                                newcg->cg_cs.cs_nifree--;
                                setbit(newcg->cg_iused, i);
                                break;
+
+                       default:
+                               if (j < ROOTINO)
+                                       break;
+                               errexit("BAD STATE %d FOR INODE I=%d",
+                                   statemap[j], j);
                        }
                }
                if (c == 0)
                        }
                }
                if (c == 0)
@@ -121,7 +133,13 @@ pass5()
                        newcg->cg_cs.cs_nffree++;
                }
                if (frags != d) {
                        newcg->cg_cs.cs_nffree++;
                }
                if (frags != d) {
+#ifdef tahoe
+                       /* tahoe compiler workaround */
+                       int x = frags - dbase;
+                       blk = blkmap(&sblock, newcg->cg_free, x);
+#else
                        blk = blkmap(&sblock, newcg->cg_free, (frags - dbase));
                        blk = blkmap(&sblock, newcg->cg_free, (frags - dbase));
+#endif
                        fragacct(&sblock, blk, newcg->cg_frsum, 1);
                }
                cstotal.cs_nffree += newcg->cg_cs.cs_nffree;
                        fragacct(&sblock, blk, newcg->cg_frsum, 1);
                }
                cstotal.cs_nffree += newcg->cg_cs.cs_nffree;