From: Theodore Ts'o Date: Sat, 23 Aug 2008 01:57:29 +0000 (-0400) Subject: mke2fs: Issue a warning if the mke2fs.conf file wasn't updated X-Git-Tag: v1.41.1~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bad89b2af3ffa43c9570d93c3d9d9adacc194f9a;p=thirdparty%2Fe2fsprogs.git mke2fs: Issue a warning if the mke2fs.conf file wasn't updated 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" --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 04c482e4c..9cba3b5da 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -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";