From 1a71bd42003d87ff96e3e0e8c293b44c8783e9ba Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 20 Jan 2009 12:02:40 -0500 Subject: [PATCH] mke2fs: Treat an argv[0] of "mke3fs" the same as "mkfs.ext3" Mandriva apparently uses "mke3fs" as an alias for mkfs.ext3. I'm not particularly fond of that practice, but we'll include it as legacy support. Signed-off-by: "Theodore Ts'o" --- misc/mke2fs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 3d830fc50..0967bdc18 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -945,6 +945,8 @@ static char **parse_fs_type(const char *fs_type, ext_type = fs_type; else if (is_hurd) ext_type = "ext2"; + else if (!strcmp(program_name, "mke3fs")) + ext_type = "ext3"; else if (progname) { ext_type = strrchr(progname, '/'); if (ext_type) @@ -1157,7 +1159,8 @@ static void PRS(int argc, char *argv[]) program_name = get_progname(*argv); /* If called as mkfs.ext3, create a journal inode */ - if (!strcmp(program_name, "mkfs.ext3")) + if (!strcmp(program_name, "mkfs.ext3") || + !strcmp(program_name, "mke3fs")) journal_size = -1; } -- 2.47.3