Skip to content

Commit

Permalink
mtd: nand: Show reserved block in chip.erase
Browse files Browse the repository at this point in the history
The "nand chip.erase" command always printed as bad blocks even in the
case of reserved blocks. Reserved blocks are used for storing bad block
tables. The patch displays "bbt reserved" when printing reserved blocks in
"nand chip.erase" command.

Signed-off-by: Michael Trimarchi <[email protected]>
Signed-off-by: Dario Binacchi <[email protected]>
  • Loading branch information
panicking authored and passgat committed Feb 27, 2023
1 parent 4f64a31 commit d9fa61f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mtd/nand/raw/nand_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ int nand_erase_opts(struct mtd_info *mtd,
int ret = mtd_block_isbad(mtd, erase.addr);
if (ret > 0) {
if (!opts->quiet)
printf("\rSkipping bad block at "
printf("\rSkipping %s at "
"0x%08llx "
" \n",
ret == 1 ? "bad block" : "bbt reserved",
erase.addr);

if (!opts->spread)
Expand Down

0 comments on commit d9fa61f

Please sign in to comment.