sbin: use our howmany() macro when available through <sys/param.h>.

This commit is contained in:
Pedro F. Giffuni 2016-05-01 02:19:49 +00:00
parent e451cf5f4c
commit 312717174d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298871
2 changed files with 3 additions and 2 deletions

View File

@ -518,7 +518,8 @@ dbg_dump_frmap(struct fs *sb, const char *comment, struct cg *cgr)
cp = (unsigned char *)cg_blksfree(cgr);
if (sb->fs_old_nspf)
e = howmany((sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf), CHAR_BIT);
e = howmany(sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf,
CHAR_BIT);
else
e = 0;
for (j = 0; j < e; j += 32) {

View File

@ -132,7 +132,7 @@ static uint32_t nuserfiles;
static uint32_t seg_nblocks;
static uint32_t seg_endblock;
#define SIZE_TO_BLOCK(size) (((size) + (blocksize - 1)) / blocksize)
#define SIZE_TO_BLOCK(size) howmany(size, blocksize)
static uint32_t
nandfs_first_block(void)