diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-10-14 22:03:42 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-10-14 22:03:42 +0000 |
commit | 21876c021d040e365aa3c4384f57643f3848b801 (patch) | |
tree | 8de938cf9a3fc68b32456c9a1573baa422f61651 /ufs-fsck | |
parent | b97f2bcb095ead4428e2338c2cf8ef6b1ca08265 (diff) |
Formerly setup.c.~4~
Diffstat (limited to 'ufs-fsck')
-rw-r--r-- | ufs-fsck/setup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ufs-fsck/setup.c b/ufs-fsck/setup.c index a3f67a09..10521ce1 100644 --- a/ufs-fsck/setup.c +++ b/ufs-fsck/setup.c @@ -89,9 +89,10 @@ setup (char *dev) pfatal ("CPG OUT OF RANGE"); return 0; } - if (sblock->fs_ncg * sblock->fs_cpg > sblock->fs_ncyl) + if (sblock->fs_ncg * sblock->fs_cpg < sblock->fs_ncyl + || (sblock->fs_ncg - 1) * sblock->fs_cpg >= sblock->fs_ncyl) { - pfatal ("NCYL LESS THAN NCG*CPG"); + pfatal ("NCYL INCONSISTENT WITH NCG AND CPG"); return 0; } if (sblock->fs_sbsize > SBSIZE) @@ -153,6 +154,11 @@ setup (char *dev) if (changedsb) writeblock (SBLOCK, sblock, SBSIZE); + /* Constants */ + maxfsblock = sblock->fs_size; + maxino = sblock->fs_ncg * sblock->fs_ipg; + direct_symlink_extension = sblock->fs_maxsymlinklen > 0; + /* Allocate and initialize maps */ bmapsize = roundup (howmany (maxfsblock, NBBY), sizeof (short)); blockmap = calloc (bmapsize, sizeof (char)); |