diff options
-rw-r--r-- | misc/ChangeLog | 8 | ||||
-rw-r--r-- | misc/mke2fs.c | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog index bdeaf234..7c32e520 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,11 @@ +2007-03-19 Theodore Tso <tytso@mit.edu> + + * mke2fs.c (PRS): Fix deadcode bug detected by Coverity where if + the fs_type is not specified and we are creating a journal + device, to use a fs_type of "journal"; this used to be the + behavior before we added support for the /etc/mke2fs.conf + file, so let's fix it to restore the old behavior. + 2006-12-22 Theodore Tso <tytso@mit.edu> * tune2fs.c, mke2fs.c, e2initrd_helper.c, e2image.c, dumpe2fs.c: diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 2e72dcab..f459a7cf 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1272,7 +1272,10 @@ static void PRS(int argc, char *argv[]) int megs = (__u64)fs_param.s_blocks_count * (EXT2_BLOCK_SIZE(&fs_param) / 1024) / 1024; - if (megs <= 3) + if (fs_param.s_feature_incompat & + EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) + fs_type = "journal"; + else if (megs <= 3) fs_type = "floppy"; else if (megs <= 512) fs_type = "small"; @@ -1337,8 +1340,6 @@ static void PRS(int argc, char *argv[]) if (fs_param.s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) { - if (!fs_type) - fs_type = "journal"; reserved_ratio = 0; fs_param.s_feature_incompat = EXT3_FEATURE_INCOMPAT_JOURNAL_DEV; fs_param.s_feature_compat = 0; |