summaryrefslogtreecommitdiff
path: root/e2fsprogs/mke2fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/mke2fs.c')
-rw-r--r--e2fsprogs/mke2fs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c
index 10563e2..09d42aa 100644
--- a/e2fsprogs/mke2fs.c
+++ b/e2fsprogs/mke2fs.c
@@ -878,8 +878,12 @@ BLOCKSIZE_ERROR:
mke2fs_warning_msg(1, "fragments not supported. Ignoring -f option");
break;
case 'g':
- if (safe_strtoi(optarg, &param.s_blocks_per_group)) {
+ {
+ int foo;
+ if (safe_strtoi(optarg, &foo)) {
bb_error_msg_and_die("Illegal number for blocks per group");
+ }
+ param.s_blocks_per_group = foo;
}
if ((param.s_blocks_per_group % 8) != 0) {
bb_error_msg_and_die("blocks per group must be multiple of 8");