From: Eric Sandeen Date: Wed, 15 Feb 2012 20:11:35 +0000 (-0500) Subject: mke2fs: recognize mke4fs program name X-Git-Tag: v1.42.1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=237b7b23fe69a83a9bb1d98d014d26f146ac26a3;p=thirdparty%2Fe2fsprogs.git mke2fs: recognize mke4fs program name We shipped "mke4fs" alongside mke2fs in RHEL5, so that ext4-capable utilities could be installed without disturbing the venerable e2fsprogs-1.39 shipped in RHEL5 from the beginning. But it surprised some users that "mke4fs" created ext2 filesystems by default rather than ext4. While it was my intent to have the renamed binaries behave exactly like the stock ones, it seems that there is some precedence for handling "mkeNfs" in the code, so seems reasonable to add mke4fs -> ext4 as well. Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index b6230b5d0..08789c4bf 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1014,6 +1014,8 @@ static char **parse_fs_type(const char *fs_type, ext_type = "ext2"; else if (!strcmp(program_name, "mke3fs")) ext_type = "ext3"; + else if (!strcmp(program_name, "mke4fs")) + ext_type = "ext4"; else if (progname) { ext_type = strrchr(progname, '/'); if (ext_type)