X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=common%2Fcmd_mtdparts.c;h=a2289df4f64c60228d76c05eb56a1956502bebbf;hp=8cc5c383b6d97e165cbe68f95ed31d89dc006468;hb=f82ac7d1607465fdaacf007f79e88aebe91b8731;hpb=f3421f3f2f4e5f4dbc125c1b3dc65647af5f9caf;ds=sidebyside diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c index 8cc5c383b6..a2289df4f6 100644 --- a/common/cmd_mtdparts.c +++ b/common/cmd_mtdparts.c @@ -1229,6 +1229,18 @@ static uint64_t net_part_size(struct mtd_info *mtd, struct part_info *part) } #endif +static void show_ecc_stats(struct mtd_device *dev) +{ + struct mtd_info *mtd; + + if (get_mtd_info(dev->id->type, dev->id->num, &mtd)) + return; + + printf("ECC stats for device %s:\n", mtd->name); + printf(" corrected bit flips:\t%4u\n", mtd->ecc_stats.corrected); + printf(" uncorrectable errors:\t%4u\n", mtd->ecc_stats.failed); +} + static void print_partition_table(void) { struct list_head *dentry, *pentry; @@ -1276,6 +1288,7 @@ static void print_partition_table(void) #endif /* defined(CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES) */ part_num++; } + show_ecc_stats(dev); } if (list_empty(&devices))