Whamcloud - gitweb
mke2fs: fix determination of size_type
authorNamhyung Kim <namhyung@gmail.com>
Mon, 29 Nov 2010 08:55:13 +0000 (17:55 +0900)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 21 Dec 2010 23:44:56 +0000 (18:44 -0500)
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>
misc/mke2fs.c

index 9c8ccfc..fd3a780 100644 (file)
@@ -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;