Whamcloud - gitweb
mke2fs: Treat an argv[0] of "mke3fs" the same as "mkfs.ext3"
authorTheodore Ts'o <tytso@mit.edu>
Tue, 20 Jan 2009 17:02:40 +0000 (12:02 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Jan 2009 17:02:40 +0000 (12:02 -0500)
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" <tytso@mit.edu>
misc/mke2fs.c

index 3d830fc..0967bdc 100644 (file)
@@ -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;
        }