aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/mtdinfo.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/ubi-utils/mtdinfo.c b/ubi-utils/mtdinfo.c
index ab00ce0..dd5da53 100644
--- a/ubi-utils/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
@@ -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;