Commit 66dc09c5540be61345ae6bcd797149065baf5340
Committed by
Tom Rini
1 parent
2bf94120e9
Exists in
smarc_8mq_lf_v2020.04
and in
18 other branches
cmd, nand: fix broken output of "nand info"
If the value of either "nand options" or "bbt options" has a zero in the most significant nibble, the '0x' prefix will be isolated from the value like shown below: |Device 0: nand0, sector size 128 KiB | Page size 2048 b | OOB size 64 b | Erase size 131072 b | subpagesize 2048 b | options 0x40000200 | bbt options 0x 60000 Change the format string to produce leading zeroes filling the gap. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
cmd/nand.c
... | ... | @@ -295,8 +295,8 @@ |
295 | 295 | printf(" OOB size %8d b\n", mtd->oobsize); |
296 | 296 | printf(" Erase size %8d b\n", mtd->erasesize); |
297 | 297 | printf(" subpagesize %8d b\n", chip->subpagesize); |
298 | - printf(" options 0x%8x\n", chip->options); | |
299 | - printf(" bbt options 0x%8x\n", chip->bbt_options); | |
298 | + printf(" options 0x%08x\n", chip->options); | |
299 | + printf(" bbt options 0x%08x\n", chip->bbt_options); | |
300 | 300 | |
301 | 301 | /* Set geometry info */ |
302 | 302 | setenv_hex("nand_writesize", mtd->writesize); |