From patchwork Wed May 11 16:46:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 95168 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 5CDB0B6F6E for ; Thu, 12 May 2011 02:48:08 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754777Ab1EKQqW (ORCPT ); Wed, 11 May 2011 12:46:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52628 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753791Ab1EKQqV (ORCPT ); Wed, 11 May 2011 12:46:21 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4BGkLph017030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 May 2011 12:46:21 -0400 Received: from liberator.sandeen.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4BGkJSh014345 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Wed, 11 May 2011 12:46:20 -0400 Message-ID: <4DCABD5B.8040403@redhat.com> Date: Wed, 11 May 2011 11:46:19 -0500 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: ext4 development Subject: [PATCH] debugfs: remove unused htree_dump "-l" argument X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The long_opt / -l argument was apparently never implemented, so remove it and associated argument parsing. This slightly changes the (undocumented) behavior because it no longer defaults to cwd if no filespec is specified... Signed-off-by: Eric Sandeen --- -- 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/debugfs/htree.c b/debugfs/htree.c index 08f9749..b829e25 100644 --- a/debugfs/htree.c +++ b/debugfs/htree.c @@ -197,8 +197,6 @@ void do_htree_dump(int argc, char *argv[]) { ext2_ino_t ino; struct ext2_inode inode; - int c; - int long_opt = 0; blk64_t blk; char *buf = NULL; struct ext2_dx_root_info *rootnode; @@ -211,28 +209,7 @@ void do_htree_dump(int argc, char *argv[]) pager = open_pager(); - reset_getopt(); - while ((c = getopt (argc, argv, "l")) != EOF) { - switch (c) { - case 'l': - long_opt++; - break; - default: - goto print_usage; - } - } - - if (argc > optind+1) { - print_usage: - com_err(0, 0, "Usage: htree_dump [-l] file"); - goto errout; - } - - if (argc == optind) - ino = cwd; - else - ino = string_to_inode(argv[optind]); - if (!ino) + if (common_inode_args_process(argc, argv, &ino, 0)) goto errout; if (debugfs_read_inode(ino, &inode, argv[1]))