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 | 39468ab583899412a0f399800bb1f2289e21e645 (patch) | |
tree | bed0ed8a889bb68edadc478f53cdcce055e31eb5 | |
parent | 0a3d26c2d6c561b353d183fdd1037ba351e96ade (diff) |
Formerly setup.c.~4~
-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)); |