BSD 4 release
[unix-history] / usr / src / cmd / dcheck.c
index 3766aa9..8514caa 100644 (file)
@@ -1,3 +1,4 @@
+static char *sccsid = "@(#)dcheck.c    4.1 (Berkeley) 10/1/80";
 /*
  * dcheck - check directory consistency
  */
 /*
  * dcheck - check directory consistency
  */
@@ -79,9 +80,9 @@ char *file;
        sync();
        bread((daddr_t)1, (char *)&sblock, sizeof(sblock));
        nfiles = (sblock.s_isize-2)*INOPB;
        sync();
        bread((daddr_t)1, (char *)&sblock, sizeof(sblock));
        nfiles = (sblock.s_isize-2)*INOPB;
-       if (nfiles > 40000) {
-               printf("Only doing 40000 files\n");
-               nfiles = 40000;
+       if (nfiles > 250000) {
+               printf("Only doing 250000 files\n");
+               nfiles = 250000;
        }
        ecount = malloc(nfiles+1);
        if (ecount==NULL) {
        }
        ecount = malloc(nfiles+1);
        if (ecount==NULL) {
@@ -174,8 +175,6 @@ register struct dinode *ip;
                return;
        if (ip->di_nlink==((ecount[i])&0377) && ip->di_nlink!=0)
                return;
                return;
        if (ip->di_nlink==((ecount[i])&0377) && ip->di_nlink!=0)
                return;
-       if (ino < ROOTINO && ip->di_nlink==0 && ecount[i]==0)
-               return;
        if (headpr==0) {
                printf("     entries  link cnt\n");
                headpr++;
        if (headpr==0) {
                printf("     entries  link cnt\n");
                headpr++;
@@ -192,7 +191,7 @@ char *buf;
 
        lseek(fi, bno*BSIZE, 0);
        if (read(fi, buf, cnt) != cnt) {
 
        lseek(fi, bno*BSIZE, 0);
        if (read(fi, buf, cnt) != cnt) {
-               printf("read error %D\n", bno);
+               printf("read error %d\n", bno);
                for(i=0; i<BSIZE; i++)
                        buf[i] = 0;
        }
                for(i=0; i<BSIZE; i++)
                        buf[i] = 0;
        }