]> www.infradead.org Git - mtd-utils.git/commitdiff
ftl_check: drop unused verbose flag
authorMike Frysinger <vapier@gentoo.org>
Thu, 23 Sep 2010 02:33:32 +0000 (22:33 -0400)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 23 Sep 2010 13:36:11 +0000 (16:36 +0300)
The verbose flag isn't actually checked anywhere, so punt it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
ftl_check.c

index f41e79a34ec6c733a4b3d97bde37e02a4a52959f..485eaa894b2e5134b1b8ba39a27982e47bdb76ba 100644 (file)
@@ -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);