aboutsummaryrefslogtreecommitdiff
path: root/misc/mke2fs.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-11-29 17:55:13 +0900
committerTheodore Ts'o <tytso@mit.edu>2010-12-21 18:44:56 -0500
commit22d8ce512ffcdb9d6a16e1d34f65aa37ce1ab3d3 (patch)
tree1597b23f79787267a456b6b575ea8bf97ab80b0c /misc/mke2fs.c
parent9a2767ffed4e3eca1834c4134885a1f51d1a2ca5 (diff)
downloade2fsprogs-22d8ce512ffcdb9d6a16e1d34f65aa37ce1ab3d3.tar.gz
mke2fs: fix determination of size_type
In original code, 'huge' type could not be selected because it always be caught for 'big' type. Change the ordering. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/mke2fs.c')
-rw-r--r--misc/mke2fs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 9c8ccfce..fd3a780a 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -979,12 +979,12 @@ static char **parse_fs_type(const char *fs_type,
size_type = "floppy";
else if (fs_blocks_count < 512 * meg)
size_type = "small";
- else if (fs_blocks_count >= 4 * 1024 * 1024 * meg)
+ else if (fs_blocks_count < 4 * 1024 * 1024 * meg)
+ size_type = "default";
+ else if (fs_blocks_count < 16 * 1024 * 1024 * meg)
size_type = "big";
- else if (fs_blocks_count >= 16 * 1024 * 1024 * meg)
- size_type = "huge";
else
- size_type = "default";
+ size_type = "huge";
if (!usage_types)
usage_types = size_type;