mirror of https://github.com/vitalif/e2fsprogs
make2fs: parse a human readable inode ratio for the -i option
Signed-off-by: Matthieu Dupont <matt.59491@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>debian
parent
4ee2669982
commit
79ffbf251e
|
@ -1641,10 +1641,9 @@ profile_error:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
inode_ratio = strtoul(optarg, &tmp, 0);
|
inode_ratio = parse_num_blocks(optarg, -1);
|
||||||
if (inode_ratio < EXT2_MIN_BLOCK_SIZE ||
|
if (inode_ratio < EXT2_MIN_BLOCK_SIZE ||
|
||||||
inode_ratio > EXT2_MAX_BLOCK_SIZE * 1024 ||
|
inode_ratio > EXT2_MAX_BLOCK_SIZE * 1024) {
|
||||||
*tmp) {
|
|
||||||
com_err(program_name, 0,
|
com_err(program_name, 0,
|
||||||
_("invalid inode ratio %s (min %d/max %d)"),
|
_("invalid inode ratio %s (min %d/max %d)"),
|
||||||
optarg, EXT2_MIN_BLOCK_SIZE,
|
optarg, EXT2_MIN_BLOCK_SIZE,
|
||||||
|
|
Loading…
Reference in New Issue