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" <tytso@mit.edu>
bitmap-optimize
Theodore Ts'o 2008-08-22 21:57:29 -04:00
parent 094c2d4393
commit bad89b2af3
1 changed files with 14 additions and 0 deletions

View 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";