memory_display: add padding to simplify counting
Trying to count single bytes (e.g. when adding an offset) in 'word' or
'byte' output mode is not easy in the current formatting, and (at least
for me) has a high chance of miscounting or losing track of groups:

    barebox@boardname:/ md -b 0x149983f0+32
    149983f0: 18 00 00 00 00 00 0d 86 00 00 00 00 00 00 00 00    ................
    14998400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

    barebox@boardname:/ md -w 0x149983f0+32
    149983f0: 0018 0000 0000 860d 0000 0000 0000 0000            ................
    14998400: 0000 0000 0000 0000 0000 0000 0000 0000            ................

With an additional space after 8 bytes, counting becomes easier:

    barebox@boardname:/ md -b 0x149983f0+32
    149983f0: 18 00 00 00 00 00 0d 86  00 00 00 00 00 00 00 00   ................
    14998400: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................

    barebox@boardname:/ md -w 0x149983f0+32
    149983f0: 0018 0000 0000 860d  0000 0000 0000 0000           ................
    14998400: 0000 0000 0000 0000  0000 0000 0000 0000           ................

The 'quad' and 'long' output modes stay the same and are already much
more easier to count because they build bigger and therefore less groups
of bytes per line.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 8ef6940 commit 7dab73c677e0e50aed4813f0301241ffead666ce
@Roland Hieber Roland Hieber authored on 20 Nov 2018
Sascha Hauer committed on 21 Nov 2018
Showing 1 changed file
View
common/memory_display.c