diff options
author | bde <bde@FreeBSD.org> | 1998-05-31 12:21:50 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-05-31 12:21:50 +0000 |
commit | 0fc01e5adf53d99d1b3aa4f7689a080f230d8e52 (patch) | |
tree | 962e8a69f3c7bc9126cef5e4f15ab3ba4c0426c0 /sbin/newfs/mkfs.c | |
parent | 935c494c4bf852eb4f5ef6c127f307cf49a401e5 (diff) | |
download | FreeBSD-src-0fc01e5adf53d99d1b3aa4f7689a080f230d8e52.zip FreeBSD-src-0fc01e5adf53d99d1b3aa4f7689a080f230d8e52.tar.gz |
Fixed overflow in the calculation of the number of inodes per group
for filesystems with almost the maximum number of sectors. The maxiumum
is 2^31, but overflow is common for that size, and overflow normally
occurred here at size (2^31 - 4096).
Diffstat (limited to 'sbin/newfs/mkfs.c')
-rw-r--r-- | sbin/newfs/mkfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index c232256..b21c458 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1059,7 +1059,7 @@ calcipg(cpg, bpcg, usedbp) * Prepare to scale by fssize / (number of sectors in cylinder groups). * Note that fssize is still in sectors, not filesystem blocks. */ - ncyl = howmany(fssize, secpercyl); + ncyl = howmany(fssize, (u_int)secpercyl); ncg = howmany(ncyl, cpg); /* * Iterate a few times to allow for ipg depending on itself. |