projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05647b5
)
mkfs_ext2: small tweak
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 19 Oct 2009 22:16:24 +0000
(
00:16
+0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 19 Oct 2009 22:16:24 +0000
(
00:16
+0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/mkfs_ext2.c
patch
|
blob
|
history
diff --git
a/util-linux/mkfs_ext2.c
b/util-linux/mkfs_ext2.c
index d0ebc1dd95974fb1faf53d77bf903eec78111718..e840f7810344bf0f6102f94cfe7f940329d18341 100644
(file)
--- a/
util-linux/mkfs_ext2.c
+++ b/
util-linux/mkfs_ext2.c
@@
-75,10
+75,11
@@
static unsigned int_log2(unsigned arg)
}
// taken from mkfs_minix.c. libbb candidate?
-static unsigned div_roundup(uint64_t size, uint32_t n)
+// why "uint64_t size"? we never use it for anything >32 bits
+static uint32_t div_roundup(uint64_t size, uint32_t n)
{
// Overflow-resistant
- uint
64
_t res = size / n;
+ uint
32
_t res = size / n;
if (res * n != size)
res++;
return res;