summaryrefslogtreecommitdiff
path: root/lib/hexdump.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-16 11:28:04 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-16 11:28:04 +0200
commit7aaaec38fcd9ef3172e69f8c19f20113830a8498 (patch)
treeb12a1c359ad53ae10601f77b3438bb27c3c8f337 /lib/hexdump.c
parent1ac97018169c5a13feaa90d9671f2d6ba2d9e86e (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Merge branch 'linus' into x86/kconfigtip-x86-kconfig-2008-06-16_09.28_Mon
Diffstat (limited to 'lib/hexdump.c')
-rw-r--r--lib/hexdump.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/hexdump.c b/lib/hexdump.c
index 343546550dc9..f07c0db81d26 100644
--- a/lib/hexdump.c
+++ b/lib/hexdump.c
@@ -12,6 +12,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
+const char hex_asc[] = "0123456789abcdef";
+EXPORT_SYMBOL(hex_asc);
+
/**
* hex_dump_to_buffer - convert a blob of data to "hex ASCII" in memory
* @buf: data blob to dump
@@ -93,8 +96,8 @@ void hex_dump_to_buffer(const void *buf, size_t len, int rowsize,
for (j = 0; (j < rowsize) && (j < len) && (lx + 4) < linebuflen;
j++) {
ch = ptr[j];
- linebuf[lx++] = hex_asc(ch >> 4);
- linebuf[lx++] = hex_asc(ch & 0x0f);
+ linebuf[lx++] = hex_asc_hi(ch);
+ linebuf[lx++] = hex_asc_lo(ch);
linebuf[lx++] = ' ';
}
ascii_column = 3 * rowsize + 2;