From 22d8ce512ffcdb9d6a16e1d34f65aa37ce1ab3d3 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 29 Nov 2010 17:55:13 +0900 Subject: [PATCH] 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 Signed-off-by: Theodore Ts'o --- misc/mke2fs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 9c8ccfc..fd3a780 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; -- 1.8.3.1