From patchwork Thu Sep 23 02:33:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 65484 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3BD51B70DA for ; Thu, 23 Sep 2010 12:35:38 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Oybdf-0005bu-6a; Thu, 23 Sep 2010 02:34:23 +0000 Received: from smtp.gentoo.org ([140.211.166.183]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1Oybdc-0005bT-LJ for linux-mtd@lists.infradead.org; Thu, 23 Sep 2010 02:34:21 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 80E2D1B4060 for ; Thu, 23 Sep 2010 02:34:19 +0000 (UTC) From: Mike Frysinger To: linux-mtd@lists.infradead.org Subject: [PATCH] ftl_check: drop unused verbose flag Date: Wed, 22 Sep 2010 22:33:32 -0400 Message-Id: <1285209212-32647-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100922_223420_849279_75F2186B X-CRM114-Status: GOOD ( 12.64 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [140.211.166.183 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The verbose flag isn't actually checked anywhere, so punt it. Signed-off-by: Mike Frysinger --- ftl_check.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ftl_check.c b/ftl_check.c index f41e79a..485eaa8 100644 --- a/ftl_check.c +++ b/ftl_check.c @@ -79,7 +79,7 @@ static void print_size(u_int s) /*====================================================================*/ -static void check_partition(int fd, int verbose) +static void check_partition(int fd) { mtd_info_t mtd; erase_unit_header_t hdr, hdr2; @@ -180,26 +180,21 @@ static void check_partition(int fd, int verbose) /* Show usage information */ void showusage(char *pname) { - fprintf(stderr, "usage: %s [-v] device\n", pname); - fprintf(stderr, "-v verbose messages\n"); + fprintf(stderr, "usage: %s device\n", pname); } /*====================================================================*/ int main(int argc, char *argv[]) { - int verbose; int optch, errflg, fd; struct stat buf; errflg = 0; - verbose = 0; - while ((optch = getopt(argc, argv, "vh")) != -1) { + while ((optch = getopt(argc, argv, "h")) != -1) { switch (optch) { case 'h': errflg = 1; break; - case 'v': - verbose = 1; break; default: errflg = -1; break; } @@ -224,7 +219,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - check_partition(fd, verbose); + check_partition(fd); close(fd); exit(EXIT_SUCCESS);