From: Matthieu Dupont <matt.59491@gmail.com>
To: linux-ext4@vger.kernel.org
Subject: [PATCH] In mke2fs, accept a human readable size as input to the 'bytes-per-inode' argument.
Date: Sun, 15 Nov 2015 16:24:54 +0100 [thread overview]
Message-ID: <1447601094-19655-1-git-send-email-matt.59491@gmail.com> (raw)
Signed-off-by: Matthieu Dupont <matt.59491@gmail.com>
---
misc/mke2fs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 179a4d1..8d61212 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1646,10 +1646,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,
--
1.9.1
next reply other threads:[~2015-11-15 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-15 15:24 Matthieu Dupont [this message]
2015-11-16 1:10 ` [PATCH] In mke2fs, accept a human readable size as input to the 'bytes-per-inode' argument Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447601094-19655-1-git-send-email-matt.59491@gmail.com \
--to=matt.59491@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox