linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ftl_check: drop unused verbose flag
@ 2010-09-23  2:33 Mike Frysinger
  2010-09-23 13:36 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2010-09-23  2:33 UTC (permalink / raw)
  To: linux-mtd

The verbose flag isn't actually checked anywhere, so punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 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);
-- 
1.7.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ftl_check: drop unused verbose flag
  2010-09-23  2:33 [PATCH] ftl_check: drop unused verbose flag Mike Frysinger
@ 2010-09-23 13:36 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-09-23 13:36 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-mtd

On Wed, 2010-09-22 at 22:33 -0400, Mike Frysinger wrote:
> The verbose flag isn't actually checked anywhere, so punt it.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  ftl_check.c |   13 ++++---------
>  1 files changed, 4 insertions(+), 9 deletions(-)

Pushed to mtd-utils, thanks!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-23 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23  2:33 [PATCH] ftl_check: drop unused verbose flag Mike Frysinger
2010-09-23 13:36 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).