Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ee2669
)
make2fs: parse a human readable inode ratio for the -i option
author
Matthieu Dupont
<matt.59491@gmail.com>
Sun, 15 Nov 2015 15:24:54 +0000
(16:24 +0100)
committer
Theodore Ts'o
<tytso@mit.edu>
Mon, 16 Nov 2015 01:05:44 +0000
(20:05 -0500)
Signed-off-by: Matthieu Dupont <matt.59491@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c
patch
|
blob
|
history
diff --git
a/misc/mke2fs.c
b/misc/mke2fs.c
index
9a2a6cc
..
800a968
100644
(file)
--- a/
misc/mke2fs.c
+++ b/
misc/mke2fs.c
@@
-1641,10
+1641,9
@@
profile_error:
}
break;
case 'i':
- inode_ratio =
strtoul(optarg, &tmp, 0
);
+ inode_ratio =
parse_num_blocks(optarg, -1
);
if (inode_ratio < EXT2_MIN_BLOCK_SIZE ||
- inode_ratio > EXT2_MAX_BLOCK_SIZE * 1024 ||
- *tmp) {
+ inode_ratio > EXT2_MAX_BLOCK_SIZE * 1024) {
com_err(program_name, 0,
_("invalid inode ratio %s (min %d/max %d)"),
optarg, EXT2_MIN_BLOCK_SIZE,