summaryrefslogtreecommitdiffstats
path: root/commands/nand.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-11-10 15:07:38 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-10 15:07:38 +0100
commit7b1d8b4b3561c043a79d5933a7c1eb9266dc328d (patch)
tree9c398aa20e22763a239d11eecf6fb4c1d06d4c97 /commands/nand.c
parent0b0eada569b198aa3882cfec5874bc35a8a0fa14 (diff)
parent4db0f1c3dbe6173fdf91cbeb83e250719332c6a3 (diff)
downloadbarebox-7b1d8b4b3561c043a79d5933a7c1eb9266dc328d.tar.gz
barebox-7b1d8b4b3561c043a79d5933a7c1eb9266dc328d.tar.xz
Merge branch 'for-next/mtd-nand'
Diffstat (limited to 'commands/nand.c')
-rw-r--r--commands/nand.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/nand.c b/commands/nand.c
index ed2864fb7b..67e43eba30 100644
--- a/commands/nand.c
+++ b/commands/nand.c
@@ -13,6 +13,7 @@
#include <ioctl.h>
#include <nand.h>
#include <linux/mtd/mtd-abi.h>
+#include <linux/mtd/mtd.h>
#include <fcntl.h>
#include <libgen.h>
@@ -130,6 +131,8 @@ static int do_nand(int argc, char *argv[])
loff_t ofs;
int bad = 0;
+ printf("---- bad blocks ----\n");
+
for (ofs = 0; ofs < mtdinfo.size; ofs += mtdinfo.erasesize) {
if (ioctl(fd, MEMGETBADBLOCK, &ofs)) {
printf("Block at 0x%08llx is bad\n", ofs);
@@ -139,6 +142,8 @@ static int do_nand(int argc, char *argv[])
if (!bad)
printf("No bad blocks\n");
+
+ mtd_print_oob_info(mtdinfo.mtd);
}
out: