diff mbox

mke2fs: recognize mke4fs program name

Message ID 4F32E173.2050103@redhat.com
State Accepted, archived
Headers show

Commit Message

Eric Sandeen Feb. 8, 2012, 8:56 p.m. UTC
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 <sandeen@redhat.com>
---

This probably doesn't matter much to upstream, but it seems consistent
with the existing code, below, if you'd like to include it.



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Andreas Dilger Feb. 8, 2012, 10:29 p.m. UTC | #1
On 2012-02-08, at 1:56 PM, Eric Sandeen wrote:
> 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.

Makes sense I think.

> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> This probably doesn't matter much to upstream, but it seems consistent
> with the existing code, below, if you'd like to include it.
> 
> 
> diff --git a/misc/mke2fs.c b/misc/mke2fs.c
> index e97e44e..410f880 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)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheers, Andreas





--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o Feb. 15, 2012, 7:20 p.m. UTC | #2
On Wed, Feb 08, 2012 at 02:56:19PM -0600, Eric Sandeen wrote:
> 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 <sandeen@redhat.com>

Thanks, applied.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index e97e44e..410f880 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)