]> www.infradead.org Git - mtd-utils.git/commitdiff
mtdinfo: kill -m option
authorBrian Norris <computersforpeace@gmail.com>
Mon, 27 Jun 2011 18:27:26 +0000 (11:27 -0700)
committerArtem Bityutskiy <dedekind1@gmail.com>
Wed, 29 Jun 2011 05:42:41 +0000 (08:42 +0300)
According to feature-removal-schedule, we shouldn't use `-m', since
it relies on a specific device-naming pattern.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
feature-removal-schedule.txt
ubi-utils/mtdinfo.c

index 0920203c1225ea7d3bad89e20bcf1230a1b9ed5b..69a8155a97a5eda97846b921e11cae2e4845f824 100644 (file)
@@ -26,11 +26,3 @@ to stop using them.
 The further step is to remove both of them.
 
 ---------------------------
-2. Kill -m parameter of mtdinfo
-
-We cannot assume that mtd device names follow the "/dev/mtd%d" pattern,
-because it is up to udev rules to name the devices. So we are removing
-the -m option. For now, we just have a warning, but the option will be
-removed in release 1.4.6.
-
----------------------------
index ab00ce02ba58480f2cd7ec9f16cc55fb3232c1e2..dd5da535d65ab52fc75f2acb4a3fafa24d362e19 100644 (file)
@@ -56,8 +56,6 @@ static const char doc[] = PROGRAM_NAME " version " VERSION
                         " - a tool to print MTD information.";
 
 static const char optionsstr[] =
-"-m, --mtdn=<MTD device number>  MTD device number to get information about\n"
-"                                (deprecated option, will be removed, do not use)\n"
 "-u, --ubi-info                  print what would UBI layout be if it was put\n"
 "                                on this MTD device\n"
 "-M, --map                       print eraseblock map\n"
@@ -66,20 +64,16 @@ static const char optionsstr[] =
 "-V, --version                   print program version";
 
 static const char usage[] =
-"Usage 1: " PROGRAM_NAME " [-m <MTD device number>] [-u] [-M] [-h] [-V] [--mtdn <MTD device number>]\n"
-"\t\t[--ubi-info] [--help] [--version]\n"
-"Usage 2: " PROGRAM_NAME " <MTD device node file name> [-u] [-M] [-h] [-V] [--ubi-info] [--help]\n"
+"Usage: " PROGRAM_NAME " <MTD device node file name> [-u] [-M] [-h] [-V] [--ubi-info] [--help]\n"
 "\t\t[--version]\n"
 "Example 1: " PROGRAM_NAME " - (no arguments) print general MTD information\n"
-"Example 2: " PROGRAM_NAME " -m 1 - print information about MTD device number 1\n"
-"Example 3: " PROGRAM_NAME " /dev/mtd0 - print information MTD device /dev/mtd0\n"
-"Example 4: " PROGRAM_NAME " /dev/mtd0 -u - print information MTD device /dev/mtd0\n"
+"Example 2: " PROGRAM_NAME " /dev/mtd0 - print information MTD device /dev/mtd0\n"
+"Example 3: " PROGRAM_NAME " /dev/mtd0 -u - print information MTD device /dev/mtd0\n"
 "\t\t\t\tand include UBI layout information\n"
-"Example 5: " PROGRAM_NAME " -a - print information about all MTD devices\n"
+"Example 4: " PROGRAM_NAME " -a - print information about all MTD devices\n"
 "\t\t\tand include UBI layout information\n";
 
 static const struct option long_options[] = {
-       { .name = "mtdn",      .has_arg = 1, .flag = NULL, .val = 'm' },
        { .name = "ubi-info",  .has_arg = 0, .flag = NULL, .val = 'u' },
        { .name = "map",       .has_arg = 0, .flag = NULL, .val = 'M' },
        { .name = "all",       .has_arg = 0, .flag = NULL, .val = 'a' },
@@ -91,9 +85,9 @@ static const struct option long_options[] = {
 static int parse_opt(int argc, char * const argv[])
 {
        while (1) {
-               int key, error = 0;
+               int key;
 
-               key = getopt_long(argc, argv, "am:uMhV", long_options, NULL);
+               key = getopt_long(argc, argv, "auMhV", long_options, NULL);
                if (key == -1)
                        break;
 
@@ -106,13 +100,6 @@ static int parse_opt(int argc, char * const argv[])
                        args.ubinfo = 1;
                        break;
 
-               case 'm':
-                       args.mtdn = simple_strtoul(optarg, &error);
-                       if (error || args.mtdn < 0)
-                               return errmsg("bad MTD device number: \"%s\"", optarg);
-                       warnmsg("-m/--mtdn is depecated, will be removed in mtd-utils-1.4.6");
-                       break;
-
                case 'M':
                        args.map = 1;
                        break;