]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs: Issue a warning if the mke2fs.conf file wasn't updated
authorTheodore Ts'o <tytso@mit.edu>
Sat, 23 Aug 2008 01:57:29 +0000 (21:57 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 23 Aug 2008 13:08:15 +0000 (09:08 -0400)
Many people are forgetting to update their mke2fs.conf file, and this
means that filesystems aren't getting created with the proper features
enabled.  So detect this case and issue a warning.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/mke2fs.c

index 04c482e4caa629fafe3f193db60ebf2885edf193..9cba3b5da7b17ba1e762a3e65dcd40402a90e83d 100644 (file)
@@ -968,6 +968,20 @@ static char **parse_fs_type(const char *fs_type,
                        ext_type = "ext3";
        }
 
+       if (!strcmp(ext_type, "ext3") || !strcmp(ext_type, "ext4") ||
+           !strcmp(ext_type, "ext4dev")) {
+               profile_get_string(profile, "fs_types", ext_type, "features",
+                                  0, &t);
+               if (!t) {
+                       printf(_("\nWarning!  Your mke2fs.conf file does "
+                                "not define the %s filesystem type.\n"),
+                              ext_type);
+                       printf(_("You probably need to install an updated "
+                                "mke2fs.conf file.\n\n"));
+                       sleep(5);
+               }
+       }
+
        meg = (1024 * 1024) / EXT2_BLOCK_SIZE(fs_param);
        if (fs_param->s_blocks_count < 3 * meg)
                size_type = "floppy";