From: Namhyung Kim Date: Mon, 29 Nov 2010 08:55:13 +0000 (+0900) Subject: mke2fs: fix determination of size_type X-Git-Tag: v1.41.90.wc1~17 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=22d8ce512ffcdb9d6a16e1d34f65aa37ce1ab3d3;p=tools%2Fe2fsprogs.git 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 --- 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;