diff options
author | mike <mike@FreeBSD.org> | 2002-09-25 04:06:37 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-09-25 04:06:37 +0000 |
commit | 86a758e51be945d9e690ee0802a21bf9a667b4e8 (patch) | |
tree | 2295edf76df9065e84ea0b415c9c13ecf434f1fa /sbin/growfs/growfs.c | |
parent | b9155304da025f935d34f191093267f40e40cdd2 (diff) | |
download | FreeBSD-src-86a758e51be945d9e690ee0802a21bf9a667b4e8.zip FreeBSD-src-86a758e51be945d9e690ee0802a21bf9a667b4e8.tar.gz |
Use the standardized CHAR_BIT constant instead of NBBY in userland.
Diffstat (limited to 'sbin/growfs/growfs.c')
-rw-r--r-- | sbin/growfs/growfs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 2db3430..368fa99 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -62,6 +62,7 @@ static const char rcsid[] = #include <ctype.h> #include <err.h> #include <fcntl.h> +#include <limits.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -410,8 +411,8 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag) acg.cg_iusedoff = acg.cg_old_boff + sblock.fs_old_cpg * sizeof(u_int16_t); } - acg.cg_freeoff = acg.cg_iusedoff + howmany(sblock.fs_ipg, NBBY); - acg.cg_nextfreeoff = acg.cg_freeoff + howmany(sblock.fs_fpg, NBBY); + acg.cg_freeoff = acg.cg_iusedoff + howmany(sblock.fs_ipg, CHAR_BIT); + acg.cg_nextfreeoff = acg.cg_freeoff + howmany(sblock.fs_fpg, CHAR_BIT); if (sblock.fs_contigsumsize > 0) { acg.cg_clustersumoff = roundup(acg.cg_nextfreeoff, sizeof(u_int32_t)); @@ -419,7 +420,7 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag) acg.cg_clusteroff = acg.cg_clustersumoff + (sblock.fs_contigsumsize + 1) * sizeof(u_int32_t); acg.cg_nextfreeoff = acg.cg_clusteroff + - howmany(fragstoblks(&sblock, sblock.fs_fpg), NBBY); + howmany(fragstoblks(&sblock, sblock.fs_fpg), CHAR_BIT); } if (acg.cg_nextfreeoff > sblock.fs_cgsize) { /* @@ -504,7 +505,7 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag) sump[run]++; run = 0; } - if ((i & (NBBY - 1)) != NBBY - 1) + if ((i & (CHAR_BIT - 1)) != CHAR_BIT - 1) bit <<= 1; else { map = *mapp++; |