[PATCH] nanddump: Fix hexdump nybble ordering
Jon Povey
jon.povey at racelogic.co.uk
Fri Aug 20 04:11:19 EDT 2010
Hex dumps were being printed with the nybbles reversed since
commit 6ff458433ba15b8a7cb258ce64e64e98982df26e
Fix.
Signed-off-by: Jon Povey <jon.povey at racelogic.co.uk>
CC: Brian Norris <norris at broadcom.com>
---
nanddump.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/nanddump.c b/nanddump.c
index acfdb33..22fec5f 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -239,8 +239,8 @@ static void pretty_dump_to_buffer(const unsigned char *buf, size_t len,
for (j = 0; (j < len) && (lx + 3) <= linebuflen; j++) {
ch = buf[j];
- linebuf[lx++] = hex_asc[ch & 0x0f];
linebuf[lx++] = hex_asc[(ch & 0xf0) >> 4];
+ linebuf[lx++] = hex_asc[ch & 0x0f];
linebuf[lx++] = ' ';
}
if (j)
--
1.6.3.3
More information about the linux-mtd
mailing list