From patchwork Wed Feb 8 20:56:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 140218 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4A24CB6EF7 for ; Thu, 9 Feb 2012 07:56:22 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752188Ab2BHU4U (ORCPT ); Wed, 8 Feb 2012 15:56:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6549 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752183Ab2BHU4U (ORCPT ); Wed, 8 Feb 2012 15:56:20 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q18KuKrY015078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 8 Feb 2012 15:56:20 -0500 Received: from liberator.sandeen.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q18KuJnM006082 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Wed, 8 Feb 2012 15:56:20 -0500 Message-ID: <4F32E173.2050103@redhat.com> Date: Wed, 08 Feb 2012 14:56:19 -0600 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: ext4 development Subject: [PATCH] mke2fs: recognize mke4fs program name X-Enigmail-Version: 1.3.5 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 --- 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 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)