]> www.infradead.org Git - mtd-utils.git/commitdiff
mtd-utils: kill flash_info
authorBrian Norris <computersforpeace@gmail.com>
Mon, 27 Jun 2011 18:27:25 +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 kill flash_info in favor of
mtdinfo.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Makefile
feature-removal-schedule.txt
flash_info.c [deleted file]

index 8f871c689b132efedcc95f0c806d68f584692c7f..afbe2018051050677fa7c86aba4c057906c2d963 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ TESTS = tests
 
 MTD_BINS = \
        ftl_format flash_erase nanddump doc_loadbios \
-       ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info \
+       ftl_check mkfs.jffs2 flash_lock flash_unlock \
        flash_otp_info flash_otp_dump mtd_debug flashcp nandwrite nandtest \
        jffs2dump \
        nftldump nftl_format docfdisk \
index a5980f72c252eef02d69e2d898c2409dfcb9b858..0920203c1225ea7d3bad89e20bcf1230a1b9ed5b 100644 (file)
@@ -34,9 +34,3 @@ the -m option. For now, we just have a warning, but the option will be
 removed in release 1.4.6.
 
 ---------------------------
-3. flash_info utility
-
-This is duplicating behavior with the mtdinfo utility.  Now the util
-warns when people use it, but it'll be removed in release 1.4.6.
-
----------------------------
diff --git a/flash_info.c b/flash_info.c
deleted file mode 100644 (file)
index d9a4492..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * flash_info.c -- print info about a MTD device
- */
-
-#define PROGRAM_NAME "flash_info"
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <time.h>
-#include <sys/ioctl.h>
-#include <sys/mount.h>
-
-#include "common.h"
-#include <mtd/mtd-user.h>
-
-static void usage(int status)
-{
-       fprintf(status ? stderr : stdout,
-               "Usage: %s <device> [devices]\n",
-               PROGRAM_NAME);
-       exit(status);
-}
-
-int main(int argc, char *argv[])
-{
-       int fd, i, regcount;
-
-       warnmsg("this utility is deprecated in favor of `mtdinfo` and will be removed in mtd-utils-1.4.6");
-
-       if (argc < 2)
-               usage(1);
-       if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))
-               usage(0);
-
-       for (i = 1; i < argc; ++i) {
-               const char *dev = argv[i];
-               int r;
-               region_info_t reginfo;
-
-               /* Open and size the device */
-               fd = open(dev, O_RDONLY);
-               if (fd < 0) {
-                       sys_errmsg("could not open: %s", dev);
-                       continue;
-               }
-
-               if (ioctl(fd, MEMGETREGIONCOUNT, &regcount))
-                       continue;
-
-               printf("%s: %d erase regions\n", dev, regcount);
-               for (r = 0; r < regcount; ++r) {
-                       reginfo.regionindex = r;
-                       if (ioctl(fd, MEMGETREGIONINFO, &reginfo) == 0) {
-                               printf("Region %d is at 0x%x with size 0x%x and "
-                                               "has 0x%x blocks\n", r, reginfo.offset,
-                                               reginfo.erasesize, reginfo.numblocks);
-                       } else {
-                               warnmsg("can not read region %d from a %d region device",
-                                       r, regcount);
-                       }
-               }
-       }
-
-       return 0;
-}